Skip to content
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

tqdm + pandas + pyqt #943

Open
WBP20 opened this issue Apr 20, 2020 · 3 comments
Open

tqdm + pandas + pyqt #943

WBP20 opened this issue Apr 20, 2020 · 3 comments
Assignees
Labels
p4-enhancement-future 🧨 On the back burner question/docs ‽ Documentation clarification candidate submodule ⊂ Periphery/subclasses

Comments

@WBP20
Copy link

WBP20 commented Apr 20, 2020

Hi,

I use tqdm with pandas (for geocoding purpose) through :

tqdm.pandas() df['location'] = df['name'].progress_apply(geocode)

It works very well but I would like to see the progress on GUI PyQt app.

If found several clues on how to do it

But how can I pass in a custom file and parse out the elapsed time in a write method with tqdm.pandas() ?

thanks in advance.

@casperdcl
Copy link
Sponsor Member

casperdcl commented Apr 20, 2020

you'd probably need:

from tqdm import tqdm as tqdm_std

class Qtqdm(tqdm_std):
    # some custom logic here, probably overriding `close`/`clear`/`display`
    # see https://github.com/tqdm/tqdm/#custom-integration
    # and https://github.com/tqdm/tqdm/blob/master/tqdm/notebook.py
    # and https://github.com/tqdm/tqdm/blob/master/tqdm/gui.py
    # or just copy-paste things from https://github.com/tqdm/tqdm/issues/696
    ...

Qtqdm.pandas()
df['location'] = df['name'].progress_apply(geocode)

@casperdcl casperdcl added question/docs ‽ Documentation clarification candidate submodule ⊂ Periphery/subclasses p4-enhancement-future 🧨 On the back burner labels Apr 20, 2020
@casperdcl casperdcl self-assigned this Apr 20, 2020
@JanC
Copy link

JanC commented Dec 15, 2021

Hey @casperdcl ,
I've run into the same scenario and found this question. Was there anything more official implemented in tqdm + PyQt in the meantime?

cheers

@LoneWanderer-GH
Copy link

@WBP20 as tracked by github, you can have a look here: #696 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
p4-enhancement-future 🧨 On the back burner question/docs ‽ Documentation clarification candidate submodule ⊂ Periphery/subclasses
Projects
None yet
Development

No branches or pull requests

4 participants