2021
03-30
03-30
pandas group分组与agg聚合的实例
如下:importpandasaspddf=pd.DataFrame({'Country':['China','China','India','India','America','Japan','China','India'],'Income':[10000,10000,5000,5002,40000,50000,8000,5000],'Age':[5000,4321,1234,4010,250,250,4500,4321]})构造的数据如下:AgeCountryIncome05000China1000014321China1000021234India500034010India50024250America400005250Japan5000064...
继续阅读 >