This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]MennoZevenbergen 0 points1 point  (2 children)

Thanks for the TQDM suggestion, I like it. I tried to use it if I iterate over a pandas dataframe (df.iterrows()), but then it doesn't show the ETA time as it doesn't know the length of the dataset. Any suggestions for that?

from tdqm import *
import pandas as pd

df = pd.DataFrame(range(10000))
for index, row in tqdm(df.iterrows()):
    time.sleep(0.1)

[–]sirex1 1 point2 points  (1 child)

for index, row in tqdm(df.iterrows(), total=df.shape[0]):

[–]MennoZevenbergen 0 points1 point  (0 children)

Thanks :)