2020年3月31日

改变Dataframe的列的数据类型

摘要: 1、查看DataFrame的数据类型 df.dtypes#查看各列数据类型 df[A].dtypes#查看A列数据类型 2、转换DataFrame的数据类型 df[A].astypes(int)#将A列数据类型转换为intdata['note_n'] = pd.to_numeric(data['no 阅读全文

posted @ 2020-03-31 08:53 飞翔的南瓜 阅读(15540) 评论(0) 推荐(0) 编辑

导航