pandas.DataFrame.__iter__#
- DataFrame.__iter__()[source]#
Iterate over info axis.
- Returns:
- iterator
Info axis as iterator.
See also
DataFrame.items
Iterate over (column name, Series) pairs.
DataFrame.itertuples
Iterate over DataFrame rows as namedtuples.
Examples
>>> df = pd.DataFrame({"A": [1, 2, 3], "B": [4, 5, 6]}) >>> for x in df: ... print(x) A B