Diwali_Sales_Analysis - Jupyter Notebook
Diwali_Sales_Analysis - Jupyter Notebook
In [9]: df.shape
In [10]: df.head()
Out[10]:
Age
User_ID Cust_name Product_ID Gender Age Marital_Status State
Group
In [11]: df.info()
<class 'pandas.core.frame.DataFrame'>
RangeIndex: 11251 entries, 0 to 11250
Data columns (total 15 columns):
# Column Non-Null Count Dtype
--- ------ -------------- -----
0 User_ID 11251 non-null int64
1 Cust_name 11251 non-null object
2 Product_ID 11251 non-null object
3 Gender 11251 non-null object
4 Age Group 11251 non-null object
5 Age 11251 non-null int64
6 Marital_Status 11251 non-null int64
7 State 11251 non-null object
8 Zone 11251 non-null object
9 Occupation 11251 non-null object
10 Product_Category 11251 non-null object
11 Orders 11251 non-null int64
12 Amount 11239 non-null float64
13 Status 0 non-null float64
14 unnamed1 0 non-null float64
dtypes: float64(3), int64(4), object(8)
memory usage: 1.3+ MB
localhost:8888/notebooks/Downloads/Python_Diwali_Sales_Analysis/Python_Diwali_Sales_Analysis/Diwali_Sales_Analysis.ipynb 1/12
10/15/23, 10:28 PM Diwali_Sales_Analysis - Jupyter Notebook
Out[13]: User_ID 0
Cust_name 0
Product_ID 0
Gender 0
Age Group 0
Age 0
Marital_Status 0
State 0
Zone 0
Occupation 0
Product_Category 0
Orders 0
Amount 12
dtype: int64
In [16]: df['Amount'].dtypes
Out[16]: dtype('int32')
In [17]: df.columns
localhost:8888/notebooks/Downloads/Python_Diwali_Sales_Analysis/Python_Diwali_Sales_Analysis/Diwali_Sales_Analysis.ipynb 2/12
10/15/23, 10:28 PM Diwali_Sales_Analysis - Jupyter Notebook
Out[18]:
Age
User_ID Cust_name Product_ID Gender Age Shaadi State Z
Group
Madhya
11248 1001209 Oshin P00201342 F 36-45 40 0 Ce
Pradesh
In [19]: # describe() method returns description of the data in the DataFrame (i.e.
df.describe()
Out[19]:
User_ID Age Marital_Status Orders Amount
localhost:8888/notebooks/Downloads/Python_Diwali_Sales_Analysis/Python_Diwali_Sales_Analysis/Diwali_Sales_Analysis.ipynb 3/12
10/15/23, 10:28 PM Diwali_Sales_Analysis - Jupyter Notebook
Out[20]:
Age Orders Amount
Gender
localhost:8888/notebooks/Downloads/Python_Diwali_Sales_Analysis/Python_Diwali_Sales_Analysis/Diwali_Sales_Analysis.ipynb 4/12
10/15/23, 10:28 PM Diwali_Sales_Analysis - Jupyter Notebook
From above graphs we can see that most of the buyers are females and even the
purchasing power of females are greater than men
localhost:8888/notebooks/Downloads/Python_Diwali_Sales_Analysis/Python_Diwali_Sales_Analysis/Diwali_Sales_Analysis.ipynb 5/12
10/15/23, 10:28 PM Diwali_Sales_Analysis - Jupyter Notebook
Age
localhost:8888/notebooks/Downloads/Python_Diwali_Sales_Analysis/Python_Diwali_Sales_Analysis/Diwali_Sales_Analysis.ipynb 6/12
10/15/23, 10:28 PM Diwali_Sales_Analysis - Jupyter Notebook
From above graphs we can see that most of the buyers are of age group between 26-35 yrs
female
localhost:8888/notebooks/Downloads/Python_Diwali_Sales_Analysis/Python_Diwali_Sales_Analysis/Diwali_Sales_Analysis.ipynb 7/12
10/15/23, 10:28 PM Diwali_Sales_Analysis - Jupyter Notebook
State
From above graphs we can see that most of the orders & total sales/amount are from Uttar
Pradesh, Maharashtra and Karnataka respectively
localhost:8888/notebooks/Downloads/Python_Diwali_Sales_Analysis/Python_Diwali_Sales_Analysis/Diwali_Sales_Analysis.ipynb 8/12
10/15/23, 10:28 PM Diwali_Sales_Analysis - Jupyter Notebook
Marital Status
localhost:8888/notebooks/Downloads/Python_Diwali_Sales_Analysis/Python_Diwali_Sales_Analysis/Diwali_Sales_Analysis.ipynb 9/12
10/15/23, 10:28 PM Diwali_Sales_Analysis - Jupyter Notebook
From above graphs we can see that most of the buyers are married (women) and they have
high purchasing power
Occupation
In [29]: sns.set(rc={'figure.figsize':(20,5)})
ax = sns.countplot(data = df, x = 'Occupation')
for bars in ax.containers:
ax.bar_label(bars)
From above graphs we can see that most of the buyers are working in IT, Healthcare and
Aviation sector
localhost:8888/notebooks/Downloads/Python_Diwali_Sales_Analysis/Python_Diwali_Sales_Analysis/Diwali_Sales_Analysis.ipynb 10/12
10/15/23, 10:28 PM Diwali_Sales_Analysis - Jupyter Notebook
Product Category
In [31]: sns.set(rc={'figure.figsize':(20,5)})
ax = sns.countplot(data = df, x = 'Product_Category')
for bars in ax.containers:
ax.bar_label(bars)
From above graphs we can see that most of the sold products are from Food, Clothing and
Electronics category
localhost:8888/notebooks/Downloads/Python_Diwali_Sales_Analysis/Python_Diwali_Sales_Analysis/Diwali_Sales_Analysis.ipynb 11/12
10/15/23, 10:28 PM Diwali_Sales_Analysis - Jupyter Notebook
Conclusion:
Married women age group 26-35 yrs from UP, Maharastra and Karnataka working in IT,
Healthcare and Aviation are more likely to buy products from Food, Clothing and Electronics
category
Thank you!
localhost:8888/notebooks/Downloads/Python_Diwali_Sales_Analysis/Python_Diwali_Sales_Analysis/Diwali_Sales_Analysis.ipynb 12/12