W3cubDocs

/pandas 0.25

pandas.Timedelta.nanoseconds

Timedelta.nanoseconds

Return the number of nanoseconds (n), where 0 <= n < 1 microsecond.

Returns:
int

Number of nanoseconds.

See also

Timedelta.components
Return all attributes with assigned values (i.e. days, hours, minutes, seconds, milliseconds, microseconds, nanoseconds).

Examples

Using string input

>>> td = pd.Timedelta('1 days 2 min 3 us 42 ns')
>>> td.nanoseconds
42

Using integer input

>>> td = pd.Timedelta(42, unit='ns')
>>> td.nanoseconds
42

© 2008–2012, AQR Capital Management, LLC, Lambda Foundry, Inc. and PyData Development Team
Licensed under the 3-clause BSD License.
https://pandas.pydata.org/pandas-docs/version/0.25.0/reference/api/pandas.Timedelta.nanoseconds.html