![]() |
VOOZH | about |
Pandas dt.day_name() method returns the day names of the DateTime Series objects with specified locale.
Output:
Syntax: Series.dt.day_name(locale)
Parameter
- locale : Locale determining the language in which to return the day name. Default is English locale.
Returns: Index of day names.
To extract the day name from a given date in the Pandas Series we use the Series.dt.day_name() method of the Pandas library in Python.
Let us understand it better with an example:
Use the dt.day_name() function to return the day names of the underlying DateTime data in the given Series object.
Output :
Now we will use the Series.dt.day_name() function to return the names of the day of each timestamp in the given series object.
Output :
👁 day name extracted in French
As we can see in the output, the Series.dt.day_name() function has successfully returned the names of the day in the specified language.