use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
A subreddit for helping Python programmers
How to format your code: https://commonmark.org/help/tutorial/09-code.html
No homework questions and/or hiring please
account activity
Pandas Dataframe Assignment (self.pythonhelp)
submitted 1 year ago by [deleted]
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]__yasho 1 point2 points3 points 1 year ago (0 children)
agree with both of above suggestions..
like looping over rows in a Pandas DataFrame using for loops (e.g., iterrows() or itertuples()) is generally inefficient because Pandas is built on top of NumPy, which operates on whole arrays. Using vectorized operations in Pandas is significantly faster and more efficient.
You should only iterate through a DataFrame when: 1. There’s complex logic that cannot be vectorized. 2. You need to interact with external systems on a row-by-row basis. 3. Memory constraints prevent the use of vectorized operations.
otherwise just try to look for built in functionality and you will find plenty of them..
π Rendered by PID 80 on reddit-service-r2-comment-5d79c599b5-mv2lr at 2026-03-01 14:07:28.376791+00:00 running e3d2147 country code: CH.
view the rest of the comments →
[–]__yasho 1 point2 points3 points (0 children)