python sample函数_Python pandas.DataFrame.sample函数方法的使用
DataFrame.sample(n=None,frac=None,replace=False,weights=None,random_state=None,axis=None)[source]从对象轴返回随机的项目样本。您可以使用random_state来实现重现性。参数:n:int,可选从轴返回的项目数。不能与frac一起使用。如果frac=None,则Default=1。frac:float