Reputation: 31
I have a pandas dataframe which is splitted in columens like xls file and when I tried to get the header using list(pd.read_csv(path)) I got a list with one string like ['header1;header2;header3;......'] How can I got the header in list of strings ['header1','header2','header3',....]
Upvotes: 0
Views: 34
Reputation: 344
I think you haven't defined the separator with your path. It should be:
pd.read_csv(path, sep = ';')
Upvotes: 1