I need to convert numeric values of a column (pandas data frame) to float, but they are in string format.
d = {'col1': ['1', '2.1', '3.1'],
'col2': ['yes', '4', '6'],
'col3': ['1', '4', 'not']}
Expected:
{'col1': [1, 2.1, 3.1],
'col2': ['yes', 4, 6],
'col3': [1, 4, 'not']}