python 3.x - deference between df.describe and df.describe() -


import pandas pd import numpy np dates =pd.date_range('20150501',periods=5) df =pd.dataframe(np.random.randn(5,4),index=dates,columns="i know example".split()) 

df.describe() giving different results compared df.describe. please explain me difference between these modules.

df.describe method (you can think of 'pointer method' in other languages). df.describe() calls method, , returns result.

p = df.describe p() df.describe() 

in example above, p() , p.describe() execute same action


Comments

Popular posts from this blog

android - questions about switching from C2DM to GCM -

c++ - Qt setGeometry: Unable to set geometry -

batch file - How to extract all multi-volume RAR archives from subfolders of a folder? -