xxxxxxxxxx
path = r'D:\Mastar Data Of Puvvnl\PUVNL_Apr_2022'
xxxxxxxxxx
path = r'C:\DRO\DCL_rawdata_files' # use your path
all_files = glob.glob(path + "/*.csv")
li = []
for filename in all_files:
df = pd.read_csv(filename, index_col=None, header=0)
li.append(df)
frame = pd.concat(li, axis=0, ignore_index=True)
xxxxxxxxxx
merged_data = reduce(lambda left,right: pd.merge(left,right,on=['column name'],how='outer'), (pd.read_csv(data_file) for data_file in data_files))
merged_data