You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
>>>index=pd.date_range('2012-1-1', '2013-12-31')
>>>np.random.seed(1)
>>>data=np.random.randint(0, 10, len(index))
>>>s=pd.Series(index=index, data=data)
>>>s.resample('Q').sum()
2012-03-314572012-06-304042012-09-304012012-12-314152013-03-313832013-06-303822013-09-303982013-12-31387Freq: Q-DEC, dtype: int64>>>s.resample('Q-DEC').sum() # same as above>>>s.resample('QS').sum() # defaults to QS-JAN2012-01-014572012-04-014042012-07-014012012-10-014152013-01-013832013-04-013822013-07-013982013-10-01387Freq: QS-JAN, dtype: int64>>>s.resample('QS-DEC').sum()
2011-12-012992012-03-014272012-06-013812012-09-014382012-12-013862013-03-013962013-06-013752013-09-014142013-12-01111Freq: QS-DEC, dtype: int64
Problem description
The docs have
(B)Q(S)-DEC
quarterly frequency, year ends in December. Same as ‘Q’
But QS is the same as QS-JAN not December. The same thing for AS.
The text was updated successfully, but these errors were encountered:
tdpetrou
changed the title
DOCS: Anchored Offset Starting Quarter and Year defaults to JAN not DEC
DOC: Anchored Offset Starting Quarter and Year defaults to JAN not DEC
Oct 4, 2017
I'm confused. That issue doesn't appear to have anything to do with this. The docs seem clearly wrong. The docs inform the user that QS defaults to QS-DEC. It does not. It defaults to QS-JAN.
Code Sample, a copy-pastable example if possible
Problem description
The docs have
But QS is the same as QS-JAN not December. The same thing for AS.
The text was updated successfully, but these errors were encountered: