.resample在Pandas
0.18.0中,to的接口已更改为更像groupby,因此更加灵活,即
resample不再返回Dataframe:现在在聚合或插值时对其进行“惰性评估”。
我建议阅读重新采样API的更改http://pandas.pydata.org/pandas-
docs/stable/whatsnew.html#resample-api
也可以看看:
http://pandas.pydata.org/pandas-docs/stable/timeseries.html#resampling
http://pandas.pydata.org/pandas-docs/stable/generated/pandas.Dataframe.resample.html
用于升级
df.resample("1D").interpolate()缩小规模
用均值
df.resample("1D").mean()使用OHLC
即开高低关值或第一最大最小最后值
df.resample("1D").ohlc()


