title: Find Indexes of a List of DataFrame that have NaN Values - Pandas
body: <p>I have a list of Data Frames in which some Data Frames have <code>NaN</code> values. So far I can identify <code>NaN</code> values for a single Data Frame using this <a href="https://stackoverflow.com/questions/36226083/how-to-find-which-columns-contain-any-nan-value-in-pandas-dataframe-python">link</a>. </p>
  
  <p>How can I find the index of the list where a Data Frame has <code>NaN</code> values.</p>
  
  <p>Sample list of <code>dffs</code>,</p>
  
  <pre><code>[                   
   var1       var1  
  14.171250  13.593813
  13.578317  13.595329
  10.301850  13.580139
  9.930217   NaN
  6.192517   13.561943
  NaN        13.565149
  6.197983   13.572509,  
  
    var1       var2    
  2.456183  5.907528
  5.052017  5.955731
  5.960000  5.972480
  8.039317  5.984608
  7.559217  5.985348
  6.933633  5.979438,
  
   var1       var1  
  14.171250  23.593813
  23.578317  23.595329
  56.301850  23.580139
  90.930217   22.365676
  89.192517   33.561943
  86.23654   53.565149
  NaN        13.572509,  
  ...]
  </code></pre>
  
  <p>I need to get the results in a list <code>indexes</code> <code>0</code> and <code>2</code> that have <code>NaN</code> values.</p>
  
  <p>So far I tried this,</p>
  
  <pre><code>df_with_nan = []
  for df in dffs:
      df_with_nan.append(df.columns[df.isnull().any()])
  </code></pre>
  
  <p>Per above <code>for</code> loop I get column names, <code>var1</code> and <code>var2</code>. However, I need the indexes of those Data Frames when i loop through it. Any help or suggestion would be great.</p>