Please note, this is a STATIC archive of website www.w3resource.com from 19 Jul 2022, cach3.com does not collect or store any user information, there is no "phishing" involved.
w3resource

Pandas DataFrame: items() function

DataFrame - items() function

The items() function is used to iterator over (column name, Series) pairs.

Iterates over the DataFrame columns, returning a tuple with the column name and the content as a Series.

Syntax:

ataFrame.items(self)

Yields:

Name Description Type/Default Value Required / Optional
label   The column names for the DataFrame being iterated over. object Required
content   The column entries belonging to each label, as a Series. Series Required

Example:


Download the Pandas DataFrame Notebooks from here.

Previous: DataFrame - iloc() function
Next: DataFrame - iteritems() function