I have a dataset train with more than 16k observation.I have a variable fare_amount and i want to filter out all the negative values that are present in the variable.
- fare_amount 0 4.5 1 16.9 2 5.7 3 7.7 4 5.3 5 12.1 6 7.5 7 16.5 9 8.9 10 0 11 5.5 12 4.1 13 7.0 . . . . 16065
train.isnull().sum().sort_values(ascending=False)
train = train.drop(train[train.isnull().any(1)].index, axis = 0)
from collections import Counter
Counter(int(train['fare_amount'])<0)
```TypeError: cannot convert the series to <class 'int'>
want to remove all the values that are less than 0
keep getting an error
TypeError: cannot convert the series to <class 'int'>