How to covert a DataFrame column containing strings and NaN values to floats. And there is another column whose values are strings and floats; how to convert th
NaN
you have to replace empty strings ('') with np.nan before converting to float. ie:
df['a']=df.a.replace('',np.nan).astype(float)