更新时间:2021-12-20 06:54:41
要通过参考索引重新采样,请使用 reindex
。
To resample by a reference index, use reindex
.
In [11]: b.reindex(a.index, method='ffill')
Out[11]:
0 1 2 3
2012-03-16 -926 -625 736 457
2012-03-19 -1024 742 732 -1020
2012-03-20 -1024 742 732 -1020
2012-03-21 1090 -1163 1652 -94