Home  >  Q&A  >  body text

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

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

巴扎黑巴扎黑2719 days ago890

reply all(1)I'll reply

  • ringa_lee

    ringa_lee2017-04-18 09:52:20

    This shows that the data format in Series is originally float
    or use astypefunction to convert the type

    reply
    0
  • Cancelreply