Description Pageno
1 Certificate 2
2 Acknowledgement & References 3
3 Introduction 4
4 Source Code 5
5 Output Screen 7
6 Hardware & Software requirement 18
Certificate
I would like to express my sincere gratitude to my computer
teacher , for her vital
support, guidance, and encouragement without which this
project would not come forth from my side, who helped me
completing the project by giving, ideas, thoughts and made
this project easy and accurate.
We wish to thank my parents for their undivided support,
and interest who inspired me and encouraged me to go my
own way, without which I would be unable to complete my
project.
Introduction
This dataset of about 400 cars with 8 characteristics such as horsepower, acceleration, etc. In this project we are
analysing the Data on bases of various factors like its horsepower, Acceleration of MPG. We can also display the
completeinformation of any car. We have data visualisation to show the various comparisonsof the cars. We can see
the cars on the year of the model. We have used line chart,bar chart and histogram.
Source Code
Pandas and Matplotlib Data Analysis
import pandas as pd
import numpy as np
import [Link] as plt
print("Reading and printing complete CSV File Cars , complete information about
cars")
df=pd.read_csv("[Link]",sep=';')
df=df[1:]
print(df)
convert_dict = {'MPG':float,'Cylinders':int,'Displacement':float,'Horsepower':float,
'Weight':float,'Acceleration':float,'Model':int
}
df = [Link](convert_dict)
print([Link])
while True:
print("**********************************************************************")
print("Welcome to Car Analysis project")
print("\t\submitted by Arjun Dahiya")
print("**********************************************************************")
print('''1. Print all the Attributes of data frame
\n2. Print top records.
\n 3. Print the bottom records
\n4. Country name for which you want to display the Cars Names
\n5. The number of Cylinders
\n6. Horsepower
\n7. Car name for which you want to display the information
\n8. Model Number'
\n9. Graphs\n''')
m=int(input("Enter you choice"))
if m==1:
print("Information about DataFrame")
print("Priting all the indexes\n",[Link])
print("Priiting all the columns\n",[Link])
print("Printing all the Datatypes\n",[Link])
print("Values\n",[Link])
print("Shape of the Dataframe\n",[Link])
print("Size of the Dataframe\n",[Link])
print("Transpose of the DataFrame\n",df.T)
elif m==2:
n=int(input("Enter the top record which you want to display"))
print([Link](n))
elif m==3:
n=int(input("Enter the bottom record which you want to display"))
print([Link](n))
elif m==4:
org=input("Enter the Country name for which you want to display the Cars
Names")
print(df[[Link]==org])
elif m==5:
cyl=int(input("Enter the number of Cylinders"))
print([Link][[Link]>=cyl])
elif m==6:
h=int(input("Enter the horespower"))
print([Link][[Link]>=h])
elif m==7:
carname=input("Enter the car name for which you want to display the
inofrmation")
newdf=df[[Link]==carname]
print("Inofrmation about ",carname)
for i, j in [Link]():
print(i, j)
print()
elif m==8:
model=int(input("Enter the Model Number"))
print(df[[Link]>=model])
elif m==9:
print('''\n1. Histigram for all numeric values
\n2. Line Graph
\n3. Bar Graph of Car and Horsepower
\n4 Bar Graph Car', 'MPG', 'Cylinders', 'Displacement', 'Horsepower' \n''')
g=int(input("Enter you choice"))
if g==1:
[Link]()
[Link]()
elif g==2:
print("Line graph of top 10 records")
dfLine=[Link](10)
dfLine=dfLine[['MPG', 'Cylinders', 'Displacement']]
[Link]()
[Link]()
elif g==3:
g1=df[['Car','Horsepower']].head(10)
[Link](kind='bar')
[Link]()
elif g==4:
Dfbar=df[['Car', 'MPG', 'Cylinders', 'Displacement', 'Horsepower']]
np=Dfbar[Dfbar['MPG']>43]
[Link](kind='bar',x='Car',title='Car
Details',color=['yellow','Red'],edgecolor='Green',linewidth=2,linestyle='--')
#set title and set ylabel
[Link]('Cars')
[Link]()
ch=input("Wish to continue y\n")
if ch=='n' or ch=='N':
break
Output Screens
Screen Complete Dataset
8
Screen Data type Changed.
9
Main Menu Screen
Choice 1 output
Choice 2 output
Choice 3 Output
Choice 4 Output
14
Choice 4 Output
Choice 6 Output
14
Choice 7 Output
Choice 8 Output
Choice 9 Output
choice 9
Internal-
Output
17
16
Graphs – 1
Graph – 2
17
17
15
Graph – 3
18
Hardware Requirement
Intel core/i3/i5/i7 or any equivalent
with atleast 256 MB RAM
2 MB free space on Hard Disk
ColourMonitor/LCD
Operating System & Compiler
Any Operating System
Any Python Interpreter
Pandas Library
Matplotlib Library