Topics in this subject
Pandas 2 min read Updated 4 Aug 2026

Final Revision Cheat Sheets

readcsv, head, info, describe, loc, iloc, groupby, agg,

NumPy — Creation#

Function Result
np.array(x) from list
np.arange(a,b,s) range by step
np.linspace(a,b,n) range by count
np.zeros/ones/full/empty(shape) filled arrays
np.eye(n)/identity(n) identity
np.random.default_rng(seed) RNG

NumPy — Manipulation#

Function Result
reshape / ravel / flatten change shape
.T / transpose / swapaxes reorder axes
expand_dims / squeeze add/drop axes
concatenate / stack / vstack / hstack combine
split / array_split divide

NumPy — Compute#

Function Result
sum/mean/std/min/max (axis=) reductions
sort/argsort/argmax/argmin order
where / nonzero / unique / clip select/transform
dot / @ / matmul matrix mult
linalg.inv/det/solve/eig/svd/norm linear algebra

Pandas — Inspect#

Method Result
head/tail/sample peek rows
info/describe/dtypes/shape overview
value_counts/nunique/unique categories
isna().sum() missing count

Pandas — Select#

Method Result
loc[label] / iloc[pos] rows
df[mask] / query() filter
isin / between / where / mask conditional
at / iat fast scalar

Pandas — Transform#

Method Result
fillna/dropna/replace missing
drop_duplicates dedupe
astype/to_numeric/to_datetime types
assign/apply/map/pipe columns
rename/drop/insert structure

Pandas — Aggregate & Reshape#

Method Result
groupby().agg/transform/filter split-apply-combine
merge/join/concat combine
pivot_table/melt/stack/unstack/crosstab reshape
sort_values/nlargest/nsmallest order
rolling/expanding/ewm/resample windows & time

The 20 functions you will use most#

read_csv, head, info, describe, loc, iloc, groupby, agg, merge, pivot_table, fillna, dropna, value_counts, sort_values, apply, astype, to_datetime, rolling, np.where, np.array.


📌 Final word: The two skills that separate beginners from professionals are (1) thinking in vectors — replacing loops with array/column operations, and (2) mastering the split-apply-combine pattern with groupby + transform/agg. Everything else is vocabulary. Practice the exercises until these two feel automatic.

End of handbook.