pandas.DatetimeIndex.second#

property DatetimeIndex.second[source]#

The seconds of the datetime.

This attribute returns the second component of each datetime value in the DatetimeIndex.

See also

DatetimeIndex.minute

The minutes of the datetime.

DatetimeIndex.microsecond

The microseconds of the datetime.

DatetimeIndex.nanosecond

The nanoseconds of the datetime.

Examples

>>> idx = pd.date_range("2000-01-01", periods=3, freq="s")
>>> idx.second
Index([0, 1, 2], dtype='int32')