首页 > 其他 > 详细

行处理——运算

时间:2016-01-14 00:53:01      阅读:137      评论:0      收藏:0      [点我收藏+]

pandas

  • 求和
column_list = [Fiber_TD_(g), Sugar_Tot_(g)]
# Let‘s sum up the total amount of fiber and sugar across all the foods.
total = food_info[column_list].sum(axis=0)
# result has two values, one is the taotal fiber of all foods, the other is the total sugar of all foods

 

行处理——运算

原文:http://www.cnblogs.com/arsh/p/5128906.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!