【问题标题】:How to solve AttributeError: module 'pandas' has no attribute 'ewma'? [duplicate]如何解决 AttributeError:模块 'pandas' 没有属性 'ewma'? [复制]
【发布时间】:2019-06-14 15:57:16
【问题描述】:

我面临 Pandas 版本的属性错误:0.24.2

expwighted_avg = pd.ewma(ts_log, halflife=12)
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-67-cbd5d537822b> in <module>()
----> 1 expwighted_avg = pd.ewma(ts_log, halflife=12)

AttributeError: module 'pandas' has no attribute 'ewma'

【问题讨论】:

标签: python-3.x pandas


【解决方案1】:

对我来说现在它的工作和代码运行成功

    expwighted_avg = ts_log.ewm(halflife=12).mean()

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2022-06-21
    • 2021-10-15
    • 2020-09-07
    • 2021-12-27
    • 2022-07-18
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多