Colleagues, good afternoon! There are 157 xlsx files with the same structure, no headers. I am compiling a list of files with glob.glob. Next, I write a loop that should add files to one frame, but apparently missing something. The code that I have at the moment:

in_3 = '/Оборудование/*.xlsx' files = glob.glob(in_3) for f in files: a = pd.read_excel(f) df = pd.DataFrame.append(a) 

As a result, I get the error:

TypeError: append () missing 1 required positional argument: 'other'

What am I doing wrong, tell me, please?

    1 answer 1

    Try this:

     in_3 = '/Оборудование/*.xlsx' files = glob.glob(in_3) df = pd.concat([pd.read_excel(f, header=None) for f in files], ignore_index=True) 
    • MaxU, a very elegant solution! Thanks for always helping! - Denis Novik
    • @DenisNovik, always please - MaxU