I am trying to create a period range with a frequency of 25 hours. I noticed that this works fine:
p1 = pd.period_range('2016-01-01 10:10', freq = '25H', periods = 10)
In particular, it produces the expected result:
PeriodIndex(['2016-01-01 10:00', '2016-01-02 11:00', '2016-01-03 12:00',
'2016-01-04 13:00', '2016-01-05 14:00', '2016-01-06 15:00',
'2016-01-07 16:00', '2016-01-08 17:00', '2016-01-09 18:00',
'2016-01-10 19:00'],
dtype='int64', freq='25H')
However, I can't make this work as a variant of 1 day + 1 hour:
pd.period_range('2016-01-01 10:10', freq = '1D1H', periods = 10)
This actually produces:
PeriodIndex(['1971-12-02 01:00', '1971-12-02 02:00', '1971-12-02 03:00',
'1971-12-02 04:00', '1971-12-02 05:00', '1971-12-02 06:00',
'1971-12-02 07:00', '1971-12-02 08:00', '1971-12-02 09:00',
'1971-12-02 10:00'],
dtype='int64', freq='25H')
It has the right frequency, but the wrong offset, starting at 1971 as though I had not passed a starting time. Why is this and what is the correct way to create this sort of combined frequency?