SlideShare a Scribd company logo
1 of 30
Cars details
201870110
Hamza otaif
201870051
Assem al_swadi
201870
Jameel Rasheed
201870
Abdulazeez al_mojurshi
201870
Razwan hanthal
1
Supervised by:
EngOmaer Al_baadani
Prepared by:
Dataset information
2
libararies
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sb
def load_data(dataframe):
global car_data
car_data = pd.read_csv("C:/Users/hamzapc/Desktop/train1.csv")
return car_data
load_data('car_data')
Function that return dataframe
Dataset information
•
Data columns (total 17 columns):
•
# Column Non-Null Count Dtype
•
--- ------ -------------- -----
•
0 Price 19237 non-null int64
•
1 Levy 19237 non-null object
•
2 make 19237 non-null object
•
3 Model 19237 non-null object
•
4 year 19237 non-null int64
•
5 Category 19237 non-null object
•
6 Leather interior 19237 non-null object
•
7 Fuel 19237 non-null object
•
8 Engine_volume 19237 non-null object
•
9 Mileage 19237 non-null object
•
10 Cylinders 19237 non-null int64
•
11 Gear _box _type 19237 non-null object
•
12 Drive wheels 19237 non-null object
•
13 Doors 19237 non-null object
•
14 Wheel 19237 non-null object
•
15 Color 19237 non-null object
•
16 Airbags 19237 non-null int64
•
dtypes: int64(4), object(13)
3
def check_data(data):
"""a function to examine data for cleaning"""
print(data.info())
print('n')
print(f'Columns in the dataframe:n{data.columns}')
print('n')
print(f'There are {data.shape} rows and column in the dataframe.')
print('n')
# duplicate value
duplicate = data.duplicated().sum()
if duplicate == 0:
print(f'There are {duplicate} duplicate rows in the dataframe')
else:
print(f'There are {duplicate} duplicate rows in the dataframe')
print('n')
# missing value
nan_data = pd.DataFrame(data.isna().sum())
if nan_data[0].sum() > 1:
fig = px.bar(nan_data,
title='Missing values',
width=600,
height=500,
orientation='h',
color_discrete_sequence=['darkgreen'])
fig.show()
else:
print('No missing value.')
check_data(car_data)
4
Function that check missing value and dubplicated
Columns in the dataframe:
Index(['Price', 'Levy', 'make', 'Model', 'year', 'Category',
'Leather interior', 'Fuel', 'Engine_volume', 'Mileage', 'Cylinders',
'Gear _box _type', 'Drive wheels', 'Doors', 'Wheel', 'Color',
'Airbags'],
dtype='object')
There are (19237, 17) rows and column in the dataframe.
There are 3512 duplicate rows in the dataframe
No missing value.
<class 'pandas.core.frame.DataFrame'>
RangeIndex: 19237 entries, 0 to 19236
Data columns (total 17 columns): 5
Output of Function that check missing value and duplicated
def remove_duplicate(data):
print('Duplicate sample:')
print(data[data.duplicated()][:5])
# drop duplicate rows and keep first
data = data.drop_duplicates(keep='first')
print('n')
print('Duplicate data have been removed from the dataset.')
remove_duplicate(car_data)
6
Function remove duplicated value
Duplicate sample:
Price Levy make Model year Category Leather interior 
192 314 1053 MERCEDES-BENZ E 350 2014 Sedan Yes
239 2901 503 HONDA Civic 2012 Sedan Yes
264 392 1017 MERCEDES-BENZ E 300 2017 Sedan Yes
331 282 289 FORD Escape 2008 Jeep Yes
347 39829 1811 LEXUS GX 460 2010 Jeep Yes
Fuel Engine_volume Mileage Cylinders Gear _box _type Drive wheels 
192 Diesel 3.5 149486 km 6 Automatic 4x4
239 Hybrid 1.5 146403 km 4 Automatic Front
264 Petrol 2 1600 km 4 Automatic Rear
331 Hybrid 0.4 220474 km 4 Automatic Front
347 Petrol 4.6 155821 km 8 Automatic 4x4
Doors Wheel Color Airbags
192 4-May Left wheel Silver 12
239 4-May Left wheel White 0
264 4-May Left wheel Black 12
331 4-May Left wheel Grey 0
347 4-May Left wheel Black 0
7
Output of Function that remove duplicated value
def campony():
print("camponys number= ", car_data['make'].nunique())
print("camponys:", car_data['make'].unique())
print('n')
campony()
8
The Manufacturers of cars
camponys number= 65
camponys: ['LEXUS' 'CHEVROLET' 'HONDA' 'FORD' 'HYUNDAI' 'TOYOTA' 'MERCEDES-BENZ'
'OPEL' 'PORSCHE' 'BMW' 'JEEP' 'VOLKSWAGEN' 'AUDI' 'RENAULT' 'NISSAN'
'SUBARU' 'DAEWOO' 'KIA' 'MITSUBISHI' 'SSANGYONG' 'MAZDA' 'GMC' 'FIAT'
'INFINITI' 'ALFA ROMEO' 'SUZUKI' 'ACURA' 'LINCOLN' 'VAZ' 'GAZ' 'CITROEN'
'LAND ROVER' 'MINI' 'DODGE' 'CHRYSLER' 'JAGUAR' 'ISUZU' 'SKODA'
'DAIHATSU' 'BUICK' 'TESLA' 'CADILLAC' 'PEUGEOT' 'BENTLEY' 'VOLVO' 'სხვა'
'HAVAL' 'HUMMER' 'SCION' 'UAZ' 'MERCURY' 'ZAZ' 'ROVER' 'SEAT' 'LANCIA'
'MOSKVICH' 'MASERATI' 'FERRARI' 'SAAB' 'LAMBORGHINI' 'ROLLS-ROYCE'
'PONTIAC' 'SATURN' 'ASTON MARTIN' 'GREATWALL']
Output
Function give fuel type:-
def fuel():
print("fuel types number= ", car_data['Fuel'].nunique())
print("fuel types ", car_data['Fuel'].unique())
print('n')
fuel()
9
output
fuel types number= 7
fuel types ['Hybrid' 'Petrol' 'Diesel' 'CNG' 'Plug-in Hybrid' 'LPG' 'Hydrogen']
function give doors of cars
def door():
print("door type number= ", car_data['Doors'].nunique())
print("door type ", car_data['Doors'].unique())
print('n')
door()
10
door type number= 3
door type ['4-May' '2-Mar' '>5']
output
Function give The most color & wheel type & fuel type
def best():
plt.figure(figsize=(14, 8))
plt.subplot(1, 3, 1)
plt1 = car_data.Color.value_counts().plot(kind='bar')
plt.title('Colors Histogram')
plt1.set(xlabel='Colors', ylabel='Frequency of company')
plt.subplot(1, 3, 2)
plt1 = car_data.Wheel.value_counts().plot(kind='bar')
plt.title('wheel Type Histogram')
plt1.set(xlabel='wheel Type', ylabel='Frequency of wheel type')
plt.subplot(1, 3, 3)
plt1 = car_data.Fuel.value_counts().plot(kind='bar')
plt.title('fuel type Histogram')
plt1.set(xlabel='fuel', ylabel='Frequency of Car type')
plt.show()
best()
11
Function search I want car
12
def search(com, model, fuel, color, geer, year):
com_data = car_data.loc[(car_data['make'] == com) & (car_data['Model'] == model) & (car_data['Fuel'] == fuel)
& (car_data['Color'] == color) & (car_data['Gear _box _type'] == geer)
& (car_data['year'] == year)]
print(com_data)
#search('TOYOTA','Camry','Petrol','White','Automatic',2020)
Price Levy make Model year Category Leather interior Fuel 
39829 1323 TOYOTA Camry 2020 Sedan Yes Petrol
Engine_volume Mileage Cylinders Gear _box _type Drive Doors 
2.5 4130 km 4 Automatic Front 4-May
Wheel Color Airbags
Left wheel White 12
Output of function
13
Function give the graph company that make cars
def best_maker():
plt.figure(figsize=(14, 8))
plt1 = car_data.make.value_counts().plot(kind='bar')
plt11 = car_data.make.value_counts()
print(plt11)
plt.title('Car Options Histogram')
plt1.set(xlabel='Car Options', ylabel='Frequency of Car type')
plt.show()
14
TOYOTA COMPANY
15
HYUNDAI COMPANY
16
HONDA COMPANY
17
LEXUS COMPANY
18
NISSAN COMPANY
19
HUMMER COMPANY
20
KIA COMPANY
21
OPEL COMPANY
22
VOLVO COMPANY
23
This function give the number of cars per year and per price and per gear box
def seabornplot2():
plt.subplot(3,1,1)
sb.histplot(data=car_data,x="year")
plt.subplot(3,1,2)
sb.histplot(data=car_data[:50], x="Price")
plt.subplot(3,1,3)
sb.histplot(data=car_data, x="Gear _box _type")
plt.show()
seabornplot2()
24
Output function give the number of cars per year and per price and per gear box
25
This function give year`s making for knowledge companies for you and
number of cars at this year
def seaborn2():
com_data = car_data[(car_data['make'] == 'TOYOTA') | (car_data['make'] == 'HYUNDAI') | (car_data['make'] == 'HONDA')
| (car_data['make'] == 'LEXUS') | (car_data['make'] == 'NISSAN')
| (car_data['make'] == 'KIA') | (car_data['make'] == 'OPEL') | (car_data['make'] == 'VOLVO')]
n_car=com_data.groupby(['year'])['make'].value_counts()[:30]
n_car.plot(kind='barh')
plt.show()
seaborn2()
26
Output cars for makers at one year
27
Relation between price of car and company
28
sb.catplot(x="make", y="Price", data=dat)
plt.show()
Relation between engine volume and price for 10rows only
29
dat=com_data[:10]
print(dat)
sb.displot(data=dat,x='Engine_volume',col='Price')
plt.show()
Thank you!!!!
30

More Related Content

Similar to cars design code power system detai.pptx

Automobile.javapublic class Automobile {    Declaring instan.pdf
Automobile.javapublic class Automobile {    Declaring instan.pdfAutomobile.javapublic class Automobile {    Declaring instan.pdf
Automobile.javapublic class Automobile {    Declaring instan.pdf
anitasahani11
 
2006 DODGE RAM TRUCK Service Repair Manual
2006 DODGE RAM TRUCK Service Repair Manual2006 DODGE RAM TRUCK Service Repair Manual
2006 DODGE RAM TRUCK Service Repair Manual
jkksmemmd
 
#include iostream#include string#include iomanip#inclu.docx
#include iostream#include string#include iomanip#inclu.docx#include iostream#include string#include iomanip#inclu.docx
#include iostream#include string#include iomanip#inclu.docx
mayank272369
 
I need this code, to show ALL inventory items, then with the remove .pdf
I need this code, to show ALL inventory items, then with the remove .pdfI need this code, to show ALL inventory items, then with the remove .pdf
I need this code, to show ALL inventory items, then with the remove .pdf
aggarwalshoppe14
 
Flink Forward Berlin 2018: Dawid Wysakowicz - "Detecting Patterns in Event St...
Flink Forward Berlin 2018: Dawid Wysakowicz - "Detecting Patterns in Event St...Flink Forward Berlin 2018: Dawid Wysakowicz - "Detecting Patterns in Event St...
Flink Forward Berlin 2018: Dawid Wysakowicz - "Detecting Patterns in Event St...
Flink Forward
 
2012 deep research report on china automotive eps industry
2012 deep research report on china automotive eps industry2012 deep research report on china automotive eps industry
2012 deep research report on china automotive eps industry
smarter2011
 
2003 DODGE RAM TRUCK Service Repair Manual
2003 DODGE RAM TRUCK Service Repair Manual2003 DODGE RAM TRUCK Service Repair Manual
2003 DODGE RAM TRUCK Service Repair Manual
jksemd dysjekmdm
 
2003 DODGE RAM TRUCK Service Repair Manual
2003 DODGE RAM TRUCK Service Repair Manual2003 DODGE RAM TRUCK Service Repair Manual
2003 DODGE RAM TRUCK Service Repair Manual
jdksmemd
 
Semantic search in databases
Semantic search in databasesSemantic search in databases
Semantic search in databases
Tomáš Drenčák
 

Similar to cars design code power system detai.pptx (20)

R, Scikit-Learn and Apache Spark ML - What difference does it make?
R, Scikit-Learn and Apache Spark ML - What difference does it make?R, Scikit-Learn and Apache Spark ML - What difference does it make?
R, Scikit-Learn and Apache Spark ML - What difference does it make?
 
R Programming: Transform/Reshape Data In R
R Programming: Transform/Reshape Data In RR Programming: Transform/Reshape Data In R
R Programming: Transform/Reshape Data In R
 
Intro to Data Analysis with python part 1
Intro to Data Analysis with python part 1Intro to Data Analysis with python part 1
Intro to Data Analysis with python part 1
 
Vehicle Parking System Project
Vehicle Parking System ProjectVehicle Parking System Project
Vehicle Parking System Project
 
Automobile.javapublic class Automobile {    Declaring instan.pdf
Automobile.javapublic class Automobile {    Declaring instan.pdfAutomobile.javapublic class Automobile {    Declaring instan.pdf
Automobile.javapublic class Automobile {    Declaring instan.pdf
 
2006 DODGE RAM TRUCK Service Repair Manual
2006 DODGE RAM TRUCK Service Repair Manual2006 DODGE RAM TRUCK Service Repair Manual
2006 DODGE RAM TRUCK Service Repair Manual
 
#include iostream#include string#include iomanip#inclu.docx
#include iostream#include string#include iomanip#inclu.docx#include iostream#include string#include iomanip#inclu.docx
#include iostream#include string#include iomanip#inclu.docx
 
I need this code, to show ALL inventory items, then with the remove .pdf
I need this code, to show ALL inventory items, then with the remove .pdfI need this code, to show ALL inventory items, then with the remove .pdf
I need this code, to show ALL inventory items, then with the remove .pdf
 
More Than po: Debugging in LLDB @ CocoaConf SJ 2015
More Than po: Debugging in LLDB @ CocoaConf SJ 2015More Than po: Debugging in LLDB @ CocoaConf SJ 2015
More Than po: Debugging in LLDB @ CocoaConf SJ 2015
 
Online_Car_Rental_System_A_Project_Prese.pdf
Online_Car_Rental_System_A_Project_Prese.pdfOnline_Car_Rental_System_A_Project_Prese.pdf
Online_Car_Rental_System_A_Project_Prese.pdf
 
Flink Forward Berlin 2018: Dawid Wysakowicz - "Detecting Patterns in Event St...
Flink Forward Berlin 2018: Dawid Wysakowicz - "Detecting Patterns in Event St...Flink Forward Berlin 2018: Dawid Wysakowicz - "Detecting Patterns in Event St...
Flink Forward Berlin 2018: Dawid Wysakowicz - "Detecting Patterns in Event St...
 
2012 deep research report on china automotive eps industry
2012 deep research report on china automotive eps industry2012 deep research report on china automotive eps industry
2012 deep research report on china automotive eps industry
 
#include iostream #include string #include fstream std.docx
#include iostream #include string #include fstream  std.docx#include iostream #include string #include fstream  std.docx
#include iostream #include string #include fstream std.docx
 
2001 Dodge Dakota Service Repair Manual.pdf
2001 Dodge Dakota Service Repair Manual.pdf2001 Dodge Dakota Service Repair Manual.pdf
2001 Dodge Dakota Service Repair Manual.pdf
 
2001 Dodge Dakota Service Repair Manual.pdf
2001 Dodge Dakota Service Repair Manual.pdf2001 Dodge Dakota Service Repair Manual.pdf
2001 Dodge Dakota Service Repair Manual.pdf
 
Report On Travel Cab Agency
Report On Travel Cab AgencyReport On Travel Cab Agency
Report On Travel Cab Agency
 
SQL
SQLSQL
SQL
 
2003 DODGE RAM TRUCK Service Repair Manual
2003 DODGE RAM TRUCK Service Repair Manual2003 DODGE RAM TRUCK Service Repair Manual
2003 DODGE RAM TRUCK Service Repair Manual
 
2003 DODGE RAM TRUCK Service Repair Manual
2003 DODGE RAM TRUCK Service Repair Manual2003 DODGE RAM TRUCK Service Repair Manual
2003 DODGE RAM TRUCK Service Repair Manual
 
Semantic search in databases
Semantic search in databasesSemantic search in databases
Semantic search in databases
 

Recently uploaded

B. Smith. (Architectural Portfolio.).pdf
B. Smith. (Architectural Portfolio.).pdfB. Smith. (Architectural Portfolio.).pdf
B. Smith. (Architectural Portfolio.).pdf
University of Wisconsin-Milwaukee
 
Verified Trusted Call Girls Adugodi💘 9352852248 Good Looking standard Profil...
Verified Trusted Call Girls Adugodi💘 9352852248  Good Looking standard Profil...Verified Trusted Call Girls Adugodi💘 9352852248  Good Looking standard Profil...
Verified Trusted Call Girls Adugodi💘 9352852248 Good Looking standard Profil...
kumaririma588
 
Abortion pill for sale in Muscat (+918761049707)) Get Cytotec Cash on deliver...
Abortion pill for sale in Muscat (+918761049707)) Get Cytotec Cash on deliver...Abortion pill for sale in Muscat (+918761049707)) Get Cytotec Cash on deliver...
Abortion pill for sale in Muscat (+918761049707)) Get Cytotec Cash on deliver...
instagramfab782445
 
Abortion Pills in Oman (+918133066128) Cytotec clinic buy Oman Muscat
Abortion Pills in Oman (+918133066128) Cytotec clinic buy Oman MuscatAbortion Pills in Oman (+918133066128) Cytotec clinic buy Oman Muscat
Abortion Pills in Oman (+918133066128) Cytotec clinic buy Oman Muscat
Abortion pills in Kuwait Cytotec pills in Kuwait
 
infant assessment fdbbdbdddinal ppt.pptx
infant assessment fdbbdbdddinal ppt.pptxinfant assessment fdbbdbdddinal ppt.pptx
infant assessment fdbbdbdddinal ppt.pptx
suhanimunjal27
 
VVIP CALL GIRLS Lucknow 💓 Lucknow < Renuka Sharma > 7877925207 Escorts Service
VVIP CALL GIRLS Lucknow 💓 Lucknow < Renuka Sharma > 7877925207 Escorts ServiceVVIP CALL GIRLS Lucknow 💓 Lucknow < Renuka Sharma > 7877925207 Escorts Service
VVIP CALL GIRLS Lucknow 💓 Lucknow < Renuka Sharma > 7877925207 Escorts Service
aroranaina404
 
RT Nagar Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Bang...
RT Nagar Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Bang...RT Nagar Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Bang...
RT Nagar Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Bang...
amitlee9823
 
call girls in Dakshinpuri (DELHI) 🔝 >༒9953056974 🔝 genuine Escort Service 🔝✔️✔️
call girls in Dakshinpuri  (DELHI) 🔝 >༒9953056974 🔝 genuine Escort Service 🔝✔️✔️call girls in Dakshinpuri  (DELHI) 🔝 >༒9953056974 🔝 genuine Escort Service 🔝✔️✔️
call girls in Dakshinpuri (DELHI) 🔝 >༒9953056974 🔝 genuine Escort Service 🔝✔️✔️
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Call Girls Basavanagudi Just Call 👗 7737669865 👗 Top Class Call Girl Service ...
Call Girls Basavanagudi Just Call 👗 7737669865 👗 Top Class Call Girl Service ...Call Girls Basavanagudi Just Call 👗 7737669865 👗 Top Class Call Girl Service ...
Call Girls Basavanagudi Just Call 👗 7737669865 👗 Top Class Call Girl Service ...
amitlee9823
 
DESIGN THINKING in architecture- Introduction
DESIGN THINKING in architecture- IntroductionDESIGN THINKING in architecture- Introduction
DESIGN THINKING in architecture- Introduction
sivagami49
 
Recommendable # 971589162217 # philippine Young Call Girls in Dubai By Marina...
Recommendable # 971589162217 # philippine Young Call Girls in Dubai By Marina...Recommendable # 971589162217 # philippine Young Call Girls in Dubai By Marina...
Recommendable # 971589162217 # philippine Young Call Girls in Dubai By Marina...
home
 

Recently uploaded (20)

B. Smith. (Architectural Portfolio.).pdf
B. Smith. (Architectural Portfolio.).pdfB. Smith. (Architectural Portfolio.).pdf
B. Smith. (Architectural Portfolio.).pdf
 
Q4-W4-SCIENCE-5 power point presentation
Q4-W4-SCIENCE-5 power point presentationQ4-W4-SCIENCE-5 power point presentation
Q4-W4-SCIENCE-5 power point presentation
 
Pooja 9892124323, Call girls Services and Mumbai Escort Service Near Hotel Th...
Pooja 9892124323, Call girls Services and Mumbai Escort Service Near Hotel Th...Pooja 9892124323, Call girls Services and Mumbai Escort Service Near Hotel Th...
Pooja 9892124323, Call girls Services and Mumbai Escort Service Near Hotel Th...
 
Verified Trusted Call Girls Adugodi💘 9352852248 Good Looking standard Profil...
Verified Trusted Call Girls Adugodi💘 9352852248  Good Looking standard Profil...Verified Trusted Call Girls Adugodi💘 9352852248  Good Looking standard Profil...
Verified Trusted Call Girls Adugodi💘 9352852248 Good Looking standard Profil...
 
Jordan_Amanda_DMBS202404_PB1_2024-04.pdf
Jordan_Amanda_DMBS202404_PB1_2024-04.pdfJordan_Amanda_DMBS202404_PB1_2024-04.pdf
Jordan_Amanda_DMBS202404_PB1_2024-04.pdf
 
Abortion pill for sale in Muscat (+918761049707)) Get Cytotec Cash on deliver...
Abortion pill for sale in Muscat (+918761049707)) Get Cytotec Cash on deliver...Abortion pill for sale in Muscat (+918761049707)) Get Cytotec Cash on deliver...
Abortion pill for sale in Muscat (+918761049707)) Get Cytotec Cash on deliver...
 
Abortion Pills in Oman (+918133066128) Cytotec clinic buy Oman Muscat
Abortion Pills in Oman (+918133066128) Cytotec clinic buy Oman MuscatAbortion Pills in Oman (+918133066128) Cytotec clinic buy Oman Muscat
Abortion Pills in Oman (+918133066128) Cytotec clinic buy Oman Muscat
 
Pooja 9892124323, Call girls Services and Mumbai Escort Service Near Hotel Gi...
Pooja 9892124323, Call girls Services and Mumbai Escort Service Near Hotel Gi...Pooja 9892124323, Call girls Services and Mumbai Escort Service Near Hotel Gi...
Pooja 9892124323, Call girls Services and Mumbai Escort Service Near Hotel Gi...
 
infant assessment fdbbdbdddinal ppt.pptx
infant assessment fdbbdbdddinal ppt.pptxinfant assessment fdbbdbdddinal ppt.pptx
infant assessment fdbbdbdddinal ppt.pptx
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
VVIP CALL GIRLS Lucknow 💓 Lucknow < Renuka Sharma > 7877925207 Escorts Service
VVIP CALL GIRLS Lucknow 💓 Lucknow < Renuka Sharma > 7877925207 Escorts ServiceVVIP CALL GIRLS Lucknow 💓 Lucknow < Renuka Sharma > 7877925207 Escorts Service
VVIP CALL GIRLS Lucknow 💓 Lucknow < Renuka Sharma > 7877925207 Escorts Service
 
RT Nagar Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Bang...
RT Nagar Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Bang...RT Nagar Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Bang...
RT Nagar Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Bang...
 
call girls in Dakshinpuri (DELHI) 🔝 >༒9953056974 🔝 genuine Escort Service 🔝✔️✔️
call girls in Dakshinpuri  (DELHI) 🔝 >༒9953056974 🔝 genuine Escort Service 🔝✔️✔️call girls in Dakshinpuri  (DELHI) 🔝 >༒9953056974 🔝 genuine Escort Service 🔝✔️✔️
call girls in Dakshinpuri (DELHI) 🔝 >༒9953056974 🔝 genuine Escort Service 🔝✔️✔️
 
SD_The MATATAG Curriculum Training Design.pptx
SD_The MATATAG Curriculum Training Design.pptxSD_The MATATAG Curriculum Training Design.pptx
SD_The MATATAG Curriculum Training Design.pptx
 
Pooja 9892124323, Call girls Services and Mumbai Escort Service Near Hotel Hy...
Pooja 9892124323, Call girls Services and Mumbai Escort Service Near Hotel Hy...Pooja 9892124323, Call girls Services and Mumbai Escort Service Near Hotel Hy...
Pooja 9892124323, Call girls Services and Mumbai Escort Service Near Hotel Hy...
 
Call Girls Basavanagudi Just Call 👗 7737669865 👗 Top Class Call Girl Service ...
Call Girls Basavanagudi Just Call 👗 7737669865 👗 Top Class Call Girl Service ...Call Girls Basavanagudi Just Call 👗 7737669865 👗 Top Class Call Girl Service ...
Call Girls Basavanagudi Just Call 👗 7737669865 👗 Top Class Call Girl Service ...
 
DESIGN THINKING in architecture- Introduction
DESIGN THINKING in architecture- IntroductionDESIGN THINKING in architecture- Introduction
DESIGN THINKING in architecture- Introduction
 
UI:UX Design and Empowerment Strategies for Underprivileged Transgender Indiv...
UI:UX Design and Empowerment Strategies for Underprivileged Transgender Indiv...UI:UX Design and Empowerment Strategies for Underprivileged Transgender Indiv...
UI:UX Design and Empowerment Strategies for Underprivileged Transgender Indiv...
 
8377087607, Door Step Call Girls In Kalkaji (Locanto) 24/7 Available
8377087607, Door Step Call Girls In Kalkaji (Locanto) 24/7 Available8377087607, Door Step Call Girls In Kalkaji (Locanto) 24/7 Available
8377087607, Door Step Call Girls In Kalkaji (Locanto) 24/7 Available
 
Recommendable # 971589162217 # philippine Young Call Girls in Dubai By Marina...
Recommendable # 971589162217 # philippine Young Call Girls in Dubai By Marina...Recommendable # 971589162217 # philippine Young Call Girls in Dubai By Marina...
Recommendable # 971589162217 # philippine Young Call Girls in Dubai By Marina...
 

cars design code power system detai.pptx

  • 1. Cars details 201870110 Hamza otaif 201870051 Assem al_swadi 201870 Jameel Rasheed 201870 Abdulazeez al_mojurshi 201870 Razwan hanthal 1 Supervised by: EngOmaer Al_baadani Prepared by:
  • 2. Dataset information 2 libararies import pandas as pd import matplotlib.pyplot as plt import seaborn as sb def load_data(dataframe): global car_data car_data = pd.read_csv("C:/Users/hamzapc/Desktop/train1.csv") return car_data load_data('car_data') Function that return dataframe
  • 3. Dataset information • Data columns (total 17 columns): • # Column Non-Null Count Dtype • --- ------ -------------- ----- • 0 Price 19237 non-null int64 • 1 Levy 19237 non-null object • 2 make 19237 non-null object • 3 Model 19237 non-null object • 4 year 19237 non-null int64 • 5 Category 19237 non-null object • 6 Leather interior 19237 non-null object • 7 Fuel 19237 non-null object • 8 Engine_volume 19237 non-null object • 9 Mileage 19237 non-null object • 10 Cylinders 19237 non-null int64 • 11 Gear _box _type 19237 non-null object • 12 Drive wheels 19237 non-null object • 13 Doors 19237 non-null object • 14 Wheel 19237 non-null object • 15 Color 19237 non-null object • 16 Airbags 19237 non-null int64 • dtypes: int64(4), object(13) 3
  • 4. def check_data(data): """a function to examine data for cleaning""" print(data.info()) print('n') print(f'Columns in the dataframe:n{data.columns}') print('n') print(f'There are {data.shape} rows and column in the dataframe.') print('n') # duplicate value duplicate = data.duplicated().sum() if duplicate == 0: print(f'There are {duplicate} duplicate rows in the dataframe') else: print(f'There are {duplicate} duplicate rows in the dataframe') print('n') # missing value nan_data = pd.DataFrame(data.isna().sum()) if nan_data[0].sum() > 1: fig = px.bar(nan_data, title='Missing values', width=600, height=500, orientation='h', color_discrete_sequence=['darkgreen']) fig.show() else: print('No missing value.') check_data(car_data) 4 Function that check missing value and dubplicated
  • 5. Columns in the dataframe: Index(['Price', 'Levy', 'make', 'Model', 'year', 'Category', 'Leather interior', 'Fuel', 'Engine_volume', 'Mileage', 'Cylinders', 'Gear _box _type', 'Drive wheels', 'Doors', 'Wheel', 'Color', 'Airbags'], dtype='object') There are (19237, 17) rows and column in the dataframe. There are 3512 duplicate rows in the dataframe No missing value. <class 'pandas.core.frame.DataFrame'> RangeIndex: 19237 entries, 0 to 19236 Data columns (total 17 columns): 5 Output of Function that check missing value and duplicated
  • 6. def remove_duplicate(data): print('Duplicate sample:') print(data[data.duplicated()][:5]) # drop duplicate rows and keep first data = data.drop_duplicates(keep='first') print('n') print('Duplicate data have been removed from the dataset.') remove_duplicate(car_data) 6 Function remove duplicated value
  • 7. Duplicate sample: Price Levy make Model year Category Leather interior 192 314 1053 MERCEDES-BENZ E 350 2014 Sedan Yes 239 2901 503 HONDA Civic 2012 Sedan Yes 264 392 1017 MERCEDES-BENZ E 300 2017 Sedan Yes 331 282 289 FORD Escape 2008 Jeep Yes 347 39829 1811 LEXUS GX 460 2010 Jeep Yes Fuel Engine_volume Mileage Cylinders Gear _box _type Drive wheels 192 Diesel 3.5 149486 km 6 Automatic 4x4 239 Hybrid 1.5 146403 km 4 Automatic Front 264 Petrol 2 1600 km 4 Automatic Rear 331 Hybrid 0.4 220474 km 4 Automatic Front 347 Petrol 4.6 155821 km 8 Automatic 4x4 Doors Wheel Color Airbags 192 4-May Left wheel Silver 12 239 4-May Left wheel White 0 264 4-May Left wheel Black 12 331 4-May Left wheel Grey 0 347 4-May Left wheel Black 0 7 Output of Function that remove duplicated value
  • 8. def campony(): print("camponys number= ", car_data['make'].nunique()) print("camponys:", car_data['make'].unique()) print('n') campony() 8 The Manufacturers of cars camponys number= 65 camponys: ['LEXUS' 'CHEVROLET' 'HONDA' 'FORD' 'HYUNDAI' 'TOYOTA' 'MERCEDES-BENZ' 'OPEL' 'PORSCHE' 'BMW' 'JEEP' 'VOLKSWAGEN' 'AUDI' 'RENAULT' 'NISSAN' 'SUBARU' 'DAEWOO' 'KIA' 'MITSUBISHI' 'SSANGYONG' 'MAZDA' 'GMC' 'FIAT' 'INFINITI' 'ALFA ROMEO' 'SUZUKI' 'ACURA' 'LINCOLN' 'VAZ' 'GAZ' 'CITROEN' 'LAND ROVER' 'MINI' 'DODGE' 'CHRYSLER' 'JAGUAR' 'ISUZU' 'SKODA' 'DAIHATSU' 'BUICK' 'TESLA' 'CADILLAC' 'PEUGEOT' 'BENTLEY' 'VOLVO' 'სხვა' 'HAVAL' 'HUMMER' 'SCION' 'UAZ' 'MERCURY' 'ZAZ' 'ROVER' 'SEAT' 'LANCIA' 'MOSKVICH' 'MASERATI' 'FERRARI' 'SAAB' 'LAMBORGHINI' 'ROLLS-ROYCE' 'PONTIAC' 'SATURN' 'ASTON MARTIN' 'GREATWALL'] Output
  • 9. Function give fuel type:- def fuel(): print("fuel types number= ", car_data['Fuel'].nunique()) print("fuel types ", car_data['Fuel'].unique()) print('n') fuel() 9 output fuel types number= 7 fuel types ['Hybrid' 'Petrol' 'Diesel' 'CNG' 'Plug-in Hybrid' 'LPG' 'Hydrogen']
  • 10. function give doors of cars def door(): print("door type number= ", car_data['Doors'].nunique()) print("door type ", car_data['Doors'].unique()) print('n') door() 10 door type number= 3 door type ['4-May' '2-Mar' '>5'] output
  • 11. Function give The most color & wheel type & fuel type def best(): plt.figure(figsize=(14, 8)) plt.subplot(1, 3, 1) plt1 = car_data.Color.value_counts().plot(kind='bar') plt.title('Colors Histogram') plt1.set(xlabel='Colors', ylabel='Frequency of company') plt.subplot(1, 3, 2) plt1 = car_data.Wheel.value_counts().plot(kind='bar') plt.title('wheel Type Histogram') plt1.set(xlabel='wheel Type', ylabel='Frequency of wheel type') plt.subplot(1, 3, 3) plt1 = car_data.Fuel.value_counts().plot(kind='bar') plt.title('fuel type Histogram') plt1.set(xlabel='fuel', ylabel='Frequency of Car type') plt.show() best() 11
  • 12. Function search I want car 12 def search(com, model, fuel, color, geer, year): com_data = car_data.loc[(car_data['make'] == com) & (car_data['Model'] == model) & (car_data['Fuel'] == fuel) & (car_data['Color'] == color) & (car_data['Gear _box _type'] == geer) & (car_data['year'] == year)] print(com_data) #search('TOYOTA','Camry','Petrol','White','Automatic',2020) Price Levy make Model year Category Leather interior Fuel 39829 1323 TOYOTA Camry 2020 Sedan Yes Petrol Engine_volume Mileage Cylinders Gear _box _type Drive Doors 2.5 4130 km 4 Automatic Front 4-May Wheel Color Airbags Left wheel White 12
  • 14. Function give the graph company that make cars def best_maker(): plt.figure(figsize=(14, 8)) plt1 = car_data.make.value_counts().plot(kind='bar') plt11 = car_data.make.value_counts() print(plt11) plt.title('Car Options Histogram') plt1.set(xlabel='Car Options', ylabel='Frequency of Car type') plt.show() 14
  • 24. This function give the number of cars per year and per price and per gear box def seabornplot2(): plt.subplot(3,1,1) sb.histplot(data=car_data,x="year") plt.subplot(3,1,2) sb.histplot(data=car_data[:50], x="Price") plt.subplot(3,1,3) sb.histplot(data=car_data, x="Gear _box _type") plt.show() seabornplot2() 24
  • 25. Output function give the number of cars per year and per price and per gear box 25
  • 26. This function give year`s making for knowledge companies for you and number of cars at this year def seaborn2(): com_data = car_data[(car_data['make'] == 'TOYOTA') | (car_data['make'] == 'HYUNDAI') | (car_data['make'] == 'HONDA') | (car_data['make'] == 'LEXUS') | (car_data['make'] == 'NISSAN') | (car_data['make'] == 'KIA') | (car_data['make'] == 'OPEL') | (car_data['make'] == 'VOLVO')] n_car=com_data.groupby(['year'])['make'].value_counts()[:30] n_car.plot(kind='barh') plt.show() seaborn2() 26
  • 27. Output cars for makers at one year 27
  • 28. Relation between price of car and company 28 sb.catplot(x="make", y="Price", data=dat) plt.show()
  • 29. Relation between engine volume and price for 10rows only 29 dat=com_data[:10] print(dat) sb.displot(data=dat,x='Engine_volume',col='Price') plt.show()