代码之家  ›  专栏  ›  技术社区  ›  roberto.sannazzaro

熊猫:不能进口滚轴

  •  2
  • roberto.sannazzaro  · 技术社区  · 6 年前

    我正在尝试使用gpxpy和 this 项目,但在尝试导入时 smoo1 oceans 我遇到此错误的库: from pandas import rolling_mean ImportError: cannot import name 'rolling_mean' 我试图阅读并修复这个错误,但据我所知,库试图导入一个已贬值的函数。我不知道在这种情况下该怎么办。 我使用的是python 3.6。

    1 回复  |  直到 6 年前
        1
  •  2
  •   cs95 abhishek58g    6 年前

    这个 rolling_* 为了支持新的 Rolling API。

    df['column'].rolling(window=x).mean()