首页 > 其他 > 详细

列处理——列间运算

时间:2016-01-13 23:26:41      阅读:240      评论:0      收藏:0      [点我收藏+]

基于pandas

# Adding up all of the fat columns.
# food_info is a dataframe
# Adding two columns will go through and add each value at each position to the corresponding value in the same position.
total_fat = food_info["FA_Sat_(g)"] + food_info["FA_Mono_(g)"] + food_info["FA_Poly_(g)"]

 

列处理——列间运算

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

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