pandas.DataFrame.iteritems

DataFrame.iteritems()[source]

Iterate over (column name, Series) pairs.

Deprecated since version 1.5.0: iteritems is deprecated and will be removed in a future version. Use .items instead.

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

Yields:
labelobject

The column names for the DataFrame being iterated over.

contentSeries

The column entries belonging to each label, as a Series.

See also

DataFrame.iter

Recommended alternative.

DataFrame.iterrows

Iterate over DataFrame rows as (index, Series) pairs.

DataFrame.itertuples

Iterate over DataFrame rows as namedtuples of the values.