Pandas: 无法导入 rolling_mean
Pandas: Cannot import rolling_mean
我正在尝试使用 gpxpy 和 this 项目解析一些坐标,但是当尝试从 oceans
库导入 smoo1
时,我遇到了这个错误:
from pandas import rolling_mean
ImportError: cannot import name 'rolling_mean'
我试图阅读有关此错误的信息并修复它,但据我所知,该库试图导入一个已贬值的函数。我不确定在这种情况下该怎么做。
我正在使用 python 3.6.
rolling_*
函数已被弃用,取而代之的是新的 Rolling
API。
df['column'].rolling(window=x).mean()
我正在尝试使用 gpxpy 和 this 项目解析一些坐标,但是当尝试从 oceans
库导入 smoo1
时,我遇到了这个错误:
from pandas import rolling_mean
ImportError: cannot import name 'rolling_mean'
我试图阅读有关此错误的信息并修复它,但据我所知,该库试图导入一个已贬值的函数。我不确定在这种情况下该怎么做。
我正在使用 python 3.6.
rolling_*
函数已被弃用,取而代之的是新的 Rolling
API。
df['column'].rolling(window=x).mean()