title: How to exclude multiple columns in Spark dataframe in Python
body: <p>I found PySpark has a method called <code>drop</code> but it seems it can only drop one column at a time. Any ideas about how to drop multiple columns at the same time?</p>
  
  <pre class="lang-python prettyprint-override"><code>df.drop(['col1','col2'])
  </code></pre>
  
  
  
  <pre><code>TypeError                                 Traceback (most recent call last)
  &lt;ipython-input-96-653b0465e457&gt; in &lt;module&gt;()
  ----&gt; 1 selectedMachineView = machineView.drop([['GpuName','GPU1_TwoPartHwID']])
  
  /usr/hdp/current/spark-client/python/pyspark/sql/dataframe.pyc in drop(self, col)
     1257             jdf = self._jdf.drop(col._jc)
     1258         else:
  -&gt; 1259             raise TypeError("col should be a string or a Column")
     1260         return DataFrame(jdf, self.sql_ctx)
     1261 
  
  TypeError: col should be a string or a Column
  </code></pre>