'Writing DataFrame to csv file. Each Column in a seperate cell does not work. Delimitor does not do anything
I have a Dataframe with 2 columns and 30 rows. I want to write it to a csv file but it always ends up writing my columns into one cell. Basically my Dataframe is 30x2 and my csv file is 30x1. I have tried every answer I found on stackoverlfow but nothing worked.
I have tried changing seperator from , to ; but nothing changed currently it looks like this
df_ts = pd.DataFrame(list(zip(file_name, timestamps_err)), columns=['FIle', 'Timestamp'])
df_ts.to_csv('Results_test_data.csv',mode="a", sep=',', index=False)
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
