diff --git a/pandas/core/frame.py b/pandas/core/frame.py index b4a278185b01b..932805463d1c3 100644 --- a/pandas/core/frame.py +++ b/pandas/core/frame.py @@ -3558,16 +3558,16 @@ def T(self) -> DataFrame: # ---------------------------------------------------------------------- # Indexing Methods - def _ixs(self, i: int, axis: int = 0): + def _ixs(self, i: int, axis: int = 0) -> Series: """ Parameters ---------- i : int axis : int - Notes - ----- - If slice passed, the resulting data will be a view. + Returns + ------- + Series """ # irow if axis == 0: diff --git a/pandas/core/generic.py b/pandas/core/generic.py index 589ea6e67d926..a10cfe1c615fa 100644 --- a/pandas/core/generic.py +++ b/pandas/core/generic.py @@ -2014,7 +2014,7 @@ def __getstate__(self) -> dict[str, Any]: } @final - def __setstate__(self, state): + def __setstate__(self, state) -> None: if isinstance(state, BlockManager): self._mgr = state elif isinstance(state, dict): @@ -2047,7 +2047,7 @@ def __setstate__(self, state): elif len(state) == 2: raise NotImplementedError("Pre-0.12 pickles are no longer supported") - self._item_cache = {} + self._item_cache: dict[Hashable, Series] = {} # ---------------------------------------------------------------------- # Rendering Methods diff --git a/pandas/core/series.py b/pandas/core/series.py index 6ebee74810305..06815348fe4b9 100644 --- a/pandas/core/series.py +++ b/pandas/core/series.py @@ -932,7 +932,7 @@ def _take_with_is_copy(self, indices, axis=0) -> Series: """ return self.take(indices=indices, axis=axis) - def _ixs(self, i: int, axis: int = 0): + def _ixs(self, i: int, axis: int = 0) -> Any: """ Return the i-th value or values in the Series by location.