Issue
My dataset (national income):
How can I find what delimiter is for my dataset, because I try to read my dataset csv file using pandas libraries but I already try a comma (,), a semicolon (;), a tab (\t), a space ( ) and a pipe (|) but it still didn't work. I also try df=pd.read_csv("file name", sep='delimiter')
but it still didn't work. Is there someone help me, what should I do?
Solution
Either remove the first four rows of the dataset as they aren't relevant and save the CSV then everything will work fine in pandas after using ,
as delimiter OR use skiprows
as while reading the CSV:
df = pd.read_csv("net_national_income.csv", skiprows = 4)
Answered By - Prashant Maurya Answer Checked By - David Goodson (PHPFixing Volunteer)
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.