pandas flashcards
Load, clean, reshape and summarise table data in Python, from a small CSV to millions of rows.
What is pandas, in one plain sentence?
pandas is a free Python library for working with tables of data: you load a file, then write short commands to clean, filter, total and save it.
Tap to turn over. Swipe right if you know it, left to see it again.
What you will learn
Start from zero
- What pandas is and why4 cards
- The key words4 cards
- Getting started3 cards
Core basics
- Loading and looking3 cards
- Picking rows and columns5 cards
- Changing columns4 cards
- Sorting and counting2 cards
- Missing values and saving3 cards
Next steps
- Grouping and totals4 cards
- Joining tables3 cards
- Dates and time3 cards
- Text, categories and bins3 cards
- Clean, readable pipelines4 cards
Go deeper
- How pandas 3 behaves5 cards
- Missing values and types2 cards
- Big files and speed5 cards
- Advanced shapes3 cards
- Testing and trust2 cards
Final test and certificate
10 questions drawn fresh from the whole topic, about 15 minutes. Sign in, score 80% or more and get a free certificate with your name and a public check link anyone can open, such as an employer or a teacher. Not signed in? Try a practice test from the cards.
Take the final testAbout these cards
- Reviewed 26 October 2026
- Coverspandas 3.1Python 3.11+
Checked against
pandas at a glance
pandas is a Python library that lets you work with tables of data by writing short instructions instead of clicking in a spreadsheet.
pandas is a spreadsheet that follows a written recipe. You write the steps once, and it repeats them perfectly on any new file.
Words you will meet
- DataFrame
- A whole table with named columns and numbered rows
- Series
- One column of a table, with its row labels
- Index
- The labels on the rows, often just 0, 1, 2 and so on
- CSV
- A plain text file where commas separate the values of each row
- dtype
- The kind of value a column holds, like whole numbers, text or dates
- Missing value
- An empty cell, shown by pandas as NaN or NaT
- Notebook
- A page where you run small pieces of Python and see the result right below
The steps
- 1. Start from zero (11 cards): What pandas is, why people use it, and the few words every later card relies on.
- 2. Core basics (17 cards): Load a table, look at it, pick rows and columns, fix types and save the result.
- 3. Next steps (17 cards): Group, join, reshape and handle dates and text: the pandas a working analyst uses every week.
- 4. Go deeper (17 cards): Copy-on-Write, dtypes, memory, scale and testing: what a senior engineer knows about pandas.
All 11 cards in Start from zero
- What is pandas, in one plain sentence?
- pandas is a free Python library for working with tables of data: you load a file, then write short commands to clean, filter, total and save it.
- Why use pandas when a spreadsheet app already exists?
- A spreadsheet is great for a few thousand rows you fix by hand. pandas handles millions of rows and repeats the exact same steps every time you get a new file.
- Where do people meet pandas in daily work?
- Cleaning bank or shop exports, building weekly sales reports, checking survey answers, and preparing data for charts or machine learning models.
- What everyday thing is pandas like?
- A kitchen recipe. The file is the raw groceries, each pandas step is one recipe line, and the cleaned table is the finished dish you can cook again tomorrow.
- What are a DataFrame and a Series?
- A DataFrame is a whole table. A Series is one column of it. Pull one column out of a DataFrame and you get a Series.
- What is the index?
- The index is the set of labels on the rows. By default it is 0, 1, 2 and so on, but it can be dates or ids. pandas lines rows up by these labels.
- What is a dtype?
- The dtype says what kind of value a column holds: whole numbers (
int64), decimals (float64), text (str), true or false (bool) or dates (datetime64). - What do NaN and NaT mean in a table?
- They mark missing values: NaN for a missing number or text, NaT (Not a Time) for a missing date. pandas skips them in totals and averages by default.
- What do you need before your first pandas line?
- Python installed, basic Python (variables, lists, functions), and pandas itself, installed with
pip install pandas. A notebook makes it easy to see each result. - What does this first pandas program do?
- It brings in pandas under its usual short name
pd, reads a CSV file into a DataFrame calledsales, and shows the first five rows withhead(). - What will you be able to do after this topic?
- Load any CSV or Excel file, clean messy columns, filter and sort, total by group, join tables, handle dates, and write code that stays fast on large files.
pandas cheatsheet
Load and look
pd.read_csv(path, sep, parse_dates, usecols)Read a CSV with optionspd.read_excel(path, sheet_name="Jan")Read one Excel sheetpd.read_parquet(path, columns=[...])Read only some columnsdf.head() / df.info() / df.describe()First rows, dtypes, statsdf.shape / df.columns / df.dtypesSize, names, kindss.value_counts(normalize=True)Share of each value
Select and filter
df["col"] / df[["a", "b"]]One column / sub-tabledf.loc[rows, cols]By label, end includeddf.iloc[0:5, 0:2]By position, end excludeddf[(cond1) & (cond2)]Filter with anddf.query("amount > @limit")Filter as texts.isin([...]) / ~maskIn a list / not
Clean
pd.to_numeric(s, errors="coerce")Text to number, bad to NaNpd.to_datetime(s, format="%d/%m/%Y")Text to date, explicit formats.str.strip().str.title()Tidy textdf.dropna(subset=[...])Drop rows missing key fieldsdf.drop_duplicates(subset, keep="last")Keep newest copys.astype("category" | "Int64")Save memory / nullable int
Group and reshape
df.groupby(k).agg(n=("c", "sum"))Named aggregationgroupby(k)[c].transform("sum")Group value on every rowdf.pivot_table(index, columns, values, aggfunc)Spreadsheet pivotdf.melt(id_vars, var_name, value_name)Wide to longa.merge(b, on, how, validate)SQL style join, checkedpd.concat(list, ignore_index=True)Stack tables
Dates
s.dt.year / .dt.month / .dt.day_name()Date partss.dt.to_period("M")Month labeldf.resample("ME").sum()Monthly totals (date index)s.rolling("7D").mean()7 day moving averages.dt.as_unit("ns")Change time resolution