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
# It is possible to use anchor suffix for weeksoff1=pd.tseries.frequencies.to_offset('1W-SUN')
# The anchor does effect when using period_range() or creating a periodts_start=pd.Timestamp('2020-03-25 10:00') # ts_start is a Wednesdayp1=pd.Period(ts_start, freq=off1)
# Anchor is working: p1 with weekly frequency starts a Mondayp1.start_time>>>Out: Timestamp('2020-03-23 00:00:00')
# But it doesn't work with '4H' frequencyoff2=pd.tseries.frequencies.to_offset('4H')
# No anchor (expecting one with reference being midnight)off2.is_anchored()
>>>Falsep2=pd.Period(ts_start, freq=off2)
# Expecting '2020-03-25 08:00:00'p2.start_time>>>Timestamp('2020-03-25 10:00:00')
# Trying syntax similar to weekly anchoringoff3=pd.tseries.frequencies.to_offset('4H-0')
>>>ValueError: Invalidfrequency: 4H-0
Problem description
Please, can anchoring suffix be made available for hours, using midnight as the reference point?
Thanks for your feebdack,
Have a good day,
Bests,
The text was updated successfully, but these errors were encountered:
yohplala
changed the title
feature request: anchoring suffix for hours
Feature request: anchoring suffix for hours
Mar 31, 2020
Code Sample, a copy-pastable example if possible
Problem description
Please, can anchoring suffix be made available for hours, using midnight as the reference point?
Thanks for your feebdack,
Have a good day,
Bests,
The text was updated successfully, but these errors were encountered: