Skip to content

Ashwin18-Offcl/Pandas_Notes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

8 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Pandas_Notes β€” Complete Pandas Guide (Beginner β†’ Advanced)

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.


πŸ–ΌοΈ Visual Banner

Pandas Banner


πŸš€ Quick Overview

  • 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.

πŸ“š Table of Contents

  1. Introduction
  2. Why pandas?
  3. Repository Structure
  4. How to Use
  5. Step-by-Step Topics
  6. Code Examples
  7. CheatSheet & Practice
  8. Contributing
  9. Tags
  10. License

🧩 Introduction

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.

✨ Why pandas?

  • 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

πŸ“‚ Repository Structure

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

βš™οΈ How to Use

1. Clone the repository

git clone https://github.com/Ashwin18-Offcl/Pandas_Notes.git
cd Pandas_Notes

2. (Optional) Create virtual environment

python -m venv venv
source venv/bin/activate       # macOS/Linux
venv\Scripts\activate          # Windows

3. Install pandas

pip install pandas jupyter matplotlib

4. Run examples

jupyter notebook Examples/basics.ipynb
python Examples/cleaning_examples.py

🧭 Step-by-Step Topics

Beginner

  • Series & DataFrame basics
  • Creating DataFrames
  • Reading data: CSV, Excel, JSON
  • Indexing & slicing (loc, iloc)
  • Filtering with conditions

Intermediate

  • Handle missing data (dropna, fillna)
  • GroupBy, aggregation, transform
  • Merging & joining tables
  • Concatenate, append, combine
  • Reshape with pivot, melt, stack

Advanced

  • Time series: resample, shifting
  • Categorical data & memory optimization
  • Rolling/expanding windows
  • .query() & .eval() performance tricks
  • Real world data cleaning workflows

πŸ§ͺ Code Examples

Create DataFrame

import pandas as pd

df = pd.DataFrame({
    "Name": ["A", "B", "C"],
    "Age": [20, 30, 25],
    "Score": [85, 90, 88]
})
print(df)

Read CSV & clean missing values

df = pd.read_csv("data.csv")
df.dropna(subset=["Age"], inplace=True)
df["Age"] = df["Age"].astype(int)

GroupBy aggregation

grouped = df.groupby("Department").agg(
    total_salary=("Salary", "sum"),
    avg_salary=("Salary", "mean"),
    employees=("ID", "count")
)
print(grouped)

Merge / Join

merged = orders.merge(customers, on="customer_id", how="left")

Pivot Table

pivot = df.pivot_table(
    index="Region",
    columns="Product",
    values="Sales",
    aggfunc="sum",
    fill_value=0
)
print(pivot)

Time Series Resampling

df["Date"] = pd.to_datetime(df["Date"])
df.set_index("Date", inplace=True)
monthly = df["Sales"].resample("M").sum()

πŸ“„ CheatSheet & Practice

  • 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

🀝 Contributing

Contributions are welcome!

You can add:

  • More examples
  • Additional topic explanations
  • New practice problems
  • Bug fixes or formatting improvements

Steps:

  1. Fork this repo
  2. Create a new branch
  3. Commit changes
  4. Submit a Pull Request

🏷 Tags

python, pandas, data-analysis, data-cleaning, data-science, pandas-notes, jupyter, cheat-sheet, learning-resources

About

🐼✨ Pandas_Notes β€” Expertly organized notes, cheat-sheets & interview prep for Python data analysis. Master pandas & NumPy from beginner β†’ advanced with clarity. πŸ“šβš‘

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors