2024-04-25 04:41:31 发布
网友
我有一个csv数据集想把文本转换成数字,他们有什么功能可以用还是用excel功能? 我试着用 pd.to_numeric(x,errors='coerce'.isnull())而那不起作用也有人试图使用data['MainCategory'] = data['MainCategory'].astype(float)
pd.to_numeric(x,errors='coerce'.isnull())
data['MainCategory'] = data['MainCategory'].astype(float)
在python中: yourString = float(yourString)
yourString = float(yourString)
在VBA中:
yourString = CDbl(yourString)
如果你想把“2”转换成int 2,这里有一个很好的例子:Is there a way to convert number words to Integers?
在python中:
yourString = float(yourString)
在VBA中:
如果你想把“2”转换成int 2,这里有一个很好的例子:Is there a way to convert number words to Integers?
相关问题 更多 >
编程相关推荐