pandas.DatetimeIndex.nanosecond#

property DatetimeIndex.nanosecond[source]#

The nanoseconds of the datetime.

This attribute returns the nanosecond component of each datetime value in the DatetimeIndex. Values range from 0 to 999 (one nanosecond is one billionth of a second).

See also

DatetimeIndex.second

The seconds of the datetime.

DatetimeIndex.microsecond

The microseconds of the datetime.

Examples

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