In a DF, I have a column that contains float
, str
, None
and nan
values.
I would like to round only the float
values without affecting the others. I tried to use a mask to access only the float
values, but did not succeed.
I would prefer it if the solution could use native pandas
functions instead of iteration.
Sample of my data:
index Column A Column B
1 57:24.1 98.67799997
2 57:24.1 58.67799997
3 57:53.8 95.66000009
4 358:23.4 210.68099999
5 None 35.10
6 25.06778 None
7 99999.565656 Abc
8 abc None