modin.pandas.DatetimeIndex.day_name¶
- DatetimeIndex.day_name(locale: str = None) Index [source] (https://github.com/snowflakedb/snowpark-python/blob/v1.26.0/snowpark-python/src/snowflake/snowpark/modin/plugin/extensions/datetime_index.py#L1378-L1416)¶
Return the day names with specified locale.
- Parameters:
locale (str, optional) – Locale determining the language in which to return the day name. Default is English locale (
'en_US.utf8'
). Use the commandlocale -a
on your terminal on Unix systems to find your locale language code.- Return type:
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=None) >>> idx.day_name() Index(['Monday', 'Tuesday', 'Wednesday'], dtype='object')
Using the
locale
parameter you can set a different locale language, for example:idx.day_name(locale='pt_BR.utf8')
will return day names in Brazilian Portuguese language.>>> 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=None) >>> idx.day_name(locale='pt_BR.utf8') Index(['Segunda', 'Terça', 'Quarta'], dtype='object')