I am trying to export my data frame to the CSV file. I had 2 columns but when I export it to CSV, I am left out with only one column. The data format is in a comma-separated way.
df = pd.DataFrame({'MSE':[m], 'SSIM': [s]})
To append the values in the new data frame I used the below code:
with open('test.csv', 'a+') as f:
df.to_csv(f, header=False)
print(df)
I am getting the output looks like:
MSE SSIM
0 0.743373 0.843658
When I go back and check the CSV file I can see the file in this format:
0,1.1264238582283046,0.8178900901529639
How can I solve this?