Working on my first data project and I'm new to stackoverflow. All the other examples I have found use append, but whenever I try append, the data gets organized wrong since I want to concatenate the columns vertically. This is what I have so far:
import pandas as pd
import os
input_file_path = "C:/Users/laura/Downloads/excel files/"
output_file_path = "C:/Users/laura/OneDrive/Desktop/master excel/"
excel_file_list = os.listdir(input_file_path)
df = pd.DataFrame()
for excel_files in excel_file_list:
if excel_files.endswith('.csv'):
df1 = pd.read_csv(input_file_path+excel_files)
df = pd.concat(df1, axis=1, ignore_index=True)
And this is the error I am getting:
TypeError: first argument must be an iterable of pandas objects, you passed an object of type "DataFrame"