Feb-24-2021, 07:12 PM
Are you actually using the dataframes for anything? Or are you creating them purely to print them out in the notebook?
If it's just visual, then what if you put the print() inside the for loop, and remove the append() part?
If it's just visual, then what if you put the print() inside the for loop, and remove the append() part?
#df_all = pd.DataFrame() for i in range(0,13): text = doc.getPage(i).extractText() #print(text) loc_re = re.compile(r'S\d+_\d+_DOG', re.IGNORECASE) loc = loc_re.findall(text) #print(cpt) easting_re = re.compile(r'E[ ]*\d{6}') easting = easting_re.findall(text) #print(easting) northing_re = re.compile(r'N[ ]*\d{7}') northing = northing_re.findall(text) #print(northing) df = pd.DataFrame({'LOC': loc, 'Easting':easting, 'Northing': northing}) print(df) #df_all = df_all.append(df, ignore_index=True) #print(df_all)