df.to_csv('my_csv.csv', mode='a', header=False)
df.to_csv('my_csv.csv', mode='a', header=False)
# append with mode = 'a'
# no header for existing files this way
output_path='my_csv.csv'
df.to_csv(output_path, mode='a', header=not os.path.exists(output_path))
import pandas as pd
import glob
path = r'C:DRODCL_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)
df.to_csv('test_scores.csv', mode='a', index=False, header=False)