【python 分組累加求和】快速叫你分組求和和分組累加求和

# -*- encoding=utf-8 -*- import pandas as pd data=['abc','abc','abc','asc','ase','ase','ase'] num=[1,2,2,1,2,1,2] df1=pd.DataFrame({'name':data,'num':num}) print(df1) df1['mmm']=df1['num'] df2=df1.gr
相關文章
相關標籤/搜索