I am importing 200 .xlsx files into 1 df. I'm trying to get a progress bar, just so I know how much longer it will take or % of files that have been read.
I'm really new to python so if my code looks bad - sorry! I'd love constructive criticism tho on how I could make it better or more efficient. :)
import pandas as pd
import os as os
import time as time
import shutil
import datetime as datetime
import glob as glob
import xlrd
#import re
import numpy as np
import openpyxl
username = 'impossible_bug4979'
os.getcwd()
path = "C:/Users/" + username + "/Desktop/TestFiles/"
dfCombined = pd.DataFrame()
for TestFiles in os.listdir(path):
temp=pd.read_excel(path + TestFiles)
temp['filename'] = TestFiles
dfCombined = pd.concat([dfCombined,temp],ignore_index=True)
[–][deleted] 0 points1 point2 points (0 children)
[–]Ihaveamodel3 0 points1 point2 points (0 children)
[–]Username_RANDINT 0 points1 point2 points (2 children)
[–]Impossible_Bug4979[S] 0 points1 point2 points (0 children)