title: How to filter the blank rows with query function in Pandas condition with multiple column
body: <p>Hi I am trying to filter my dataframe with the condition that it should <code>filter</code> the rows based on column condition. so i want to <code>filter</code> all the rows which doesn't have any blank value in column (<code>AD65</code>) and also to <code>filter</code> only those rows which has value <code>&quot;Machine&quot;</code> in column <code>B14</code>. I tried with <code>Query</code> function in <code>Pandas</code> and is returning Empty data frame.
  I have tried filtering for non empty value condition and that's works okay.</p>
  <p>Here is my sample code:</p>
  <pre><code>df = pd.DataFrame(data, columns=['AD65', 'W70', 'B14'])
  print(df.query(&quot;AD65 == 'notnull' &amp; B14 == 'Machine'&quot;))  
  
  </code></pre>
  <p>I have tried this with boolean variable able to filter the rows with following code@</p>
  <pre><code># filters the rows in dataframe with non blank values for column AD65
  df_non_blank = df[df.AD65.notnull()]
  print(df_non_blank)
  
  df_MP_4 = df[df['B14'] == 'Machine']
  print(df_MP_4)
  </code></pre>
  <p>But I am not able to figure out how to put the &amp; condition to filter the above two.</p>
  <p><strong>Note</strong>: After filtering my rows based on above condition i want to iterate all my rows with for loop.
  Can i put the above filter condition in my while loop??</p>
  <p>I am confused with the pandas dataframe structure and condition and loop functions for it.</p>