我有一個數據幀,數據列的值不會改變浮動
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