Skip to main content
`Ctrl`+`K`

# pandas.Series.dt.end_time

Series.dt.end_time

  Get the Timestamp for the end of the period.

  This property returns the exact end time of the period as a Timestamp. The returned timestamp represents the last possible moment within the period (e.g., 23:59:59.999999 for a daily period).

  Returns:
    Timestamp

  See also

  `Period.start_time`

    Return the start Timestamp.

  `Period.dayofyear`

    Return the day of year.

  `Period.daysinmonth`

    Return the days in that month.

  `Period.dayofweek`

    Return the day of the week.

  Examples

  For Period:

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

  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.999999
      1   2020-02-29 23:59:59.999999
      2   2020-03-31 23:59:59.999999
      dtype: datetime64[us]

  For PeriodIndex:

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