As the post's title, what I found on internet are mainly merging with header. Browsing around only gives me this only code that can return a result
import pandas as pd
import glob
interesting_files = glob.glob("*.csv")
df_list = []
for filename in sorted(interesting_files):
df_list.append(pd.read_csv(filename))
full_df = pd.concat(df_list)
full_df.to_csv('output.csv')
`
but the result is not good at all as in this picture:
EDIT I found this one actually works really good for my case.
import pandas as pd
import glob
import csv
interesting_files = glob.glob("*.csv")
df_list = []
for filename in sorted(interesting_files):
df_list.append(pd.read_csv(filename, header=None))
full_df = pd.concat(df_list, ignore_index=True, axis=1)
full_df.to_csv('Route_data.csv') #,header = ['a','b',...], index=False) for csv output header index=False)
additional code to delete the old files that just merged makes this even more powerful