VOOZH about

URL: https://www.geeksforgeeks.org/pandas/pandas-series-dt-time/

⇱ Pandas Series dt.time | Extract Time from Time Stamp in Series - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

Pandas Series dt.time | Extract Time from Time Stamp in Series

Last Updated : 11 Jul, 2025

The Series.dt.time attribute returns a NumPy array containing time values of the timestamps in a Pandas series.

Example

Output:

👁 Image

Syntax

Syntax: Series.dt.time 

Parameter : None 

Returns : NumPy array containing time values

How to Extract Time Value From DateTime Series

To extract the time value from the DateTime Pandas Series we use the dt.time attribute of the Pandas library

Let us understand better with an example:

Example: 

Use the Series.dt.time attribute to return the time property of the underlying data of the given Series object.

Output

👁 datetime series created

Now we will use Series.dt.time attribute to return the time property of the underlying data of the given Series object.

Output :

👁 Extracted hour part from timestamp

As we can see in the output, the Series.dt.time attribute has successfully accessed and returned the time property of the underlying data in the given series object.

Comment

Explore