Pandas essentials
From raw CSV to real answer in minutes — with the operations you'll use every single day.
Load, inspect, clean and reshape DataFrames
What you'll take away
Load and understand any dataset in a few lines
Clean missing and inconsistent values with confidence
Reshape, group and join data without guesswork
21 entries · click a command to copy
Load and inspect
Load a CSV into a DataFrame.
e.g. df = pd.read_csv('sales.csv')
Preview the first or last five rows.
Get (rows, columns) as a tuple.
Show column names, data types and non-null counts.
Summarise numeric columns with count, mean, spread and quartiles.
Select and filter
Select one column as a Series.
Select several columns as a DataFrame.
Select by label — use df.loc[df.age > 30] for a boolean filter.
Select by integer position.
Filter rows with a readable expression.
e.g. df.query('age > 30 and city == "Pune"')
Clean data
Remove rows containing missing values.
Tip: Use subset=['col'] to drop only where a specific column is missing.
Replace missing values with a chosen value or method.
Remove a column.
Rename columns without mutating the original by default.
Move the index into a regular column.
Transform and aggregate
Sort rows by one or more columns.
Summarise each group with one or more functions.
Compute a single-column statistic.
Count frequencies of values in a Series.
Join two DataFrames on a shared key.
Create a derived column with vectorised arithmetic.
This sheet was curated from reference material in the Skyware AI technical library (Pandas essential commands cheatsheet (Gina Acosta)). Command syntax is factual; explanations, grouping and examples were written by our engineering team. Always verify syntax against your tool or database version.
More cheat sheets
Git commands
A practical Git reference grouped by task: setup, inspecting changes, commits, branches, remotes and undoing mistakes.
OpenSQL data cleaning
A task-oriented SQL reference for string cleanup, NULL handling, type conversion, dates, aggregation and deduplication.
OpenPySpark handbook
A structured quick reference for PySpark setup, DataFrame operations, SQL, writing data and model training — distilled from the full guide.
Open