Skip to main content
`Ctrl`+`K`

# pandas.Period.asfreq

Period.asfreq(freq, how='E')

  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')