A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://pandas.pydata.org/docs/reference/api/pandas.PeriodIndex.to_timestamp.html below:

pandas.PeriodIndex.to_timestamp — pandas 2.3.1 documentation

pandas.PeriodIndex.to_timestamp#
PeriodIndex.to_timestamp(freq=None, how='start')[source]#

Cast to DatetimeArray/Index.

Parameters:
freqstr or DateOffset, optional

Target frequency. The default is ‘D’ for week or longer, ‘s’ otherwise.

how{‘s’, ‘e’, ‘start’, ‘end’}

Whether to use the start or end of the time period being converted.

Returns:
DatetimeArray/Index

Examples

>>> idx = pd.PeriodIndex(["2023-01", "2023-02", "2023-03"], freq="M")
>>> idx.to_timestamp()
DatetimeIndex(['2023-01-01', '2023-02-01', '2023-03-01'],
dtype='datetime64[ns]', freq='MS')

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4