我尝试了这个解决方案但它并没有真正解决我的问题
x = ['a', 'b', 'c', 'd', 'e', 'f']
y = np.array(['10', '20', '30', '40', '50', '60'])
z = np.array(['x', 'y', 'z', 'f', 'b', 's'])
df_vaex = vaex.from_arrays(x=x, y=y, z=z)
df_vaex.y = df_vaex.y.astype('float64')
print(df_vaex.dtypes)
输出
x <class 'str'>
y <class 'str'>
z <class 'str'>
dtype: object
如何将字符串列转换为数字?谢谢。