[Python] ParserError when reading csv file from github [duplicate]

Discussão em 'Python' iniciado por Stack, Setembro 30, 2024.

  1. Stack

    Stack Membro Participativo

    I'm getting a ParserError when I try to read a csv file directly from github:

    import pandas as pd
    url = 'https://github.com/marcopeix/AppliedTimeSeriesAnalysisWithPython/tree/main/data/jj.csv'
    df = pd.read_csv(url)

    ParserError: Error tokenizing data. C error: Expected 1 fields in line 41, saw 29


    but if I download the file and read it from disk, it works without issues:

    df = pd.read_csv('/home/data/jj.csv')

    Continue reading...

Compartilhe esta Página