首页  >  问答  >  正文

python - pandas的series能否给小数设置精度

在多个文件中,使用grouped.sum()做同index加和之后,会出现多位小数点的情况,这样的情况怎么处理,不能用float(SERIES)强制格式化这个series

巴扎黑巴扎黑2719 天前893

全部回复(1)我来回复

  • ringa_lee

    ringa_lee2017-04-18 09:52:20

    这个说明Series里的数据格式本来就是float
    要么用astype函数转换类型

    回复
    0
  • 取消回复