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
- Weekly Trends and Language Statistics
- Weekly Trends and Language Statistics