groupby:
import random import numpy as np random.seed() df = pd.DataFrame({'data':['a', 'a', 'b', 'b', 'a'], 'num':['one', 'two', 'one', 'two', 'one'], 'data1':np.random.randn(5), 'data2':np.random.randn(5)})
标签:--,random,two,groupby,np,import,pandas From: https://www.cnblogs.com/yu121/p/17469562.html