How to Use the read_csv Function in Pandas

Поділитися
Вставка
  • Опубліковано 26 жов 2024

КОМЕНТАРІ • 2

  • @ianslabel9766
    @ianslabel9766 Рік тому

    I have a tab separated csv file. When I import it to pandas, the column headers are off by one. The first column headers is empty, and the second column has the first co header name, the 3rd col has the second col header name. What should I do about that?

    • @SQLPro1
      @SQLPro1  Рік тому

      Hard to know the exact issue without seeing what the file looks like, but it sounds like there is an extra comma on the first line of the csv. For example: ,col1,col2
      Removing the comma should fix the issue in this case.