Skip to content

Commit 195c506

Browse files
committed
DOC: Update month_name and day_name docstrings
- To fix confusing `month_index` return name in `day_name` method - To better match the preferred docstring style.
1 parent 6b83df9 commit 195c506

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

pandas/core/arrays/datetimes.py

+10-8
Original file line numberDiff line numberDiff line change
@@ -795,13 +795,14 @@ def month_name(self, locale=None):
795795
796796
Parameters
797797
----------
798-
locale : string, default None (English locale)
799-
locale determining the language in which to return the month name
798+
locale : str
799+
Locale determining the language in which to return the month name.
800+
Default is `None` (English locale).
800801
801802
Returns
802803
-------
803-
month_names : Index
804-
Index of month names
804+
Index
805+
Index of month names.
805806
806807
.. versionadded:: 0.23.0
807808
"""
@@ -821,13 +822,14 @@ def day_name(self, locale=None):
821822
822823
Parameters
823824
----------
824-
locale : string, default None (English locale)
825-
locale determining the language in which to return the day name
825+
locale : str
826+
Locale determining the language in which to return the day name.
827+
Default is `None` (English locale).
826828
827829
Returns
828830
-------
829-
month_names : Index
830-
Index of day names
831+
Index
832+
Index of day names.
831833
832834
.. versionadded:: 0.23.0
833835
"""

0 commit comments

Comments
 (0)