Data column values are not changing to float
问题 I have a dataframe, df, Name Stage Description 0 sri 1 sri is one of the good singer in this two 1 nan 2 thanks for reading 2 ram 1 ram is two of the good cricket player 3 ganesh 1 one driver 4 nan 2 good buddies tried df["Stage"]=pd.to_numeric(df["Stage"],downcast="float") but still the values are same 回答1: You can use df.Stage.astype(float) : In [6]: df.Stage.astype(float) Out[6]: 0 1.0 1 2.0 2 1.0 3 1.0 4 2.0 Name: Stage, dtype: float64 In [7]: df.Stage.astype(float) Using pd.to_numeric is