python C 关于Pandas Dataframe的Kurtosis doent工作
发布时间:2023-12-16 22:29:58 所属栏目:Python 来源:DaWei
导读: 当我在pandas datafame上应用kurtosis函数时,我总是得到以下错误:
AttributeError: Cannot access callable attribute ‘kurt’ of
‘DataFrameGroupBy’ objects,try using
AttributeError: Cannot access callable attribute ‘kurt’ of
‘DataFrameGroupBy’ objects,try using
当我在pandas datafame上应用kurtosis函数时,我总是得到以下错误: AttributeError: Cannot access callable attribute ‘kurt’ of 以下示例代码适用于所有其他统计函数(mean(),skew(),…),但不适用于峰度. df = pd.DataFrame([[0,1,1],[0,2,4,5]]).T df.columns = ['a','b'] df.groupby('a').kurt()知道如何在groupby之后应用kurtosis吗? 这应该工作: df.groupby('a').apply(pd.DataFrame.kurt)(编辑:商洛站长网) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
推荐文章
站长推荐
- python – 参数如何通过__getattr__传递给一个函
- python – 递归地按键对嵌套的OrderedDict进行排
- python – UnicodeDecodeError:’utf8’编解码器
- python C 关于Pandas Dataframe的Kurtosis doent
- 有没有办法找出文件的名称stdout被重定向到Pytho
- python – web2py插入方法
- python – 带smtp.gmail的Django电子邮件SMTPAut
- python中__call__内置函数用法实例
- 如何将Python的GTK与gevent集成?
- python – Matplotlib显示多个图像与for循环