From c5c168d5f39abbb84a20cb2749bd45392548cb14 Mon Sep 17 00:00:00 2001 From: Kerybas <42703200+Kerybas@users.noreply.github.com> Date: Fri, 9 Dec 2022 10:46:42 +0000 Subject: [PATCH] keep value types when calling .items() --- pandas/core/series.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandas/core/series.py b/pandas/core/series.py index fd65aa9cf3733..49b723e3960cf 100644 --- a/pandas/core/series.py +++ b/pandas/core/series.py @@ -1770,7 +1770,7 @@ def items(self) -> Iterable[tuple[Hashable, Any]]: Index : 1, Value : B Index : 2, Value : C """ - return zip(iter(self.index), iter(self)) + return zip(iter(self.index), iter(self._values)) # ---------------------------------------------------------------------- # Misc public methods