DatetimeIndex.day_name()
Pandas DatetimeIndex.day_name()
returns DateTimeIndex day names with the specified locale ... The default is None, in which case names are returned in English.
Syntax: DatetimeIndex.day_name (locale = None)
Parameters:
locale: locale determining the language in which to return the day nameReturn: Index of day names
Example # 1: Use DatetimeIndex.day_name ()
to return the day names for each entry in the DatetimeIndex object. Return day names in French
|
Output:
Now we want to return the day names in French.
|
Output:
As we can see from the output, the function returned an Index object containing titles days in French.
Let’s return the name of the days in English
|
Output:
Example # 2: Use DatetimeIndex.day_name ()
to return titles days for each entry in the DatetimeIndex object. Return day names in German
|
Output:
Now we want to return the names of the days in German.
|
Output:
As we can see from the output, the function returned an Index object containing the day names in German.