
How NOT to write pandas code - HIP_HOP
https://towardsdatascience.com/how-not-to-write-pandas-code-ef88599c6e8f
======
s_r_n
I've never seen a Pandas tutorial advocating the for-loops the author
describes and I have rarely come across for-loops in other people's Pandas
code. I think the article could remove the for-loop "how not to" examples and
it would be a typical "getting started with Pandas" article.

~~~
thehappypm
Obviously nobody would advocate for them. But for a new Pandas programmer,
loops are incredibly obvious, familiar, and do work. So, tons of people use
them.

------
applecrazy
The title is a bit clickbaity, so here’s a TL;DR:

Try to use the built-in vectorized Pandas functions instead of writing
explicit loops.

~~~
Icathian
It's wild how much faster iterrows and itertuples are. I wish I'd known a year
ago.

This is one of those cases that really isn't just pedantic, "pythonic",
nagging. It matters.

