Online Food Orders Analysis Using Python
Online Food Orders Analysis Using Python
In this project, we aim to analyze a dataset titled "Online Food Orders Analysis with Python."
The dataset contains information about online food orders, including details such as order ID,
customer ID, order date, order time, items ordered, quantity, price, and delivery information. We
will use Python and various data analysis libraries to explore, visualize, and derive insights from
the dataset.
Import Library
In [1]: import pandas as pd
Data Preprocessing
.head()
head is used show to the By default = 5 rows in the dataset
In [4]: df.head()
Out[4]:
Marital Monthly Educational Family Pin
Age Gender Occupation latitude longitude
Status Income Qualifications size code
No
0 20 Female Single Student Post Graduate 4 12.9766 77.5993 560001
Income
Below
1 24 Female Single Student Graduate 3 12.9770 77.5773 560009
Rs.10000
Below
2 22 Male Single Student Post Graduate 3 12.9551 77.6593 560017
Rs.10000
No
3 22 Female Single Student Graduate 6 12.9473 77.5616 560019
Income
Below
4 22 Male Single Student Post Graduate 4 12.9850 77.5533 560010
Rs.10000
.tail()
tail is used to show rows by Descending order
In [5]: df.tail()
Out[5]:
Marital Monthly Educational Family
Age Gender Occupation latitude longitude
Status Income Qualifications size co
No
383 23 Female Single Student Post Graduate 2 12.9766 77.5993 5600
Income
No
384 23 Female Single Student Post Graduate 4 12.9854 77.7081 5600
Income
No
385 22 Female Single Student Post Graduate 5 12.9850 77.5533 5600
Income
Below
386 23 Male Single Student Post Graduate 2 12.9770 77.5773 5600
Rs.10000
No
387 23 Male Single Student Post Graduate 5 12.8988 77.5764 5600
Income
.shape
It show the total no of rows & Column in the dataset
In [6]: df.shape
In [7]: df.columns
.dtypes
This Attribute show the data type of each column
In [8]: df.dtypes
.unique()
In a column, It show the unique value of specific column.
Out[10]: array(['No Income', 'Below Rs.10000', 'More than 50000', '10001 to 25000',
'25001 to 50000'], dtype=object)
.nuique()
It will show the total no of unque value from whole data frame
In [11]: df.nunique()
Out[11]: Age 16
Gender 2
Marital Status 3
Occupation 4
Monthly Income 5
Educational Qualifications 5
Family size 6
latitude 77
longitude 76
Pin code 77
Output 2
Feedback 2
Unnamed: 12 2
dtype: int64
.describe()
It show the Count, mean , median etc
In [12]: df.describe()
Out[12]:
Age Family size latitude longitude Pin code
.value_counts
It Shows all the unique values with their count
In [14]: df.isnull()
Out[14]:
Marital Monthly Educational Family Pi
Age Gender Occupation latitude longitude
Status Income Qualifications size cod
0 False False False False False False False False False Fals
1 False False False False False False False False False Fals
2 False False False False False False False False False Fals
3 False False False False False False False False False Fals
4 False False False False False False False False False Fals
... ... ... ... ... ... ... ... ... ... .
383 False False False False False False False False False Fals
384 False False False False False False False False False Fals
385 False False False False False False False False False Fals
386 False False False False False False False False False Fals
387 False False False False False False False False False Fals
Out[15]: <AxesSubplot:>