Series.dt
can be used to access series values as datetimelike and return multiple properties. Series.dt.day_name()
Pandas Series.dt.day_name()
returns the names of the DateTimeIndex days with the specified language standard.
Syntax: Series.dt.day_name (* args, ** kwargs)
Parameter:
locale: Locale determining the language in which to return the day name. Default is English locale.Returns: Index of day names.
Example # 1: Use Series.dt.day_name ()
to return the day names of the underlying datetime data in the given series object. Return the day names in English.
|
Output:
We will now use Series.dt.day_name ()
to return the day names of each timestamp in a given series object.
|
Output:
As we can see from the output, Series.dt.day_name ( )
successfully returned day names in the specified language.
Example # 2: Use Series.dt.day_name ()
to return day names the underlying datetime data in this series object. Return day names in French.
< br /> |
Output:
We will now use Series.dt.day_name ()
to return the day names of each timestamp in this series object.
|
Output:
As we can see from the output, Series.dt.day_name ()
successfully returned the day names in the specified language yke.