df['cum_sum'] = df.val1.cumsum()
df['cum_perc'] = 100*df.cum_sum/df.val1.sum()
posted on 2017-01-10 11:10  ppqchina  阅读(618)  评论(0编辑  收藏  举报