DMV - 5 - Jupyter Notebook
DMV - 5 - Jupyter Notebook
In [3]: data.head()
Out[3]:
Transaction Customer Product Price per Total
Date Gender Age Quantity
ID ID Category Unit Amount
2023-
0 1 CUST001 Male 34 Beauty 3 50 150
11-24
2023-
1 2 CUST002 Female 26 Clothing 2 500 1000
02-27
2023-
2 3 CUST003 Male 50 Electronics 1 30 30
01-13
2023-
3 4 CUST004 Male 37 Clothing 1 500 500
05-21
2023-
4 5 CUST005 Male 30 Beauty 2 50 100
05-06
In [4]: data.info()
<class 'pandas.core.frame.DataFrame'>
RangeIndex: 1000 entries, 0 to 999
Data columns (total 9 columns):
# Column Non-Null Count Dtype
--- ------ -------------- -----
0 Transaction ID 1000 non-null int64
1 Date 1000 non-null object
2 Customer ID 1000 non-null object
3 Gender 1000 non-null object
4 Age 1000 non-null int64
5 Product Category 1000 non-null object
6 Quantity 1000 non-null int64
7 Price per Unit 1000 non-null int64
8 Total Amount 1000 non-null int64
dtypes: int64(5), object(4)
memory usage: 70.4+ KB
In [5]: data.describe()
Out[5]:
Transaction ID Age Quantity Price per Unit Total Amount
localhost:8888/notebooks/BE_PRACTICALS/DMV_5.ipynb 1/5
10/6/24, 8:03 PM DMV_5 - Jupyter Notebook
In [6]: data.isnull().sum()
Out[6]: Transaction ID 0
Date 0
Customer ID 0
Gender 0
Age 0
Product Category 0
Quantity 0
Price per Unit 0
Total Amount 0
dtype: int64
localhost:8888/notebooks/BE_PRACTICALS/DMV_5.ipynb 2/5
10/6/24, 8:03 PM DMV_5 - Jupyter Notebook
Top-performing regions:
Product Category Total Amount
2 Electronics 156905
1 Clothing 155580
0 Beauty 143515
localhost:8888/notebooks/BE_PRACTICALS/DMV_5.ipynb 3/5
10/6/24, 8:03 PM DMV_5 - Jupyter Notebook
localhost:8888/notebooks/BE_PRACTICALS/DMV_5.ipynb 4/5
10/6/24, 8:03 PM DMV_5 - Jupyter Notebook
In [ ]:
localhost:8888/notebooks/BE_PRACTICALS/DMV_5.ipynb 5/5