Skip to content

Commit 58400f9

Browse files
Merge remote-tracking branch 'upstream/main' into numpy-docstring-hdfstore-put
2 parents c9edaa1 + bfe5be0 commit 58400f9

File tree

5 files changed

+24
-8
lines changed

5 files changed

+24
-8
lines changed

ci/code_checks.sh

Lines changed: 0 additions & 5 deletions
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,14 +114,12 @@ 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" \
122120
-i "pandas.DatetimeTZDtype.unit SA01" \
123121
-i "pandas.Grouper PR02" \
124122
-i "pandas.HDFStore.put PR01,SA01" \
125-
-i "pandas.HDFStore.select SA01" \
126123
-i "pandas.HDFStore.walk SA01" \
127124
-i "pandas.Index PR07" \
128125
-i "pandas.Index.T SA01" \
@@ -271,7 +268,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
271268
-i "pandas.Series.dt.as_unit PR01,PR02" \
272269
-i "pandas.Series.dt.ceil PR01,PR02" \
273270
-i "pandas.Series.dt.components SA01" \
274-
-i "pandas.Series.dt.date SA01" \
275271
-i "pandas.Series.dt.day_name PR01,PR02" \
276272
-i "pandas.Series.dt.day_of_year SA01" \
277273
-i "pandas.Series.dt.dayofyear SA01" \
@@ -291,7 +287,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
291287
-i "pandas.Series.dt.strftime PR01,PR02" \
292288
-i "pandas.Series.dt.to_period PR01,PR02,RT03" \
293289
-i "pandas.Series.dt.total_seconds PR01" \
294-
-i "pandas.Series.dt.tz SA01" \
295290
-i "pandas.Series.dt.tz_convert PR01,PR02,RT03" \
296291
-i "pandas.Series.dt.tz_localize PR01,PR02" \
297292
-i "pandas.Series.dt.unit GL08" \

pandas/core/arrays/datetimes.py

Lines changed: 15 additions & 0 deletions
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:

pandas/core/frame.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4012,7 +4012,6 @@ def _get_value(self, index, col, takeable: bool = False) -> Scalar:
40124012
return series._values[index]
40134013

40144014
series = self._get_item(col)
4015-
engine = self.index._engine
40164015

40174016
if not isinstance(self.index, MultiIndex):
40184017
# CategoricalIndex: Trying to use the engine fastpath may give incorrect
@@ -4023,7 +4022,7 @@ def _get_value(self, index, col, takeable: bool = False) -> Scalar:
40234022

40244023
# For MultiIndex going through engine effectively restricts us to
40254024
# same-length tuples; see test_get_set_value_no_partial_indexing
4026-
loc = engine.get_loc(index)
4025+
loc = self.index._engine.get_loc(index)
40274026
return series._values[loc]
40284027

40294028
def isetitem(self, loc, value) -> None:

pandas/core/indexes/base.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -832,7 +832,8 @@ def _reset_identity(self) -> None:
832832

833833
@final
834834
def _cleanup(self) -> None:
835-
self._engine.clear_mapping()
835+
if "_engine" in self._cache:
836+
self._engine.clear_mapping()
836837

837838
@cache_readonly
838839
def _engine(

pandas/io/pytables.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -859,6 +859,12 @@ def select(
859859
object
860860
Retrieved object from file.
861861
862+
See Also
863+
--------
864+
HDFStore.select_as_coordinates : Returns the selection as an index.
865+
HDFStore.select_column : Returns a single column from the table.
866+
HDFStore.select_as_multiple : Retrieves pandas objects from multiple tables.
867+
862868
Examples
863869
--------
864870
>>> df = pd.DataFrame([[1, 2], [3, 4]], columns=["A", "B"])

0 commit comments

Comments
 (0)