Pandas_Notes is a structured, easy-to-understand collection of pandas notes, examples, cheat-sheets, and hands-on practice files to master data analysis, data cleaning, transformation, and exploration using Pythonβs pandas library.
- What: Beginner-friendly + professional pandas notes for practical use.
- Who: Data Analysts, Students, Python Learners & Interview Preparation.
- Covers: DataFrames, I/O, cleaning, merging, grouping, reshaping, time series & performance.
- Introduction
- Why pandas?
- Repository Structure
- How to Use
- Step-by-Step Topics
- Code Examples
- CheatSheet & Practice
- Contributing
- Tags
- License
pandas is a powerful Python library for working with structured (tabular) data.
It provides two essential data structures:
- Series β 1D labeled array
- DataFrame β 2D table-like data
This repository simplifies pandas concepts using short notes, clean examples, cheat sheets, and real-world tasks.
- Easy handling of tabular data
- Fast CSV/Excel/SQL reading & writing
- Powerful groupby + aggregation
- Simple merging, joining, concatenation
- Supports time series, reshaping & pivoting
- Ideal for data analysis & ML pipelines
Pandas_Notes/
ββ README.md
ββ Introduction_to_Pandas.md
ββ 01_Series_and_DataFrame.md
ββ 02_IO_Read_Write.md
ββ 03_Indexing_Filtering.md
ββ 04_Missing_Data.md
ββ 05_GroupBy_Aggregation.md
ββ 06_Merge_Join_Concat.md
ββ 07_Reshape_Pivot.md
ββ 08_TimeSeries.md
ββ 09_Performance.md
ββ 10_Practice_Problems.md
ββ Examples/
β ββ basics.ipynb
β ββ cleaning_examples.py
β ββ groupby_examples.ipynb
ββ CheatSheet.pdf
ββ images/
ββ pandas.png
git clone https://github.com/Ashwin18-Offcl/Pandas_Notes.git
cd Pandas_Notespython -m venv venv
source venv/bin/activate # macOS/Linux
venv\Scripts\activate # Windowspip install pandas jupyter matplotlibjupyter notebook Examples/basics.ipynb
python Examples/cleaning_examples.py- Series & DataFrame basics
- Creating DataFrames
- Reading data: CSV, Excel, JSON
- Indexing & slicing (
loc,iloc) - Filtering with conditions
- Handle missing data (dropna, fillna)
- GroupBy, aggregation, transform
- Merging & joining tables
- Concatenate, append, combine
- Reshape with pivot, melt, stack
- Time series: resample, shifting
- Categorical data & memory optimization
- Rolling/expanding windows
.query()&.eval()performance tricks- Real world data cleaning workflows
import pandas as pd
df = pd.DataFrame({
"Name": ["A", "B", "C"],
"Age": [20, 30, 25],
"Score": [85, 90, 88]
})
print(df)df = pd.read_csv("data.csv")
df.dropna(subset=["Age"], inplace=True)
df["Age"] = df["Age"].astype(int)grouped = df.groupby("Department").agg(
total_salary=("Salary", "sum"),
avg_salary=("Salary", "mean"),
employees=("ID", "count")
)
print(grouped)merged = orders.merge(customers, on="customer_id", how="left")pivot = df.pivot_table(
index="Region",
columns="Product",
values="Sales",
aggfunc="sum",
fill_value=0
)
print(pivot)df["Date"] = pd.to_datetime(df["Date"])
df.set_index("Date", inplace=True)
monthly = df["Sales"].resample("M").sum()- CheatSheet.pdf provides quick formulas & function summaries
- Practice problems include:
- Cleaning datasets
- GroupBy challenges
- Pivot table transformations
- Time series operations
- End-to-end data manipulation tasks
Contributions are welcome!
You can add:
- More examples
- Additional topic explanations
- New practice problems
- Bug fixes or formatting improvements
Steps:
- Fork this repo
- Create a new branch
- Commit changes
- Submit a Pull Request
python, pandas, data-analysis, data-cleaning, data-science, pandas-notes, jupyter, cheat-sheet, learning-resources
