diff --git a/ci/code_checks.sh b/ci/code_checks.sh index c4e43b88a0097..337cd0a498bc9 100755 --- a/ci/code_checks.sh +++ b/ci/code_checks.sh @@ -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\ diff --git a/pandas/core/arrays/datetimes.py b/pandas/core/arrays/datetimes.py index 931f19a7901bd..24cdd0247d2c8 100644 --- a/pandas/core/arrays/datetimes.py +++ b/pandas/core/arrays/datetimes.py @@ -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 @@ -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)) @@ -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 @@ -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))