PRESENTATION
By Rishabh Dubey
AGENDA
1️⃣ Quick Revision Quiz (POP & OOP)
2️⃣ Introduction to Pandas (What & Why, 10 min)
3️⃣ Core Pandas Concepts (Series & DataFrame, 10 min)
4️⃣ Essential Pandas Functions (Head, Tail, Info, Describe, etc., 30 min)
5️⃣ Data Cleaning & Manipulation (Handling missing values, filtering,
grouping, merging, 20 min)
6️⃣ Class Hands-on Exercise (Apply learned concepts, 10 min)
7️⃣Q&A & Wrap-up (5 min)
Quiz Time
QUICK REVISION QUIZ (MCQS &
TRUE/FALSE)
Q1: Which of the following is NOT a valid lambda
function syntax?
A) lambda x: x + 2
B) lambda x, y: x * y
C) lambda: print("Hello")
D) lambda x: (x**2, x**3)
QUICK REVISION QUIZ (MCQS &
TRUE/FALSE)
Q2: What keyword is used to define a class in Python?
A) class
B) def
C) object
D) self
QUICK REVISION QUIZ (MCQS &
TRUE/FALSE)
Q3: How do you indicate a private variable in Python?
A) _var
B) __var
C) var
D) private var
QUICK REVISION QUIZ (MCQS &
TRUE/FALSE)
Q4: Which type of inheritance allows a class to inherit
from multiple parent classes?
A) Single
B) Multilevel
C) Multiple
D) Hybrid
QUICK REVISION QUIZ (MCQS &
TRUE/FALSE)
Q5: What happens when a child class has a method with
the same name as a method in the parent class?
A) Parent method is always called
B) Child method overrides the parent method
C) Python throws an error
D) Both methods execute
Introduction to
Pandas
INTRODUCTION TO PANDAS
📌 What is Pandas?
Python library for data manipulation & analysis
Built on NumPy, designed for handling structured
data
Key components: Series (1D) & DataFrame (2D)
BASIC PANDAS OBJECTS
📌 Series – 1D labeled array
📌 DataFrame – 2D table-like data
PANDAS SERIES (1D DATA STRUCTURE)
📌 What is a Pandas Series?
A one-dimensional labeled array (like a list with an index)
Can store integers, floats, strings, or objects
📝 Creating a Series from a List 🛠 Key Features:
import pandas as pd
✅ Auto-generated index (0,1,2,…)
✅ Supports custom indexing
data = [10, 20, 30, 40] ✅ Fast & optimized
s = pd.Series(data)
print(s)
PANDAS DATAFRAME (2D DATA STRUCTURE)
📌 What is a DataFrame?
A two-dimensional table (like an Excel sheet)
Rows & columns with labeled axes
📝 Creating a DataFrame from a Dictionary 🛠 Key Features:
✅ Handles structured data
data = { easily
'Name': ['Alice', 'Bob', 'Charlie'], ✅ Supports filtering,
sorting, and
'Age': [25, 30, 35] transformations
} ✅ Can import/export data
(CSV, Excel, SQL)
df = pd.DataFrame(data)
print(df)
WAYS TO CREATE PANDAS SERIES &
DATAFRAMES
📌 Ways to Create a Pandas Series
1️⃣ From a List
2️⃣ From a NumPy Array
3️⃣ From a Dictionary (Key = Index, Value = Data)
📌 Ways to Create a Pandas DataFrame
1️⃣ From a Dictionary
2️⃣ From a List of Lists
3️⃣ From a NumPy Array
ESSENTIAL PANDAS FUNCTIONS
📌 Exploring Data in Pandas
1️⃣ head(n) & tail(n) – View the first & last n rows
2️⃣ info() – Summary of dataset (data types, memory usage)
3️⃣ describe() – Statistical summary (mean, min, max, etc.)
4️⃣ shape & columns – Get dimensions & column names
5️⃣ value_counts() – Count unique values in a column
PRACTICE QUESTION
1️⃣ Load the dataset (Create your own)
2️⃣ Display the first 7 rows using head()
3️⃣ Get dataset summary with info()
4️⃣ Find the mean and max values using describe()
5️⃣ Count unique values in a categorical column
DATA CLEANING & MANIPULATION
📌 Key Concepts
1️⃣ Handling Missing Values – dropna(), fillna(), isnull().sum()
2️⃣ Filtering Data – Conditional selection using loc[] & query()
3️⃣ Grouping & Aggregation – groupby(), agg() for summary statistics
4️⃣ Merging & Joining – merge(), concat() for combining datasets
THANK YOU