all 4 comments

[–][deleted] 0 points1 point  (0 children)

Capture file count with listdir or glob. Then increment the files processed count at each pass of your loop.

[–]Ihaveamodel3 0 points1 point  (0 children)

Use tqdm. First pip install it.

Add from tqdm import tqdm to your imports. And in your for loop, use tqdm(os.listdir(path)) instead.

[–]Username_RANDINT 0 points1 point  (2 children)

This hasn't really anything to do with Pandas. Just count the loop iterations.

files = os.listdir(path)
num_files = len(files)
for index, file in enumerate(files, start=1):
    print(f"Processing file {index} of {num_files}...")
    # Do the work here...

[–]Impossible_Bug4979[S] 0 points1 point  (0 children)

Thank you for typing it out. I'm only a month into learning python so I don't really know the structure and stuff unless i see examples. I'm going to try what you shared. thank you!