w3resource

Pandas Series: items() function

Lazily iterate over tuples in Pandas

The items() function is used to lazily iterate over (index, value) tuples.

This method returns an iterable tuple (index, value). This is convenient if you want to create a lazy iterator.

Syntax:

Series.items(self)

Returns: iterable
Iterable of tuples containing the (index, value) pairs from a Series.

Example:


Download the above Notebook from here.



Inviting useful, relevant, well-written and unique guest posts