Skip to content

Commit 04c91ef

Browse files
KeiOshimapmhatre1
authored andcommitted
DOC: Fixing SA01 issues for DatetimeIndex: date and tz (pandas-dev#58377)
* DOC: Fixing SA01 issues for DatetimeIndex: date and tz * fixing: XPECTED TO FAIL, BUT NOT FAILING error
1 parent ae2a3e9 commit 04c91ef

File tree

2 files changed

+15
-4
lines changed

2 files changed

+15
-4
lines changed

ci/code_checks.sh

-4
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
103103
-i "pandas.DataFrame.to_markdown SA01" \
104104
-i "pandas.DataFrame.to_parquet RT03" \
105105
-i "pandas.DataFrame.var PR01,RT03,SA01" \
106-
-i "pandas.DatetimeIndex.date SA01" \
107106
-i "pandas.DatetimeIndex.day_of_year SA01" \
108107
-i "pandas.DatetimeIndex.dayofyear SA01" \
109108
-i "pandas.DatetimeIndex.freqstr SA01" \
@@ -115,7 +114,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
115114
-i "pandas.DatetimeIndex.std PR01,RT03" \
116115
-i "pandas.DatetimeIndex.to_period RT03" \
117116
-i "pandas.DatetimeIndex.to_pydatetime RT03,SA01" \
118-
-i "pandas.DatetimeIndex.tz SA01" \
119117
-i "pandas.DatetimeIndex.tz_convert RT03" \
120118
-i "pandas.DatetimeTZDtype SA01" \
121119
-i "pandas.DatetimeTZDtype.tz SA01" \
@@ -270,7 +268,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
270268
-i "pandas.Series.dt.as_unit PR01,PR02" \
271269
-i "pandas.Series.dt.ceil PR01,PR02" \
272270
-i "pandas.Series.dt.components SA01" \
273-
-i "pandas.Series.dt.date SA01" \
274271
-i "pandas.Series.dt.day_name PR01,PR02" \
275272
-i "pandas.Series.dt.day_of_year SA01" \
276273
-i "pandas.Series.dt.dayofyear SA01" \
@@ -290,7 +287,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
290287
-i "pandas.Series.dt.strftime PR01,PR02" \
291288
-i "pandas.Series.dt.to_period PR01,PR02,RT03" \
292289
-i "pandas.Series.dt.total_seconds PR01" \
293-
-i "pandas.Series.dt.tz SA01" \
294290
-i "pandas.Series.dt.tz_convert PR01,PR02,RT03" \
295291
-i "pandas.Series.dt.tz_localize PR01,PR02" \
296292
-i "pandas.Series.dt.unit GL08" \

pandas/core/arrays/datetimes.py

+15
Original file line numberDiff line numberDiff line change
@@ -593,6 +593,13 @@ def tz(self) -> tzinfo | None:
593593
datetime.tzinfo, pytz.tzinfo.BaseTZInfo, dateutil.tz.tz.tzfile, or None
594594
Returns None when the array is tz-naive.
595595
596+
See Also
597+
--------
598+
DatetimeIndex.tz_localize : Localize tz-naive DatetimeIndex to a
599+
given time zone, or remove timezone from a tz-aware DatetimeIndex.
600+
DatetimeIndex.tz_convert : Convert tz-aware DatetimeIndex from
601+
one time zone to another.
602+
596603
Examples
597604
--------
598605
For Series:
@@ -1476,6 +1483,14 @@ def date(self) -> npt.NDArray[np.object_]:
14761483
Namely, the date part of Timestamps without time and
14771484
timezone information.
14781485
1486+
See Also
1487+
--------
1488+
DatetimeIndex.time : Returns numpy array of :class:`datetime.time` objects.
1489+
The time part of the Timestamps.
1490+
DatetimeIndex.year : The year of the datetime.
1491+
DatetimeIndex.month : The month as January=1, December=12.
1492+
DatetimeIndex.day : The day of the datetime.
1493+
14791494
Examples
14801495
--------
14811496
For Series:

0 commit comments

Comments
 (0)