title: How to drop multiple column names given in a list from Spark DataFrame?
body: <p>I have a dynamic list which is created based on value of n.</p>
  
  <pre class="lang-py prettyprint-override"><code>n = 3
  drop_lst = ['a' + str(i) for i in range(n)]
  df.drop(drop_lst)
  </code></pre>
  
  <p>But the above is not working.</p>
  
  <p><strong>Note</strong>:</p>
  
  <p>My use case requires a dynamic list.</p>
  
  <p>If I just do the below without list it works</p>
  
  <pre class="lang-py prettyprint-override"><code>df.drop('a0','a1','a2')
  </code></pre>
  
  <p>How do I make drop function work with list?</p>
  
  <p>Spark 2.2 doesn't seem to have this capability. Is there a way to make it work without using <code>select()</code>?</p>