标签:ret reg dataframe argmin frame val city return randn
frame = DataFrame(np.random.randn(4,3),columns=list(‘bde‘),index=[‘Utah‘,‘Ohio‘,‘Texas‘,‘Oregon‘])
def f4(x):
return DataFrame({‘value‘:{‘min‘:x.min(),‘max‘:x.max()},‘city‘:{‘min‘:x.argmin(),‘max‘:x.argmax()}})
f4(frame[‘b‘])
标签:ret reg dataframe argmin frame val city return randn
原文地址:https://www.cnblogs.com/ziheIT/p/9050813.html