I am trying to convert a column of Object dtype to float64
Pandas version - 2.21
I tried using convert_objects() to force rows that cannot convert to NaN and was successful at converting my column to a float64
I want to know what rows/data did not allow me to convert it into a float64. Is there a function out their that can do that ?
For example :
col1
2015
2016
NaN
NaN
3005
i_am_a_string
4006
another_string
5008
4005
df['col1'].astype(float64)
FAILED!! because the column has string data and cannot convert them all to float64
My desired output I want to see those strings
i_am_a_string
another_string