A RetroSearch Logo

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

Search Query:

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

pandas.PeriodIndex.end_time — pandas 2.3.1 documentation

pandas.PeriodIndex.end_time#
property PeriodIndex.end_time[source]#

Get the Timestamp for the end of the period.

Returns:
Timestamp

Examples

For Period:

>>> pd.Period('2020-01', 'D').end_time
Timestamp('2020-01-01 23:59:59.999999999')

For Series:

>>> period_index = pd.period_range('2020-1-1 00:00', '2020-3-1 00:00', freq='M')
>>> s = pd.Series(period_index)
>>> s
0   2020-01
1   2020-02
2   2020-03
dtype: period[M]
>>> s.dt.end_time
0   2020-01-31 23:59:59.999999999
1   2020-02-29 23:59:59.999999999
2   2020-03-31 23:59:59.999999999
dtype: datetime64[ns]

For PeriodIndex:

>>> idx = pd.PeriodIndex(["2023-01", "2023-02", "2023-03"], freq="M")
>>> idx.end_time
DatetimeIndex(['2023-01-31 23:59:59.999999999',
               '2023-02-28 23:59:59.999999999',
               '2023-03-31 23:59:59.999999999'],
               dtype='datetime64[ns]', freq=None)

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