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
- New Content published on w3resource:
- HTML-CSS Practical: Exercises, Practice, Solution
- Java Regular Expression: Exercises, Practice, Solution
- Scala Programming Exercises, Practice, Solution
- Python Itertools exercises
- Python Numpy exercises
- Python GeoPy Package exercises
- Python Pandas exercises
- Python nltk exercises
- Python BeautifulSoup exercises
- Form Template
- Composer - PHP Package Manager
- PHPUnit - PHP Testing
- Laravel - PHP Framework
- Angular - JavaScript Framework
- Vue - JavaScript Framework
- Jest - JavaScript Testing Framework