I have a pandas df and I want to remove non-numeric values of col1
.
If I use df[df.col1.apply(lambda x: x.isnumeric())]
, I get the following error:
AttributeError: 'float' object has no attribute 'isnumeric'
any suggestion on doing this efficiently in pandas?