So basically I want select all rows where Col A is equal to the string 'hey'. My problem is that Col A can contain null/nan's therefore I get a
TypeError: invalid type comparison.
When executing:
df.loc[df['A'] == 'hey']
I then made another condition:
df.loc[df['A'].notnull() & (df['A'] == 'hey')]
Here i get the same error.
I made a hack where I change all the null values in Col A to '' but thats not beautiful is there anyway nice to first choose all the rows where Col A isn't null and then from there all the ones who are equal to 'hey'?