Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialJoe Li
3,234 PointsCan't read in CSV files after importing the pandas library
I'm using JupyterLab via Anaconda when I try to run this, I get an error saying that Demographics.csv does not exist.
import pandas as pd
demo = pd.read_csv('Demographics.csv')
How do I fix this?
1 Answer
Michael Erotokritou
2,399 PointsYou need to make sure you're starting up your Python environment in the same folder as the data files. When you open Jupyter Notebook, use the ls, cd, cd.., pwd commands to move through your computers directories (files) until you end up wherever you saved the teachers data. When you are there, the read_csv will work.