让我保存我有两个时间序列数据的DataFrame。
如何用最后一个有效值填写NaN?
所以,
2014-01-23 07:00:00.698708 428.75 NaN
2014-01-23 07:00:19.783769 428.75 NaN
2014-01-23 07:00:22.089900 429.00 NaN
2014-01-23 07:00:22.089900 429.00 NaN
2014-01-23 07:00:22.096339 429.00 NaN
2014-01-23 07:00:15.991013 NaN 1283.75
2014-01-23 07:00:25.280246 NaN 1284.00
2014-01-23 07:00:31.746926 NaN 1284.00
2014-01-23 07:00:31.747813 NaN 1284.00
2014-01-23 07:00:50.055061 NaN 1284.00
2014-01-23 07:00:56.467059 NaN 1284.25
应该是:
2014-01-23 07:00:00.698708 428.75 NaN
2014-01-23 07:00:19.783769 428.75 NaN
2014-01-23 07:00:22.089900 429.00 NaN
2014-01-23 07:00:22.089900 429.00 NaN
2014-01-23 07:00:22.096339 429.00 NaN
2014-01-23 07:00:15.991013 429.00 1283.75
2014-01-23 07:00:25.280246 429.00 1284.00
2014-01-23 07:00:31.746926 429.00 1284.00
2014-01-23 07:00:31.747813 429.00 1284.00
2014-01-23 07:00:50.055061 429.00 1284.00
2014-01-23 07:00:56.467059 429.00 1284.25
谢谢!