How to split data in single column into CSV with multiple columns?

I have a dataset with 45 characteristics but they are all placed within a single column in my CSV file separated with a semi colon (;). Please how can I split the data into 45 columns using the semicolon as the end of a header?

You have the answer - split(). Pls go and check it out.

A late reply, but MS Excel CSV files are saved as semi colon seperated values.

Option 1 is to open it in Excel (Libre Office should work) and then save-as with the proper format. I believe that is listed under something like “DOS style CSV” in Excel.

Better though would be to change the delimiter (the semi colon) with the argument
pandas.read_csv('filename.csv', delimiter=';')

Just noticed on the documentation, you can interchangeably use the argument sep instead of delimiter with pandas

1 Like