![]() |
VOOZH | about |
Pandas dt.nanosecond attribute returns a NumPy array containing the nanosecond of the DateTime in the underlying data of the given series object.
Output
Syntax: Series.dt.nanosecond
Parameter: None
Returns: NumPy array containing nanosecond values
To extract nanoseconds from DateTime in the Pandas Series we use the dt.nanosecond attribute of the Pandas library.
Let's understand it better with an example.
Use the Series.dt.nanosecond attribute to return the nanosecond of the DateTime in the underlying data of the given Series object.
Output :
As we can see in the output, the dt.nanosecond attribute has successfully accessed and returned the nanosecond of the DateTime in the underlying data of the given series object.