Python Pandas,将iloc切换为float

时间:2017-02-21 11:12:37

标签: python pandas

我用

Report.iloc[:,6:] = Report.iloc[:,6:].astype(float)

将这些列转换为float。 问题是,在我的代码文件中使用时它不会更改报告。但是当我在控制台中使用它时,它可以工作。

Report.iloc[:,6:] = Report.iloc[:,6:].astype(float)
Report.info()

0 个答案:

没有答案