I want to remove rows from my dataframe that contains a string value for a float dtype column. For example if I have an amount field, I want to remove all rows in the dataframe that contains a value of "NA" in the amount field.
So far I've tried the following -
to_drop = ['NA']
data = data[~data['gross'].isin(to_drop)]
and
data = data[data.gross.str != 'NA']
I get "an only use .str accessor with string values, which use np.object_ dtype in pandas".
What is the correct way to do this ?