title: How to remove columns from a pre-selected dataframe which contain only NaN's
body: <p>I want to remove all columns which contain only NaN's. This is my example code:</p>
  
  <pre><code>rutte2[[u'50PLUS', u'AOV', u'Bontes', u'Bontes/Van Klaveren',
         u'Brinkman', u'CD', u'CDA', u'ChristenUnie', u'D66', u'De Jong',
         u'Eerdmans/Van Schijndel', u'GPV', u'GroenLinks', u'Hendriks',
         u'Houwers', u'Klein', u'Kortenoeven/Hernandez', u'Kuzu/Öztürk',
         u'Lazrak', u'LN', u'LPF', u'Nawijn', u'Nijpels', u'PvdA', u'PvdD',
         u'PVV', u'RPF', u'SGP', u'SP', u'Unie 55+', u'Van Klaveren',
         u'Van Oudenallen', u'Van Vliet', u'Verdonk', u'Verkerk', u'VVD',
         u'Wijnschenk', u'Wilders']].dropna(axis=1, how='all')
  </code></pre>
  
  <p>When I do </p>
  
  <pre><code>type(rutte2[[u'50PLUS', u'AOV', u'Bontes', u'Bontes/Van Klaveren',
             u'Brinkman', u'CD', u'CDA', u'ChristenUnie', u'D66', u'De Jong',
             u'Eerdmans/Van Schijndel', u'GPV', u'GroenLinks', u'Hendriks',
             u'Houwers', u'Klein', u'Kortenoeven/Hernandez', u'Kuzu/Öztürk',
             u'Lazrak', u'LN', u'LPF', u'Nawijn', u'Nijpels', u'PvdA', u'PvdD',
             u'PVV', u'RPF', u'SGP', u'SP', u'Unie 55+', u'Van Klaveren',
             u'Van Oudenallen', u'Van Vliet', u'Verdonk', u'Verkerk', u'VVD',
             u'Wijnschenk', u'Wilders']])
  </code></pre>
  
  <p>it returns this:</p>
  
  <pre><code>pandas.core.frame.DataFrame
  </code></pre>
  
  <p>Here's an image for further explanation:</p>
  
  <p><a href="https://i.stack.imgur.com/l9soy.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/l9soy.png" alt="pandas screenshot"></a></p>
  
  <p>Why is this not working?</p>