خرید بک لینک

Vote count: 0

When I apply the kurtosis function on a pandas datafame I always get following error: "AttributeError: Caot 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

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

صفحه بندی