/Users/mac/PycharmProjects/gitproject/stock/jishu_stock/fGeShiBaFa/test1.py:41: FutureWarning: how in .resample() is deprecated
the new syntax is .resample(…)..apply(<func>)
period_stock_data[‘change’] = stock_data[‘change’].resample(period_type, how=lambda x: (x+1.0).prod() – 1.0)
/Users/mac/PycharmProjects/gitproject/stock/jishu_stock/fGeShiBaFa/test1.py:43: FutureWarning: how in .resample() is deprecated
the new syntax is .resample(…).first()
period_stock_data[‘open’] = stock_data[‘open’].resample(period_type, how = ‘first’)
这是一个警告, 不影响我们使用
解决方案:
period_stock_data[‘open’] = stock_data[‘open’].resample(period_type).first()