W3cubDocs

/pandas 0.25

pandas.DatetimeIndex.day_name

DatetimeIndex.day_name(self, *args, **kwargs) [source]

Return the day names of the DateTimeIndex with specified locale.

New in version 0.23.0.

Parameters:
locale : str, optional

Locale determining the language in which to return the day name. Default is English locale.

Returns:
Index

Index of day names.

Examples

>>> idx = pd.date_range(start='2018-01-01', freq='D', periods=3)
>>> idx
DatetimeIndex(['2018-01-01', '2018-01-02', '2018-01-03'],
              dtype='datetime64[ns]', freq='D')
>>> idx.day_name()
Index(['Monday', 'Tuesday', 'Wednesday'], dtype='object')

© 2008–2012, AQR Capital Management, LLC, Lambda Foundry, Inc. and PyData Development Team
Licensed under the 3-clause BSD License.
https://pandas.pydata.org/pandas-docs/version/0.25.0/reference/api/pandas.DatetimeIndex.day_name.html