码迷,mamicode.com
首页 > 其他好文 > 详细

行处理——运算

时间:2016-01-14 00:53:17      阅读:162      评论: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
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!