首页 > 解决方案 > Not getting column headers on loading csv file in python

问题描述

I am using the following code to load the data in python from a csv file:

import pandas as pd

df_csv = pd.read_csv("IMDB_data.csv", sep = ',',encoding = "ISO-8859-1", skiprows = 2)

the output that I get is this:

output from the use of the mentioned code

If you notice the header of each column it says 0.1, 0.2,0.3... and so on instead of "Plot", "Title", etc. It would be a great help to me if you could help me understand why is this happening? How can it be corrected? What could be possibly causing it?

标签: pythonpandascsv

解决方案


推荐阅读