在 Pandas 中如果我们想更改数据保存格式。例如,从redis中我们获得数据open 为字符串类型 ‘str’,而在实际计算过程中我们希望使用是float32或float64格式数据。那么以下那个方法可以帮助我们做到这样功能:
- A.asint()
- B.asfloat()
- C.convert(‘float’)
- D.astype(‘float’)
正确答案及解析
正确答案
D
解析
暂无解析
在 Pandas 中如果我们想更改数据保存格式。例如,从redis中我们获得数据open 为字符串类型 ‘str’,而在实际计算过程中我们希望使用是float32或float64格式数据。那么以下那个方法可以帮助我们做到这样功能: