In Excel, getting data in was File > Open. In Python you do the same thing with one line of code, and you get to choose what shape the data arrives in. This page reads one small file three ways so you can see the difference. Type a line and press Shift+Enter (or click Run) to execute it. This is real Python, running in your browser.
A tiny CSV called invoices.csv lives in this page's sandbox. It is six lines:
a header row and five invoices. Everything below reads exactly this file.
Run the cells top to bottom. Each one reads data/invoices.csv a different way and
shows you what came back. The last cells are yours to experiment in.
Every read above used the path "data/invoices.csv" with a forward slash. That is the
portable shape: forward slashes work in Python on every operating system, including Windows. A Windows-style
path with backslashes ("data\invoices.csv") can break, because in a Python string a backslash
starts an escape sequence. When in doubt, use forward slashes, or build the path with
pathlib: from pathlib import Path; Path("data") / "invoices.csv". The
paths trainer covers this in full.
open(...) and pd.read_csv(...) safely. Loading a file that actually
lives on your computer or your Google Drive happens in Colab or a local Python install — same
lines, real file. That is where the Lab and Homework do their reading. The path gotcha above is exactly
what bites you there, so it is worth getting comfortable with the forward-slash habit now.