Progress bar wrapper for pandas apply #3636
Unanswered
sandstromviktor
asked this question in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi. I really like making nice looking progress bars using
rich. Thanks to the creators of this fine piece of art.Sometimes when using
Pandas, you will use theapplyfunction. This can take a long time if you have a largeDataFrame. It is possible to usetqdmand theirprogress_applymonkey patch to get a progress bar for this operation. However, i likerichmore, so i created a similar wrapper that i want to share for anyone looking at this in the future.It is quite simple. First, define this function
then monkey patch this to
Pandaslike thisand use it like this
You could also wrap the
mapfunction by specifyinginner_generator(df_function="map")Beta Was this translation helpful? Give feedback.
All reactions