Introduction to Pandas > Section 5 “Loading and Saving CSVs”
I am using Python 3 and Pycharm
I was able to complete Section 5. I tried to do the exact same thing I learned in Section 5 on my own in Pycharm. I did some research, and I found a solution to reading the CSV (that is posted below). Why did the code in Section 5 not work?
THIS WORKED This WAS NOT the code used to solve Section 5.
import pandas as pd df = pd.read_csv(r'/Users/michaelsierra-hoffman/Downloads/sample.csv') print(df)
THIS DID NOT WORK This WAS the code used in Section 5.
import pandas as pd df = pd.read_csv('sample.csv') print(df) FileNotFoundError: [Errno 2] File sample.csv does not exist: 'sample.csv'