Skip to content

Updated the pandas.DatetimeIndex.day_name and pandas.DatetimeIndex.month_name docstring #57790

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions ci/code_checks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
pandas.Series.dt.round\
pandas.Series.dt.floor\
pandas.Series.dt.ceil\
pandas.Series.dt.month_name\
pandas.Series.dt.day_name\
pandas.Series.cat.rename_categories\
pandas.Series.cat.reorder_categories\
pandas.Series.cat.add_categories\
Expand Down
12 changes: 12 additions & 0 deletions pandas/core/arrays/datetimes.py
Original file line number Diff line number Diff line change
Expand Up @@ -1278,6 +1278,8 @@ def month_name(self, locale=None) -> npt.NDArray[np.object_]:
"""
Return the month names with specified locale.

This function returns names of months corresponding to the datetime values.

Parameters
----------
locale : str, optional
Expand All @@ -1291,6 +1293,10 @@ def month_name(self, locale=None) -> npt.NDArray[np.object_]:
Series or Index
Series or Index of month names.

See Also
--------
Series.dt.day_name: Return the day names of a datetime Series.

Examples
--------
>>> s = pd.Series(pd.date_range(start="2018-01", freq="ME", periods=3))
Expand Down Expand Up @@ -1335,6 +1341,8 @@ def day_name(self, locale=None) -> npt.NDArray[np.object_]:
"""
Return the day names with specified locale.

This function returns names of days corresponding to the datetime values.

Parameters
----------
locale : str, optional
Expand All @@ -1348,6 +1356,10 @@ def day_name(self, locale=None) -> npt.NDArray[np.object_]:
Series or Index
Series or Index of day names.

See Also
--------
Series.dt.month_name: Return the month names of a datetime Series.

Examples
--------
>>> s = pd.Series(pd.date_range(start="2018-01-01", freq="D", periods=3))
Expand Down