When I apply the kurtosis function to pandas datafame, I always get the following error:
AttributeError: cannot access attribute "kurt" DataFrameGroupBy objects, try using the 'apply' method
The following code example works with all other statistical functions (mean (), skew (), ...), but not with an excess.
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 an excess after a group? Thanks!
source share