-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding custom information on pandas progress_apply #1027
Comments
#from tqdm.auto import tqdm
from tqdm import tqdm
import pandas as pd
df = pd.DataFrame(...)
tqdm.pandas(desc="customised", postfix={"hello": -1})
df.progress_apply(...)
tqdm.pandas(desc="remove postfix", postfix=None)
df.progress_apply(...) I agree this is clunky but (kw)arguments to |
Can I change the postfix string based on the iteration dynamically instead of having some fixed postfix ? |
That's not exactly currently supported, and it wouldn't be easy to add without breaking backward compatibility. The easiest approach would be explicitly defining a tqdm.pandas(
bar_format="{l_bar}{bar}| {n_fmt}/{total_fmt} [{elapsed}<{remaining}, {rate_fmt}, iter={n}]")
df.progress_apply(...) |
Cool, thank you so much for your help. |
Currently I use it as follows -
The result is usable, but could definitely be made prettier -
Not sure if that's the best approach, how do you use it @casperdcl ? Because the ideal solution would be having that custom postfix displayed on the right and not the top. |
read the [known issues]
environment, where applicable:
The text was updated successfully, but these errors were encountered: