pandas.TimedeltaIndex.nanoseconds#
- property TimedeltaIndex.nanoseconds[source]#
Number of nanoseconds (>= 0 and less than 1 microsecond) for each element.
This attribute returns the nanoseconds component of each timedelta value, which is the number of nanoseconds remaining after subtracting whole microseconds. Values range from 0 to 999.
See also
Series.dt.secondsReturn number of seconds for each element.
Series.dt.microsecondsReturn number of microseconds for each element.
Examples
>>> tdelta_idx = pd.to_timedelta([1, 2, 3], unit="ns") >>> tdelta_idx TimedeltaIndex(['0 days 00:00:00.000000001', '0 days 00:00:00.000000002', '0 days 00:00:00.000000003'], dtype='timedelta64[ns]', freq=None) >>> tdelta_idx.nanoseconds Index([1, 2, 3], dtype='int32')