As you can see the documentation pages for Series.items() and Series.iteritems() are identical. Is it a mistake? Is one method outdated but kept for backward compatibility?
Most importantly, which one should I use?
CodePudding user response:
Series.iteritems()
just calls Series.items()
under the hood, see source code below:
def iteritems(self) -> Iterable[tuple[Hashable, Any]]:
return self.items()
As a result, you should be fine to use either, although it appears Series.items()
is preferred.