我有一个数据帧,数据列的值不会改变浮动
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")
但仍值是相同
我想你需要'DF [ “舞台”] = pd.to_numeric(DF [ “舞台”],错误= “要挟”) ' – jezrael
我想要浮点数 – pyd
尝试过df [“Stage”] = pd.to_numeric(df [“Stage”],errors =“coerce”)但仍然一样 – pyd