2018-12-10
阅读量:
695
时间序列
pandas具有简单,强大且高效的功能,用于在频率转换期间执行重采样操作(例如,将第二数据转换为5分钟数据)。这在财务应用程序中非常常见,但不仅限于此。
rng = pd.date_range('1/1/2012', periods=100, freq='S')
ts = pd.Series(np.random.randint(0, 500, len(rng)), index=rng)
ts.resample('5Min').sum()
2012-01-01 25083
Freq: 5T, dtype: int64






评论(0)


暂无数据
推荐帖子
0条评论
0条评论
0条评论