0
import pandas as pd
df = pd.read_csv("stei-c-1.csv")

when the code is running :

FileNotFoundError: File b'stei-c-1.csv' does not exist

here the directory of file D:\ITB\Tugas\PTI\H4

the python file and the csv file in same location. how to fix it, thanks !

tavif bicandra
  • 1
  • 1
  • 1
  • 1

1 Answers1

1

It should simply work by giving complete path.

df = pd.read_csv(r"D:\ITB\Tugas\PTI\H4\stei-c-1.csv")

However, as other mentioned if you are standing on the same Directory path where your Files are then you don't really need to mention the Full Path otherwise best to place absolute Path.

Karn Kumar
  • 8,518
  • 3
  • 27
  • 53