I am trying to filter out some rows in my dataframe (with > 400000 rows) where values in one column have the None type. The goal is to leave my dataframe with only rows that have values that are float in the 'Column' column. I plan on doing this by passing in an array of booleans, except that I can't construct my array of booleans properly (they all come back True).
When I run the following operation, given a value of i within the df range, the comparison works:
df.loc[i, 'Column'] != None
The rows that have a value of None in 'Column' give the results False.
But when I run this operation:
df.loc[0:len(df), 'Column'] != None
The boolean array comes back as all True.
Why is this? Is this a pandas bug? An edge case? Intended behaviour for reasons I don't understand?
I can think of other ways to construct my boolean array, though this seems the most efficient. But it bothers me that this is the result I am getting.