Kurtosis on Pandas Dataframe doent work

ساخت وبلاگ

Vote count: 0

When I apply the kurtosis function on a pandas datafame I always get following error: "AttributeError: Cannot access callable attribute 'kurt' of 'DataFrameGroupBy' objects, try using the 'apply' method". The following sample code works with all other statistical functions (mean(), skew(), ...), but not with kurtosis.

df = pd.DataFrame([[0,1,1,0,0,1],[0,1,2,4,5]]).T
df.columns = ['a','b']
df.groupby('a').kurt()

Any idea how I can apply kurtosis after groupby ? Thanks !

asked 1 min ago

back soft...
ما را در سایت back soft دنبال می کنید

برچسب : نویسنده : استخدام کار backsoft بازدید : 311 تاريخ : جمعه 31 ارديبهشت 1395 ساعت: 18:41