Tag

itertuples

0 views collected around this technical thread.

Python Programming Learning Circle
Python Programming Learning Circle
Apr 11, 2020 · Fundamentals

Speeding Up Pandas Row Iteration: Use itertuples() Instead of iterrows()

This article explains why iterating over Pandas DataFrames with iterrows() is slow, demonstrates the performance gain of using itertuples()—often over a hundred times faster—and provides a simple example to help Python data‑analysis practitioners write more efficient code.

data analysisiterrowsitertuples
0 likes · 4 min read
Speeding Up Pandas Row Iteration: Use itertuples() Instead of iterrows()