KnowledgeBoat Logo
|

Informatics Practices

To iterate over vertical subsets of a DataFrame, …………… function may be used.

  1. iterate()
  2. iterrows()
  3. itercols()
  4. iteritems()

Python Pandas

1 Like

Answer

iteritems()

Reason — The iteritems() method in pandas iterates over a DataFrame column-wise, where each vertical subset is in the form of (column-index, Series) where Series contains all row values for that column-index.

Answered By

2 Likes


Related Questions