pandas.Period.asfreq#
- Period.asfreq()#
Convert Period to desired frequency, at the start or end of the interval.
- Parameters:
- freqstr, BaseOffset
The desired frequency. If passing a str, it needs to be a valid period alias.
- how{‘E’, ‘S’, ‘end’, ‘start’}, default ‘end’
Start or end of the timespan.
- Returns:
- resampledPeriod
Examples
>>> period = pd.Period('2023-1-1', freq='D') >>> period.asfreq('H') Period('2023-01-01 23:00', 'H')