pandas.Period.asfreq

pandas 3.1.1 · Arrays, scalars, and data types · method

Conform the object to a frequency. Use resample to aggregate observations into time bins.

Call syntax

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

Run the example

Edit the example and select Run Python to see the result.

Parameters

ParameterRequirementAccepted values and behavior
freq Required
Positional or keyword
str, DateOffset

Specify the frequency or offset, such as "D" for a day or "MS" for a calendar month start.

how Optional
Positional or keyword
Default 'E'
{'end', 'start', 'e', 's'}

Choose a policy such as a join type or a missing-value removal rule.

Returns

Period · Period object with the specified frequency, aligned to the parameter.