I have the following column in pandas DataFrame:
col1
1.2
1.4
3.1
aa
bb
NaN
I need to calculate the minimum value in the column col1
while ignoring all empty and non-numeric values.
If I do df[col1].min()
, it only ignores empty values, but I still get this error:
TypeError: '<=' not supported between instances of 'float' and 'str'