Python | Pandas Series.dt.second

Series.dt can be used to access the values of the series as datetimelike and return several properties. Pandas Series.dt.second attribute return a numpy array containing the second of the datetime in the underlying data of the given series object.

Syntax: Series.dt.second

Parameter : None

Returns : numpy array

Example #1: Use Series.dt.second attribute to return the seconds of the datetime in the underlying data of the given Series object.

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.