in my dataframe, I want to select the rows for which image_text
is neither an empty string nor a NaN value. When I said df.dropna(subset = ['image_text'], inplace= True)
I can reach NaN values so it works. Non of these 3 commands work:
df[(df.image_text!='')|(df['image_text'].notna())]
df[(df.image_text!='')|(math.isnan(df['image_text'])==False)]
df[(df.image_text!='')|(np.isnan(df['image_text'])==False)]
I would like to add another condition after or and reach NaN values. So that I can do the whole filtering in a single command. Is there any way to do it?
Thanks :)