未来警告:时刻.u适用

2024-07-02 10:09:25 发布

您现在位置:Python中文网/ 问答频道 /正文

有人能帮我把下面的代码改成新的格式吗。我寻找一个解决办法,并试图解决它,但我没有得到它。谢谢

from pandas.stats import moments
dn = 100 * moments.rolling_apply(pricelow, ndays + 1, lambda x: x.argmin()) / ndays
332: FutureWarning: pd.rolling_apply is deprecated for Series and will be removed in a future version, replace with 
        Series.rolling(window=30,center=False).apply(func=<function>,args=<tuple>,kwargs=<dict>)
  dn = 100 * moments.rolling_apply(pricelow, ndays + 1, lambda x: x.argmin()) / ndays

Tags: lambda代码frompandas格式statsseriesapply