skip to Main Content

i was trying to import a csv file(named as bostondatasets1.csv) in pandas using vscode .i checked & modified the syntax multiple times but the terminal is still showing error. it’s showing that "No such file or directory"… can someone tell me why is this happening or what’s wrong in syntax…coz it’s working on other’s system just not in my system.

i just want the csv file to import in my python scriptenter image description here

2

Answers


  1. I checked your screenshot .There is a little issue with the path that you are adding is space issue.
    your are giving space before bostonfile.csv
    ie sample

    project/data anaylysis/ bostonfile.csv
    

    just remove space before bostonfile.csv it will work

    Login or Signup to reply.
  2. Try remove the spaces on your directory. Also try changing the format of your directory.

    Bostondata = pd.read_csv(r"C:directoryfolderlocation")
    

    I was having issues with opening a file earlier and saw a few ways to work it out.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search