Skip to content

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.

Select any words here to ask your Maestro about them.

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:

Python
from pathlib import PathPath.cwd()

In R it's getwd(). In Stata, pwd.

Ask your Maestro about Working directory

It answers from a free course page that uses this word, the way it answers while you study.

Example

You: What does "Working directory" mean, in plain words?

Your Maestro: I'll explain it with a case of yours: it sticks better than a definition. Want to see which one your notebook uses?

Asking about: Answers from the page "How do I do a complete first look at a table and write it down?"

Only this browser keeps what you ask here. How it works

In Maestro's courses

Learn more

  • 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.

The whole glossary