Find pd.DataFrame cell that has the value of None
<p>I have a <code>pd.DataFrame</code> that looks like this:</p>

<pre><code>index  A        B
0      apple    bear
0      axis     None
0      ant      None
0      avocado  None
</code></pre>

<p>and my goal is to simple drop those row if they have <code>None</code> in the B column.</p>

<p>I tried <code>df[df['B'] != None]</code> but pandas returns me the exact same DataFrame without deleting the rows. And <code>df[df['B'] == None]</code> gives only an empty DataFrame.</p>

<p>Is this the correct way of trying to match the None value? I am not sure what is going on but <code>test = None</code> and then <code>test == None</code> works fine (returns True). Any thoughts are appreciated!</p>

<p>You could try this:</p>

<pre><code>df.dropna(subset=["B"])
</code></pre>

python pandas dataframe