Working directory
The working directory is the folder a program treats as "here". A file name with no folders in front of it, like life_expectancy.csv, is looked for in that folder.
A notebook's working directory is usually the folder the notebook is saved in. So a CSV that one notebook writes is found by another notebook in the same folder, and a FileNotFoundError often means the two live in different folders.
To see it from Python:
from pathlib import Path
Path.cwd()In R it's getwd(). In Stata, pwd.
Learn more
Related terms
- Path
A path is a file's address on your computer: the folders you go through to reach it, ending in the file's name, like projects/python-for-altair/life_expectancy.csv.
- Jupyter notebook
A Jupyter notebook is a file (ending in .ipynb) that mixes code, its results and notes in cells. You run one cell at a time and see its output right below it.