Python
Pandas
Session VI
Norms
Take Notes! Do It With Me! Participate!
Agenda
1. What are Pandas?
2. Data Analysis in Pandas!
What are Pandas?
Pandas!
● Used for working with data sets.
● Has functions for analyzing, cleaning,
exploring, and manipulating data.
● The name “Pandas” has a reference to
both “Panel Data”, and “Panel Data
Analysis”.
Why Pandas?
Pandas!
● Allow us to analyze big data and make
conclusions based on statistical theories.
● Can achieve same result writing 1-2 lines
using Pandas, compared to Native Python.
● Can clean messy data sets, analyse &
manipulate it according to your needs, and
make them readable and relevant.
How to work with Pandas?
Pandas!
● Install it using this command:
C:\Users\Your Name>pip install pandas
Pandas!
Once Pandas are installed, import in your applications using import keyword.
Pandas!
Pandas as pd
What is the major difference between
Pandas and Numpy?
Pandas & NumPy
Pandas Numpy
1. Pandas perform better than 1. Numpy performs better for
Numpy for 500k rows or 50k rows or less.
more.
2. Elements in numpy arrays
2. Pandas Series Object is are accessed by their
more flexible as you can default integer position.
define your own labeled
index to index and access
elements of an array.
Have you understood the difference
between Numpy & Pandas?
What are the Data Structures in Pandas?
Data Structures in Pandas!
How to work with Pandas Series?
Pandas Series!
Pandas Series!
Pandas Series!
Activity!
● Create a pandas series from list of marks of
semester 1, which are given below and
index them Maths, Physics, and Chemistry.
○ [84, 99, 95]
How to work with Data Frames?
Data Frames!
Data Frames!
Activity!
● Create a pandas dataframe from list of
marks of semester 1, 2, 3, and 4, which are
given below and index them Maths, Physics,
and Chemistry.
○ Semester 1: [84, 99, 95]
○ Semester 2: [70, 89, 85]
○ Semester 3: [85, 90, 92]
○ Semester 4: [91, 87, 79]
How to load files into a Data Frame?
Data frames!
Data frames!
Activity!
● Create a pandas dataframe from the excel
sheet given below.
https://drive.google.com/file/d/1gnhK5D4tA6
KxqpcYgOU8J3qT7LLlrIpS/view?usp=sharing
How to analyse datasets using Pandas?
Pandas!
Viewing the data!
Pandas!
Pandas!
Info about the data!
Activity!
● Analyse the data from given excel sheet.
https://1drv.ms/x/s!Ap_GgDMbe1UbgROB6fFGN
g2TO_ke?e=MIetzs
What we learnt today!
● What are Pandas?
● Working with Pandas!
Time for Feedback!
1. Click on the feedback form link.
2. Enter your personal details.
3. Rate the session based on
a. Overall Experience
b. Trainer
c. Content
4. Then click on Submit…!
Doubts?
Key Takeaways
What is your one key takeaway from the session?