Online Shopping Behaviour
Analysis using
Python Pandas
INFORMATICS PRACTICES
SUBMITTED TO: MR. KAMLESH RAJAK
SUBMITTED BY :PRATHA MISHRA
FROM CLASS: XII ‘C’
2025-2026
Acknowledgement
I would like to express my sincere
gratitude to my Informatics practices
teacher, MR. KAMLESH KU. RAJAK, for
their valuable guidance, support, and
encouragement throughout the completion
of this project titled “Online Shopping
Behaviour Analysis using Python
Pandas.”
I also thank CBSE and my school PM
SHRI KENDRIYA VIDYALAYA VEHICLE
FACTORY JABALPUR for providing this
opportunity to explore and apply real-
world data analysis using Python. This
project helped me enhance my
programming and analytical skills.
Lastly, I am thankful to my friends and
family for their constant support during
this project.
– Pratha Mishra
Class: 12th ‘C’ | Roll No:
Certificate
This is to certify that PRATHA MISHRA a student
of Class 12th COMMERCE, has successfully
completed the Computer Science project titled
“Online Shopping Behaviour Analysis using
Python Pandas”
as per the guidelines prescribed by the Central
Board of Secondary Education (CBSE) for the
academic session 2025-2026
The project is the result of their sincere effort,
creativity, and application of the concepts taught in
the subject “Informatics Practices.”
We wish them all the best for their future
endeavors.
Teacher’s Signature: ___________________
Teacher’s Name: MR. KAMLESH KUMAR RAJAK
Date:
Introduction
Online shopping has become a major trend in
today’s digital world. This project aims to
analyze customers' online shopping behavior
using Python and the Pandas library. By using
basic data handling tools, we uncover patterns
such as preferred product categories, average
spending, and popular payment methods.
Features of the Project
•Reads and processes CSV data using Pandas
•Shows gender-wise and age-wise shopper distribution
•Analyzes preferred payment methods
•Displays average purchase amount per city
•Uses bar graphs and histograms for data visualization
•Identifies most popular product categories
•All analysis done using Class 12-level Pandas concepts
Code Explanation
import pandas as pd
To use Pandas library for data handling.
Required whenever working with tabular data like CSV files
df = pd.read_csv("shopping_data.csv")
Reads the CSV file into a DataFrame.
Used to load data into Python for analysis.
df.head()
Shows the first 5 rows of the dataset.
Helpful to get a quick look at the data .
df['Gender'].value_counts()
Counts values in the 'Gender' column.
Used to check how many males/females are there.
plt.hist(df['Age'])
Shows age distribution in a histogram.
Used to find which age group shops more.
df.groupby('City')['PurchaseAmount'].mean()
Groups data by city and finds average purchase.
Used to compare city-wise spending.
df['ProductCategory'].value_counts()
Counts each product category’s frequency.
Used to find most shopped categories .
df.groupby('City')['PurchaseAmount'].mean().plot(kin
d='bar')
Plots average purchase by city as bar chart.
Used to compare city-wise shopping behavior.
sns.countplot(x='Gender', data=df)
Creates a bar graph for gender distribution.
Used to visualize how many male/female customers.
plt.show()
Displays all the graphs created.
Must be used at the end of plotting.
Code Implementation
Conclusion
This project, “Online Shopping Behaviour
Analysis using Python Pandas,” helped me
understand how data handling techniques can be
used to analyze real-world trends. I explored
customer behavior by studying purchase patterns,
age distribution, popular product categories, and
payment methods using basic Python functions from
our syllabus.
It improved my coding skills, analytical thinking, and
knowledge of data visualization. I also realized how
useful Python is in fields like e-commerce and
marketing. Overall, the project gave me hands-on
experience with Pandas and taught me the practical
value of data analysis in today's digital world.
THANK YOU!