size = 2 # sample sizereplace = True # with replacementfn = lambda obj: obj.loc[np.random.choice(obj.index, size, replace),:]df.groupby('Group_Id', as_index=False).apply(fn)
欢迎分享,转载请注明来源:内存溢出
size = 2 # sample sizereplace = True # with replacementfn = lambda obj: obj.loc[np.random.choice(obj.index, size, replace),:]df.groupby('Group_Id', as_index=False).apply(fn)
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)