pandas.Period.to_timestamp

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

Represent a period by a timestamp at its start or end.

Call syntax

Period.to_timestamp(freq=None, how='start')

Run the example

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

Parameters

ParameterRequirementAccepted values and behavior
freq Optional
Positional or keyword
Default None
str or 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 'start'
{'start', 'end', 's', 'e'}

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

Returns

Timestamp