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
Post a Comment