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
-
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 theapply
function. This can take a long time if you have a largeDataFrame
. It is possible to usetqdm
and theirprogress_apply
monkey patch to get a progress bar for this operation. However, i likerich
more, 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
Pandas
like thisand use it like this
You could also wrap the
map
function by specifyinginner_generator(df_function="map")
Beta Was this translation helpful? Give feedback.
All reactions