with open('a', 'w', encoding='utf-8') as f:
pd.DataFrame(columns=['f']).to_csv(f, index=False)
df1 = pd.DataFrame([1, 2, 3], columns=['f'])
df2 = pd.DataFrame([4, 5, 6], columns=['f'])
df1.to_csv(f, mode='a+', index=False, header=False)
df2.to_csv(f, mode='a+', index=False, header=False)
df = pd.read_csv('a')
print(df)