Cheat sheets
Pandas cheat sheet
Quick reference for the most-used pandas commands to load, explore, clean, and transform DataFrames.
Load and explore data
pd.read_csv('file.csv')- Loads a CSV into a DataFrame.
df.head(n)- Shows the first n rows (5 by default).
df.info()- Column types, nulls, and memory usage.
df.describe()- Summary statistics for numeric columns.
df.shape- Tuple of (rows, columns).
df.columns- List of column names.
df.dtypes- Data type of each column.
Select and filter
df['column']- Selects one column as a Series.