Bhavani K
Bhavani K

Reputation: 165

How to align the data in CSV file and store the proper result of the data using PANDAS?

I am working with pandas in Jupyter Notebook, When I tried to read a csv file using pandas it successfully reads the file. But, when I tried to display the data in the csv file using data.head() it doesn't show the proper results and I want to align the data for the particular column ['education'] in the csv. Error message it shows I need to display data in the column education field.Can ayone please help me to sort it out?

Upvotes: 0

Views: 635

Answers (1)

Sand T
Sand T

Reputation: 168

The problem is you are using semicolon instead of commas in csv. This is the reason .head() is also printing everything in just one column. Mention separator (sep=';') in read_csv method which will make individual columns and your will get values under education column too. Right now education column is blank.

Upvotes: 2

Related Questions