title: Dropping Nulls and Slicing from Pivoted Table in Pandas
body: <p>I'm having trouble slicing my pivoted data frame so that I get results above a certain threshold. I'm trying to filter out results that fall below a minimum value. My data frame looks like so:</p>
  
  <pre><code>                                                                                    Qty                             
  Index   Store_Nbr   201712  201801  201802  201803  201804  201805  201806  201807  201808
  0               1      356     275     293     256     313     421     493     291     385
  1               2      147     316     343     416     361     483     438     136     461
  2               3      266     370     162     346     451     414     296     478     295
  3               4      322     179     353     241     370     247     423     391     194
  4               5      249     389     480     450     102     482     137     251     153
  ...            ...     ...     ...     ...     ...     ...     ...     ...     ...     ...
  30             30        0       0       0       0       0       0       0       0       0
  31             31        0       0       0       0       0       0       0       0       0
  32             32        0       0       0       0       0       0       0       0       0
  33             33      392     311     151     488     135     239     212     104     122
  34             34        0       0       0       0       0       0       0       0      -1
  </code></pre>
  
  <p>After using <code>godzilla = godzilla[godzilla['Qty'] &gt; 150]</code> I get the below data frame where it has converted all of the zero to nulls and hasn't filtered out anything. </p>
  
  <pre><code>                                                                                     Qty                                
  Index   Store_Nbr   201712   201801  201802  201803  201804  201805  201806  201807  201808
  0             NaN      NaN      275     293     256     313     421     493     291     385
  1             NaN      147      316     343     416     361     483     438     136     461
  2             NaN      266      370     162     346     451     414     296     478     295
  3             NaN      NaN      179     353     241     370     247     423     391     194
  4             NaN      389      480     450     102     482     137     251     153     153
  ...           ...     ...       ...     ...     ...     ...     ...     ...     ...     ...
  30            NaN      NaN      NaN     NaN     NaN     NaN     NaN     NaN     NaN     NaN
  31            NaN      NaN      NaN     NaN     NaN     NaN     NaN     NaN     NaN     NaN
  32            NaN      NaN      NaN     NaN     NaN     NaN     NaN     NaN     NaN     NaN
  33            NaN      NaN      311     151     488     135     239     212     104     122
  34            NaN      NaN      NaN     NaN     NaN     NaN     NaN     NaN     NaN     NaN
  </code></pre>
  
  <p>I've tried doing <code>godzilla.dropna(axis = 0, inplace = True, how = 'any')</code> which returns an empty dataframe and  <code>godzilla = godzilla.dropna( subset = godzilla['Qty'])</code> which returns a KeyError: 'Qty'. I'm baffled that it converted zeroes in nulls and why the slice isn't working. Any words of wisdom when trying to filter/slice pivoted data?</p>
  
  <p>Note** That I have more than Qty being pivoted in the data frame.</p>