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
It will be nice if you may share this link in any developer community or anywhere else, from where other developers may find this content. Thanks.
https://w3resource.com/pandas/dataframe/dataframe-items.php
- Weekly Trends and Language Statistics
- Weekly Trends and Language Statistics