Why is df.resample()
changing the dates when I resample?
X
What I want this to do is insert one row with index '2014-07-01' and value NaN.
X.resample('12M').last()
Why is df.resample()
changing the dates when I resample?
X
What I want this to do is insert one row with index '2014-07-01' and value NaN.
X.resample('12M').last()
Try with MS
out = df.resample('12MS').first()
Out[33]:
0
2014-07-01 1.0
2015-07-01 NaN
2016-07-01 2.0
2017-07-01 3.0