Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

192
Visualizações
Pandas can't find the csv file

I'm trying to create a dataframe using a csv file for a task, however every time I ran my program it would show me an error that the file could not be found. My code is the following:

 import pandas as pd df = pd.read_csv('thefile')

The code returns an error no matter where I put my file. When I checked the path using the following code:

 import os print(os.getcwd())

It showed me that the path is correct and it's looking inside the folder where my csv file is located but it still gives me the same error.

over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

You need to add .csv behind the file,
without it, it doesn't know what file to look for, it could be the .txt file, the .conf file, the .csv file, the ...

So your code should look like this.

 import pandas as pd df = pd.read_csv('thefile.csv')
over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda