- API reference
- pandas arrays, scalars, and data types
- pandas.Perio...
pandas.Period.to_timestamp#
- Period.to_timestamp(freq=None,how='start')#
Return the Timestamp representation of the Period.
Uses the target frequency specified at the part of the period specifiedbyhow, which is eitherStart orFinish.
- Parameters:
- freqstr or DateOffset
Target frequency. Default is ‘D’ if self.freq is week orlonger and ‘S’ otherwise.
- howstr, default ‘S’ (start)
One of ‘S’, ‘E’. Can be aliased as case insensitive‘Start’, ‘Finish’, ‘Begin’, ‘End’.
- Returns:
- Timestamp
Examples
>>>period=pd.Period('2023-1-1',freq='D')>>>timestamp=period.to_timestamp()>>>timestampTimestamp('2023-01-01 00:00:00')
On this page