【Python3】查看/转换DataFrame数据类型

  1. 查看DataFrame的数据类型
    df.dtypes#查看各列数据类型
    df[A].dtypes#查看A列数据类型
    
  2. 转换DataFrame的数据类型
    df[A].astypes(int)#将A列数据类型转换为int
    

我们下次再见,如果还有下次的话!!!
欢迎关注微信公众号:516数据工作室
516数据工作室

猜你喜欢

转载自blog.csdn.net/Asher117/article/details/84941157