Informatics Practices/ Information Practices Project (IP Project Class 12)

92,446 views 33 slides Mar 28, 2021
Slide 1
Slide 1 of 33
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18
Slide 19
19
Slide 20
20
Slide 21
21
Slide 22
22
Slide 23
23
Slide 24
24
Slide 25
25
Slide 26
26
Slide 27
27
Slide 28
28
Slide 29
29
Slide 30
30
Slide 31
31
Slide 32
32
Slide 33
33

About This Presentation

Project for Informatics Practices for students of Class 12.
on Car sales analysis - By Kush Shah.
Link to google drive for downloading CSV containing the data of car sales.
Python pandas and matplotlib used. Please install other required libraries and modules using pip.
No connected MySQL.

Disclaim...


Slide Content

INFORMATICS
PRACTICES
PROJECT FILE
CAR SALES ANALYSIS

INDEX

ACKNOWLEDGEMENT

CODE

OUTPUTS

BIBLIOGRAPHY

ACKNOWLEDGEMENT
I would like to express my special thanks and gratitude to our
principal Mrs. Jayshree Balasaria as well as my subject teacher
Mrs. Hiral Dabhi who gave me the golden opportunity to do
this wonderful project because of which I came to know
about many new things.
Secondly, I would also like to thank my parents and friends
who have helped me a lot in !inishing the project in limited
time.

##Project Name: Car Model Sales Analysis
##Made By: Kush Shah, 12 Agni/ ZSE-G
import pandas as pd
import numpy as np
import time
import matplotlib.pyplot as plt
df = pd.DataFrame()

def introduction():
def read_csv_file():
df = pd.read_csv("/Users/admin/Desktop/Kush/Study/IP/PROJECT/CAR.csv")
print(df)
##Name of function: clear()
##Purpose: Clear Output Screen
def clear():
for x in range(3):
print()
def data_analysis_menu():
df = pd.read_csv("/Users/admin/Desktop/Kush/Study/IP/PROJECT/CAR.csv")
while True:
clear()
print('\n\nData Analysis MENU ')
print('_'*50)
print('1. Show Columns\n')
print('2. Show Top Rows\n')
print('3. Show Bottom Rows\n')
print('4. Show Specific Column\n')
print('5. Add a New Record\n')
print('6. Delete a Column\n')
print('7. Data Summary\n')
print('8. Exit (Move to main menu)\n')
ch = int(input('Enter your choice:'))
if ch == 1:
print (df.columns)
wait = input()
if ch == 2:
n = int(input('Enter Total rows you want to show :'))
print(df.head(n))
wait = input()
if ch == 3:
n = int(input('Enter Total rows you want to show :'))
print(df.tail(n))
wait = input()
if ch == 4:
print(df.columns)
col_name = input('Enter Column Name that You want to print : ')
print(df[col_name])
wait = input()
if ch==5:
a = input('Enter New Model Name :')
b = input(' Enter Sales in 2015 :')
c= int(input('Enter Sales in 2016 :'))
d = int(input('Enter Sales in 2017 :'))
e = int(input('Enter Sales in 2018 :'))
f = int(input('Enter Sales in 2019 :'))

g= int(input('Enter Sales in 2020 :'))
new_data= pd.Series([b,c,d,e,f,g])
df= pd.read_csv("/Users/admin/Desktop/Kush/Study/IP/PROJECT/CAR.csv", index_col=None)
z=len(df.axes[1])
df.insert(z, a, new_data)
df.to_csv("/Users/admin/Desktop/Kush/Study/IP/PROJECT/CAR.csv", index=False)
print(df)
wait=input()
if ch==6:
col_name =input('Enter column Name to delete :')
del df[col_name]
df.to_csv("/Users/admin/Desktop/Kush/Study/IP/PROJECT/CAR.csv", index= False)
print(df)
print('\n\n\n Press any key to continue....')
wait=input()
if ch==7:
print(df.describe())
print("\n\n\nPress any key to continue....")
wait=input()
if ch ==8:
main_menu()
break
# name of function : graph
# purpose : To generate a Graph menu
def graph():
df = pd.read_csv("/Users/admin/Desktop/Kush/Study/IP/PROJECT/CAR.csv")
while True:
clear()
print('\nGRAPH MENU ')
print('_'*50)
print('1. Car Wise Line Graph\n')
print('2. Car Wise Bar Graph\n')
print('3. Exit (Move to main menu)\n')
ch = int(input('Enter your choice:'))
if ch == 1:
clear()
print('\nSELECT MANUFACTURER')
print('_'*50)
print('1. Honda\n')
print('2. Hyundai\n')
print('3. Maruti Suzuki\n')
print('4. Tata\n')
print('5. Nissan\n')
print('6. Audi\n')

ch1 = int(input('Enter your choice:'))

if ch1 == 1:
clear()
print('\nSELECT CAR')
print('_'*50)
print('1. Amaze\n')
print('2. Jazz\n')
print('3. WR-V\n')
print('4. CR-V\n')

print('5. HR-V\n')
print('6. City\n')
print('7. Civic\n')

ch2 = int(input('Enter your choice:'))

if ch2==1:
g = df.groupby('AMAZE')
x = df['MODEL']
y = df['AMAZE']
plt.xticks(rotation='vertical')
plt.xlabel('COMPANY')
plt.ylabel('Total Sales')
plt.title('Company wise sales count')
plt.grid(True)
plt.plot(x, y)
plt.show()
if ch2==2:
g = df.groupby('JAZZ')
x = df['MODEL']
y = df['JAZZ']
plt.xticks(rotation='vertical')
plt.xlabel('COMPANY')
plt.ylabel('Total Sales')
plt.title('Company wise sales count')
plt.grid(True)
plt.plot(x, y)
plt.show()
if ch2==3:
g = df.groupby('WR-V')
x = df['MODEL']
y = df['WR-V']
plt.xticks(rotation='vertical')
plt.xlabel('COMPANY')
plt.ylabel('Total Sales')
plt.title('Company wise sales count')
plt.grid(True)
plt.plot(x, y)
plt.show()
if ch2==4:
g = df.groupby('CR-V')
x = df['MODEL']
y = df['CR-V']
plt.xticks(rotation='vertical')
plt.xlabel('COMPANY')
plt.ylabel('Total Sales')
plt.title('Company wise sales count')
plt.grid(True)
plt.plot(x, y)
plt.show()
if ch2==5:
g = df.groupby('HR-V')
x = df['MODEL']
y = df['HR-V']
plt.xticks(rotation='vertical')
plt.xlabel('COMPANY')
plt.ylabel('Total Sales')
plt.title('Company wise sales count')
plt.grid(True)
plt.plot(x, y)
plt.show()
if ch2==6:
g = df.groupby('CITY')
x = df['MODEL']

y = df['CITY']
plt.xticks(rotation='vertical')
plt.xlabel('COMPANY')
plt.ylabel('Total Sales')
plt.title('Company wise sales count')
plt.grid(True)
plt.plot(x, y)
plt.show()
if ch2==7:
g = df.groupby('CIVIC')
x = df['MODEL']
y = df['CIVIC']
plt.xticks(rotation='vertical')
plt.xlabel('COMPANY')
plt.ylabel('Total Sales')
plt.title('Company wise sales count')
plt.grid(True)
plt.plot(x, y)
plt.show()

if ch1==2:
clear()
print('\nSELECT CAR')
print('_'*50)
print('1. i10\n')
print('2. i20\n')
print('3. Creta\n')
print('4. Venue\n')
print('5. Verna\n')
print('6. Santro\n')
print('7. Elantra\n')
print('8. Xcent\n')
print('9. Sonata\n')
print('10. Palisade\n')
print('11. Kona\n')

ch3 = int(input('Enter your choice:'))

if ch3==1:
g = df.groupby('i10')
x = df['MODEL']
y = df['i10']
plt.xticks(rotation='vertical')
plt.xlabel('COMPANY')
plt.ylabel('Total Sales')
plt.title('Company wise sales count')
plt.grid(True)
plt.plot(x, y)
plt.show()
if ch3==2:
g = df.groupby('i20')
x = df['MODEL']
y = df['i20']
plt.xticks(rotation='vertical')
plt.xlabel('COMPANY')
plt.ylabel('Total Sales')
plt.title('Company wise sales count')
plt.grid(True)
plt.plot(x, y)
plt.show()
if ch3==3:
g = df.groupby('CRETA')
x = df['MODEL']
y = df['CRETA']

plt.xticks(rotation='vertical')
plt.xlabel('COMPANY')
plt.ylabel('Total Sales')
plt.title('Company wise sales count')
plt.grid(True)
plt.plot(x, y)
plt.show()
if ch3==4:
g = df.groupby('VENUE')
x = df['MODEL']
y = df['VENUE']
plt.xticks(rotation='vertical')
plt.xlabel('COMPANY')
plt.ylabel('Total Sales')
plt.title('Company wise sales count')
plt.grid(True)
plt.plot(x, y)
plt.show()
if ch3==5:
g = df.groupby('VERNA')
x = df['MODEL']
y = df['VERNA']
plt.xticks(rotation='vertical')
plt.xlabel('COMPANY')
plt.ylabel('Total Sales')
plt.title('Company wise sales count')
plt.grid(True)
plt.plot(x, y)
plt.show()
if ch3==6:
g = df.groupby('SANTRO')
x = df['MODEL']
y = df['SANTRO']
plt.xticks(rotation='vertical')
plt.xlabel('COMPANY')
plt.ylabel('Total Sales')
plt.title('Company wise sales count')
plt.grid(True)
plt.plot(x, y)
plt.show()
if ch3==7:
g = df.groupby('ELANTRA')
x = df['MODEL']
y = df['ELANTRA']
plt.xticks(rotation='vertical')
plt.xlabel('COMPANY')
plt.ylabel('Total Sales')
plt.title('Company wise sales count')
plt.grid(True)
plt.plot(x, y)
plt.show()
if ch3==8:
g = df.groupby('XCENT')
x = df['MODEL']
y = df['XCENT']
plt.xticks(rotation='vertical')
plt.xlabel('COMPANY')
plt.ylabel('Total Sales')
plt.title('Company wise sales count')
plt.grid(True)
plt.plot(x, y)
plt.show()
if ch3==9:
g = df.groupby('SONATA')

x = df['MODEL']
y = df['SONATA']
plt.xticks(rotation='vertical')
plt.xlabel('COMPANY')
plt.ylabel('Total Sales')
plt.title('Company wise sales count')
plt.grid(True)
plt.plot(x, y)
plt.show()
if ch3==10:
g = df.groupby('PALISADE')
x = df['MODEL']
y = df['PALISADE']
plt.xticks(rotation='vertical')
plt.xlabel('COMPANY')
plt.ylabel('Total Sales')
plt.title('Company wise sales count')
plt.grid(True)
plt.plot(x, y)
plt.show()
if ch3==11:
g = df.groupby('KONA')
x = df['MODEL']
y = df['KONA']
plt.xticks(rotation='vertical')
plt.xlabel('COMPANY')
plt.ylabel('Total Sales')
plt.title('Company wise sales count')
plt.grid(True)
plt.plot(x, y)
plt.show()
if ch1==3:
clear()
print('\nSELECT CAR')
print('_'*50)
print('1. Baleno\n')
print('2. Swift\n')
print('3. DZire\n')
print('4. Alto\n')
print('5. Ciaz\n')
print('6. Eeco\n')
print('7. Ignis\n')
print('8. Celerio X\n')
print('9 S-Cross\n')
print('10. XL6\n')

ch4 = int(input('Enter your choice:'))

if ch4==1:
g = df.groupby('BALENO')
x = df['MODEL']
y = df['BALENO']
plt.xticks(rotation='vertical')
plt.xlabel('COMPANY')
plt.ylabel('Total Sales')
plt.title('Company wise sales count')
plt.grid(True)
plt.plot(x, y)
plt.show()
if ch4==2:
g = df.groupby('SWIFT')
x = df['MODEL']
y = df['SWIFT']
plt.xticks(rotation='vertical')

plt.xlabel('COMPANY')
plt.ylabel('Total Sales')
plt.title('Company wise sales count')
plt.grid(True)
plt.plot(x, y)
plt.show()
if ch4==3:
g = df.groupby('DZIRE')
x = df['MODEL']
y = df['DZIRE']
plt.xticks(rotation='vertical')
plt.xlabel('COMPANY')
plt.ylabel('Total Sales')
plt.title('Company wise sales count')
plt.grid(True)
plt.plot(x, y)
plt.show()
if ch4==4:
g = df.groupby('ALTO')
x = df['MODEL']
y = df['ALTO']
plt.xticks(rotation='vertical')
plt.xlabel('COMPANY')
plt.ylabel('Total Sales')
plt.title('Company wise sales count')
plt.grid(True)
plt.plot(x, y)
plt.show()
if ch4==5:
g = df.groupby('CIAZ')
x = df['MODEL']
y = df['CIAZ']
plt.xticks(rotation='vertical')
plt.xlabel('COMPANY')
plt.ylabel('Total Sales')
plt.title('Company wise sales count')
plt.grid(True)
plt.plot(x, y)
plt.show()
if ch4==6:
g = df.groupby('EECO')
x = df['MODEL']
y = df['EECO']
plt.xticks(rotation='vertical')
plt.xlabel('COMPANY')
plt.ylabel('Total Sales')
plt.title('Company wise sales count')
plt.grid(True)
plt.plot(x, y)
plt.show()
if ch4==7:
g = df.groupby('IGNIS')
x = df['MODEL']
y = df['IGNIS']
plt.xticks(rotation='vertical')
plt.xlabel('COMPANY')
plt.ylabel('Total Sales')
plt.title('Company wise sales count')
plt.grid(True)
plt.plot(x, y)
plt.show()
if ch4==8:
g = df.groupby('CELERIO X')
x = df['MODEL']

y = df['CELERIO X']
plt.xticks(rotation='vertical')
plt.xlabel('COMPANY')
plt.ylabel('Total Sales')
plt.title('Company wise sales count')
plt.grid(True)
plt.plot(x, y)
plt.show()
if ch4==9:
g = df.groupby('S-CROSS')
x = df['MODEL']
y = df['S-CROSS']
plt.xticks(rotation='vertical')
plt.xlabel('COMPANY')
plt.ylabel('Total Sales')
plt.title('Company wise sales count')
plt.grid(True)
plt.plot(x, y)
plt.show()
if ch4==10:
g = df.groupby('XL6')
x = df['MODEL']
y = df['XL6']
plt.xticks(rotation='vertical')
plt.xlabel('COMPANY')
plt.ylabel('Total Sales')
plt.title('Company wise sales count')
plt.grid(True)
plt.plot(x, y)
plt.show()
if ch1==4:
clear()
print('\nSELECT CAR')
print('_'*50)
print('1. Tiago\n')
print('2. Nexon\n')
print('3. Tigor\n')
print('4. Harrier\n')
print('5. Altroz\n')
print('6. Nano\n')
print('7. Safari\n')
print('8. HBX\n')

ch5 = int(input('Enter your choice:'))

if ch5==1:
g = df.groupby('TIAGO')
x = df['MODEL']
y = df['TIAGO']
plt.xticks(rotation='vertical')
plt.xlabel('COMPANY')
plt.ylabel('Total Sales')
plt.title('Company wise sales count')
plt.grid(True)
plt.plot(x, y)
plt.show()
if ch5==2:
g = df.groupby('NEXON')
x = df['MODEL']
y = df['NEXON']
plt.xticks(rotation='vertical')
plt.xlabel('COMPANY')
plt.ylabel('Total Sales')
plt.title('Company wise sales count')

plt.grid(True)
plt.plot(x, y)
plt.show()
if ch5==3:
g = df.groupby('TIGOR')
x = df['MODEL']
y = df['TIGOR']
plt.xticks(rotation='vertical')
plt.xlabel('COMPANY')
plt.ylabel('Total Sales')
plt.title('Company wise sales count')
plt.grid(True)
plt.plot(x, y)
plt.show()
if ch5==4:
g = df.groupby('HARRIER')
x = df['MODEL']
y = df['HARRIER']
plt.xticks(rotation='vertical')
plt.xlabel('COMPANY')
plt.ylabel('Total Sales')
plt.title('Company wise sales count')
plt.grid(True)
plt.plot(x, y)
plt.show()
if ch5==5:
g = df.groupby('ALTROZ')
x = df['MODEL']
y = df['ALTROZ']
plt.xticks(rotation='vertical')
plt.xlabel('COMPANY')
plt.ylabel('Total Sales')
plt.title('Company wise sales count')
plt.grid(True)
plt.plot(x, y)
plt.show()
if ch5==6:
g = df.groupby('NANO')
x = df['MODEL']
y = df['NANO']
plt.xticks(rotation='vertical')
plt.xlabel('COMPANY')
plt.ylabel('Total Sales')
plt.title('Company wise sales count')
plt.grid(True)
plt.plot(x, y)
plt.show()
if ch5==7:
g = df.groupby('SAFARI')
x = df['MODEL']
y = df['SAFARI']
plt.xticks(rotation='vertical')
plt.xlabel('COMPANY')
plt.ylabel('Total Sales')
plt.title('Company wise sales count')
plt.grid(True)
plt.plot(x, y)
plt.show()
if ch5==8:
g = df.groupby('HBX')
x = df['MODEL']
y = df['HBX']
plt.xticks(rotation='vertical')
plt.xlabel('COMPANY')

plt.ylabel('Total Sales')
plt.title('Company wise sales count')
plt.grid(True)
plt.plot(x, y)
plt.show()
if ch1==5:
clear()
print('\nSELECT CAR')
print('_'*50)
print('1. Sunny\n')
print('2. Magnite\n')
print('3. Kicks\n')
print('4. GT-R\n')
print('5. Terra\n')
ch6 = int(input('Enter your choice:'))
if ch6==1:
g = df.groupby('SUNNY')
x = df['MODEL']
y = df['SUNNY']
plt.xticks(rotation='vertical')
plt.xlabel('COMPANY')
plt.ylabel('Total Sales')
plt.title('Company wise sales count')
plt.grid(True)
plt.plot(x, y)
plt.show()
if ch6==2:
g = df.groupby('MAGNITE')
x = df['MODEL']
y = df['MAGNITE']
plt.xticks(rotation='vertical')
plt.xlabel('COMPANY')
plt.ylabel('Total Sales')
plt.title('Company wise sales count')
plt.grid(True)
plt.plot(x, y)
plt.show()
if ch6==3:
g = df.groupby('KICKS')
x = df['MODEL']
y = df['KICKS']
plt.xticks(rotation='vertical')
plt.xlabel('COMPANY')
plt.ylabel('Total Sales')
plt.title('Company wise sales count')
plt.grid(True)
plt.plot(x, y)
plt.show()
if ch6==4:
g = df.groupby('GT-R')
x = df['MODEL']
y = df['GT-R']
plt.xticks(rotation='vertical')
plt.xlabel('COMPANY')
plt.ylabel('Total Sales')
plt.title('Company wise sales count')
plt.grid(True)
plt.plot(x, y)
plt.show()
if ch6==5:
g = df.groupby('TERRA')

x = df['MODEL']
y = df['TERRA']
plt.xticks(rotation='vertical')
plt.xlabel('COMPANY')
plt.ylabel('Total Sales')
plt.title('Company wise sales count')
plt.grid(True)
plt.plot(x, y)
plt.show()
if ch1==6:
clear()
print('\nSELECT CAR')
print('_'*50)
print('1. A4\n')
print('2. A6\n')
print('3. A8\n')
print('4. Q2\n')
print('5. Q8\n')
print('6. RS7\n')

ch7 = int(input('Enter your choice:'))

if ch7==1:
g = df.groupby('A4')
x = df['MODEL']
y = df['A4']
plt.xticks(rotation='vertical')
plt.xlabel('COMPANY')
plt.ylabel('Total Sales')
plt.title('Company wise sales count')
plt.grid(True)
plt.plot(x, y)
plt.show()
if ch7==2:
g = df.groupby('A6')
x = df['MODEL']
y = df['A8']
plt.xticks(rotation='vertical')
plt.xlabel('COMPANY')
plt.ylabel('Total Sales')
plt.title('Company wise sales count')
plt.grid(True)
plt.plot(x, y)
plt.show()
if ch7==3:
g = df.groupby('A8')
x = df['MODEL']
y = df['A8']
plt.xticks(rotation='vertical')
plt.xlabel('COMPANY')
plt.ylabel('Total Sales')
plt.title('Company wise sales count')
plt.grid(True)
plt.plot(x, y)
plt.show()
if ch7==4:
g = df.groupby('Q2')
x = df['MODEL']
y = df['Q2']
plt.xticks(rotation='vertical')
plt.xlabel('COMPANY')
plt.ylabel('Total Sales')
plt.title('Company wise sales count')
plt.grid(True)

plt.plot(x, y)
plt.show()
if ch7==5:
g = df.groupby('Q8')
x = df['MODEL']
y = df['Q8']
plt.xticks(rotation='vertical')
plt.xlabel('COMPANY')
plt.ylabel('Total Sales')
plt.title('Company wise sales count')
plt.grid(True)
plt.plot(x, y)
plt.show()
if ch7==6:
g = df.groupby('RS7')
x = df['MODEL']
y = df['RS7']
plt.xticks(rotation='vertical')
plt.xlabel('COMPANY')
plt.ylabel('Total Sales')
plt.title('Company wise sales count')
plt.grid(True)
plt.plot(x, y)
plt.show()

if ch == 2:
clear()
print('\nSELECT MANUFACTURER')
print('_'*50)
print('1. Honda\n')
print('2. Hyundai\n')
print('3. Maruti Suzuki\n')
print('4. Tata\n')
print('5. Nissan\n')
print('6. Audi\n')
ch8 = int(input('Enter your choice:'))
if ch8==1:
clear()
print('\nSELECT CAR')
print('_'*50)
print('1. Amaze\n')
print('2. Jazz\n')
print('3. WR-V\n')
print('4. CR-V\n')
print('5. HR-V\n')
print('6. City\n')
print('7. Civic\n')
ch9 = int(input('Enter your choice:'))
if ch9==1:
g = df.groupby('AMAZE')
x = df['MODEL']
y = df['AMAZE']
plt.xticks(rotation='vertical')
plt.xlabel('Year')
plt.ylabel('Total Sales')
plt.title('Car Wise Sales Count')
plt.bar(x, y)
plt.grid(True)
plt.show()

if ch9==2:
g = df.groupby('JAZZ')
x = df['MODEL']
y = df['JAZZ']
plt.xticks(rotation='vertical')
plt.xlabel('COMPANY')
plt.ylabel('Total Sales')
plt.title('Car Wise Sales Count')
plt.bar(x, y)
plt.grid(True)
plt.show()
if ch9==3:
g = df.groupby('WR-V')
x = df['MODEL']
y = df['WR_V']
plt.xticks(rotation='vertical')
plt.xlabel('COMPANY')
plt.ylabel('Total Sales')
plt.title('Car Wise Sales Count')
plt.bar(x, y)
plt.grid(True)
plt.show()
if ch9==4:
g = df.groupby('CR-V')
x = df['MODEL']
y = df['CR-V']
plt.xticks(rotation='vertical')
plt.xlabel('COMPANY')
plt.ylabel('Total Sales')
plt.title('Car Wise Sales Count')
plt.bar(x, y)
plt.grid(True)
plt.show()
if ch9==5:
g = df.groupby('HR-V')
x = df['MODEL']
y = df['HR-V']
plt.xticks(rotation='vertical')
plt.xlabel('COMPANY')
plt.ylabel('Total Sales')
plt.title('Car Wise Sales Count')
plt.bar(x, y)
plt.grid(True)
plt.show()
if ch9==6:
g = df.groupby('CITY')
x = df['MODEL']
y = df['CITY']
plt.xticks(rotation='vertical')
plt.xlabel('COMPANY')
plt.ylabel('Total Sales')
plt.title('Car Wise Sales Count')
plt.bar(x, y)
plt.grid(True)
plt.show()
if ch9==7:
g = df.groupby('CIVIC')
x = df['MODEL']
y = df['CIVIC']
plt.xticks(rotation='vertical')
plt.xlabel('COMPANY')
plt.ylabel('Total Sales')
plt.title('Car Wise Sales Count')
plt.bar(x, y)

plt.grid(True)
plt.show()
if ch8==2:
clear()
print('\nSELECT CAR')
print('_'*50)
print('1. i10\n')
print('2. i20\n')
print('3. Creta\n')
print('4. Venue\n')
print('5. Verna\n')
print('6. Santro\n')
print('7. Elantra\n')
print('8. Xcent\n')
print('9. Sonata\n')
print('10. Palisade\n')
print('11. Kona\n')

ch10 = int(input('Enter your choice:'))

if ch10==1:
g = df.groupby('i10')
x = df['MODEL']
y = df['i10']
plt.xticks(rotation='vertical')
plt.xlabel('COMPANY')
plt.ylabel('Total Sales')
plt.title('Company wise sales count')
plt.grid(True)
plt.bar(x, y)
plt.show()
if ch10==2:
g = df.groupby('i20')
x = df['MODEL']
y = df['i20']
plt.xticks(rotation='vertical')
plt.xlabel('COMPANY')
plt.ylabel('Total Sales')
plt.title('Company wise sales count')
plt.grid(True)
plt.bar(x, y)
plt.show()
if ch10==3:
g = df.groupby('CRETA')
x = df['MODEL']
y = df['CRETA']
plt.xticks(rotation='vertical')
plt.xlabel('COMPANY')
plt.ylabel('Total Sales')
plt.title('Company wise sales count')
plt.grid(True)
plt.bar(x, y)
plt.show()
if ch10==4:
g = df.groupby('VENUE')
x = df['MODEL']
y = df['VENUE']
plt.xticks(rotation='vertical')
plt.xlabel('COMPANY')
plt.ylabel('Total Sales')
plt.title('Company wise sales count')
plt.grid(True)
plt.bar(x, y)

plt.show()
if ch10==5:
g = df.groupby('VERNA')
x = df['MODEL']
y = df['VERNA']
plt.xticks(rotation='vertical')
plt.xlabel('COMPANY')
plt.ylabel('Total Sales')
plt.title('Company wise sales count')
plt.grid(True)
plt.bar(x, y)
plt.show()
if ch10==6:
g = df.groupby('SANTRO')
x = df['MODEL']
y = df['SANTRO']
plt.xticks(rotation='vertical')
plt.xlabel('COMPANY')
plt.ylabel('Total Sales')
plt.title('Company wise sales count')
plt.grid(True)
plt.bar(x, y)
plt.show()
if ch10==7:
g = df.groupby('ELANTRA')
x = df['MODEL']
y = df['ELANTRA']
plt.xticks(rotation='vertical')
plt.xlabel('COMPANY')
plt.ylabel('Total Sales')
plt.title('Company wise sales count')
plt.grid(True)
plt.bar(x, y)
plt.show()
if ch10==8:
g = df.groupby('XCENT')
x = df['MODEL']
y = df['XCENT']
plt.xticks(rotation='vertical')
plt.xlabel('COMPANY')
plt.ylabel('Total Sales')
plt.title('Company wise sales count')
plt.grid(True)
plt.bar(x, y)
plt.show()
if ch10==9:
g = df.groupby('SONATA')
x = df['MODEL']
y = df['SONATA']
plt.xticks(rotation='vertical')
plt.xlabel('COMPANY')
plt.ylabel('Total Sales')
plt.title('Company wise sales count')
plt.grid(True)
plt.bar(x, y)
plt.show()
if ch10==10:
g = df.groupby('PALISADE')
x = df['MODEL']
y = df['PALISADE']
plt.xticks(rotation='vertical')
plt.xlabel('COMPANY')
plt.ylabel('Total Sales')
plt.title('Company wise sales count')

plt.grid(True)
plt.bar(x, y)
plt.show()
if ch10==11:
g = df.groupby('KONA')
x = df['MODEL']
y = df['KONA']
plt.xticks(rotation='vertical')
plt.xlabel('COMPANY')
plt.ylabel('Total Sales')
plt.title('Company wise sales count')
plt.grid(True)
plt.bar(x, y)
plt.show()
if ch8==3:
clear()
print('\nSELECT CAR')
print('_'*50)
print('1. Baleno\n')
print('2. Swift\n')
print('3. DZire\n')
print('4. Alto\n')
print('5. Ciaz\n')
print('6. Eeco\n')
print('7. Ignis\n')
print('8. Celerio X\n')
print('9 S-Cross\n')
print('10. XL6\n')

ch11 = int(input('Enter your choice:'))

if ch11==1:
g = df.groupby('BALENO')
x = df['MODEL']
y = df['BALENO']
plt.xticks(rotation='vertical')
plt.xlabel('COMPANY')
plt.ylabel('Total Sales')
plt.title('Company wise sales count')
plt.grid(True)
plt.bar(x, y)
plt.show()
if ch11==2:
g = df.groupby('SWIFT')
x = df['MODEL']
y = df['SWIFT']
plt.xticks(rotation='vertical')
plt.xlabel('COMPANY')
plt.ylabel('Total Sales')
plt.title('Company wise sales count')
plt.grid(True)
plt.bar(x, y)
plt.show()
if ch11==3:
g = df.groupby('DZIRE')
x = df['MODEL']
y = df['DZIRE']
plt.xticks(rotation='vertical')
plt.xlabel('COMPANY')
plt.ylabel('Total Sales')
plt.title('Company wise sales count')
plt.grid(True)
plt.bar(x, y)

plt.show()
if ch11==4:
g = df.groupby('ALTO')
x = df['MODEL']
y = df['ALTO']
plt.xticks(rotation='vertical')
plt.xlabel('COMPANY')
plt.ylabel('Total Sales')
plt.title('Company wise sales count')
plt.grid(True)
plt.bar(x, y)
plt.show()
if ch11==5:
g = df.groupby('CIAZ')
x = df['MODEL']
y = df['CIAZ']
plt.xticks(rotation='vertical')
plt.xlabel('COMPANY')
plt.ylabel('Total Sales')
plt.title('Company wise sales count')
plt.grid(True)
plt.bar(x, y)
plt.show()
if ch11==6:
g = df.groupby('EECO')
x = df['MODEL']
y = df['EECO']
plt.xticks(rotation='vertical')
plt.xlabel('COMPANY')
plt.ylabel('Total Sales')
plt.title('Company wise sales count')
plt.grid(True)
plt.bar(x, y)
plt.show()
if ch11==7:
g = df.groupby('IGNIS')
x = df['MODEL']
y = df['IGNIS']
plt.xticks(rotation='vertical')
plt.xlabel('COMPANY')
plt.ylabel('Total Sales')
plt.title('Company wise sales count')
plt.grid(True)
plt.bar(x, y)
plt.show()
if ch11==8:
g = df.groupby('CELERIO X')
x = df['MODEL']
y = df['CELERIO X']
plt.xticks(rotation='vertical')
plt.xlabel('COMPANY')
plt.ylabel('Total Sales')
plt.title('Company wise sales count')
plt.grid(True)
plt.bar(x, y)
plt.show()
if ch11==9:
g = df.groupby('S-CROSS')
x = df['MODEL']
y = df['S-CROSS']
plt.xticks(rotation='vertical')
plt.xlabel('COMPANY')
plt.ylabel('Total Sales')
plt.title('Company wise sales count')

plt.grid(True)
plt.bar(x, y)
plt.show()
if ch11==10:
g = df.groupby('XL6')
x = df['MODEL']
y = df['XL6']
plt.xticks(rotation='vertical')
plt.xlabel('COMPANY')
plt.ylabel('Total Sales')
plt.title('Company wise sales count')
plt.grid(True)
plt.bar(x, y)
plt.show()
if ch8==4:
clear()
print('\nSELECT CAR')
print('_'*50)
print('1. Tiago\n')
print('2. Nexon\n')
print('3. Tigor\n')
print('4. Harrier\n')
print('5. Altroz\n')
print('6. Nano\n')
print('7. Safari\n')
print('8. HBX\n')

ch12 = int(input('Enter your choice:'))

if ch12==1:
g = df.groupby('TIAGO')
x = df['MODEL']
y = df['TIAGO']
plt.xticks(rotation='vertical')
plt.xlabel('COMPANY')
plt.ylabel('Total Sales')
plt.title('Company wise sales count')
plt.grid(True)
plt.bar(x, y)
plt.show()
if ch12==2:
g = df.groupby('NEXON')
x = df['MODEL']
y = df['NEXON']
plt.xticks(rotation='vertical')
plt.xlabel('COMPANY')
plt.ylabel('Total Sales')
plt.title('Company wise sales count')
plt.grid(True)
plt.bar(x, y)
plt.show()
if ch12==3:
g = df.groupby('TIGOR')
x = df['MODEL']
y = df['TIGOR']
plt.xticks(rotation='vertical')
plt.xlabel('COMPANY')
plt.ylabel('Total Sales')
plt.title('Company wise sales count')
plt.grid(True)
plt.bar(x, y)
plt.show()
if ch12==4:
g = df.groupby('HARRIER')

x = df['MODEL']
y = df['HARRIER']
plt.xticks(rotation='vertical')
plt.xlabel('COMPANY')
plt.ylabel('Total Sales')
plt.title('Company wise sales count')
plt.grid(True)
plt.bar(x, y)
plt.show()
if ch12==5:
g = df.groupby('ALTROZ')
x = df['MODEL']
y = df['ALTROZ']
plt.xticks(rotation='vertical')
plt.xlabel('COMPANY')
plt.ylabel('Total Sales')
plt.title('Company wise sales count')
plt.grid(True)
plt.bar(x, y)
plt.show()
if ch12==6:
g = df.groupby('NANO')
x = df['MODEL']
y = df['NANO']
plt.xticks(rotation='vertical')
plt.xlabel('COMPANY')
plt.ylabel('Total Sales')
plt.title('Company wise sales count')
plt.grid(True)
plt.bar(x, y)
plt.show()
if ch12==7:
g = df.groupby('SAFARI')
x = df['MODEL']
y = df['SAFARI']
plt.xticks(rotation='vertical')
plt.xlabel('COMPANY')
plt.ylabel('Total Sales')
plt.title('Company wise sales count')
plt.grid(True)
plt.bar(x, y)
plt.show()
if ch12==8:
g = df.groupby('HBX')
x = df['MODEL']
y = df['HBX']
plt.xticks(rotation='vertical')
plt.xlabel('COMPANY')
plt.ylabel('Total Sales')
plt.title('Company wise sales count')
plt.grid(True)
plt.bar(x, y)
plt.show()
if ch8==5:
clear()
print('\nSELECT CAR')
print('_'*50)
print('1. Sunny\n')
print('2. Magnite\n')
print('3. Kicks\n')
print('4. GT-R\n')
print('5. Terra\n')

ch13 = int(input('Enter your choice:'))

if ch13==1:
g = df.groupby('SUNNY')
x = df['MODEL']
y = df['SUNNY']
plt.xticks(rotation='vertical')
plt.xlabel('COMPANY')
plt.ylabel('Total Sales')
plt.title('Company wise sales count')
plt.grid(True)
plt.bar(x, y)
plt.show()
if ch13==2:
g = df.groupby('MAGNITE')
x = df['MODEL']
y = df['MAGNITE']
plt.xticks(rotation='vertical')
plt.xlabel('COMPANY')
plt.ylabel('Total Sales')
plt.title('Company wise sales count')
plt.grid(True)
plt.bar(x, y)
plt.show()
if ch13==3:
g = df.groupby('KICKS')
x = df['MODEL']
y = df['KICKS']
plt.xticks(rotation='vertical')
plt.xlabel('COMPANY')
plt.ylabel('Total Sales')
plt.title('Company wise sales count')
plt.grid(True)
plt.bar(x, y)
plt.show()
if ch13==4:
g = df.groupby('GT-R')
x = df['MODEL']
y = df['GT-R']
plt.xticks(rotation='vertical')
plt.xlabel('COMPANY')
plt.ylabel('Total Sales')
plt.title('Company wise sales count')
plt.grid(True)
plt.bar(x, y)
plt.show()
if ch13==5:
g = df.groupby('TERRA')
x = df['MODEL']
y = df['TERRA']
plt.xticks(rotation='vertical')
plt.xlabel('COMPANY')
plt.ylabel('Total Sales')
plt.title('Company wise sales count')
plt.grid(True)
plt.bar(x, y)
plt.show()
if ch8==6:
clear()
print('\nSELECT CAR')
print('_'*50)
print('1. A4\n')
print('2. A6\n')
print('3. A8\n')

print('4. Q2\n')
print('5. Q8\n')
print('6. RS7\n')

ch14 = int(input('Enter your choice:'))

if ch14==1:
g = df.groupby('A4')
x = df['MODEL']
y = df['A4']
plt.xticks(rotation='vertical')
plt.xlabel('COMPANY')
plt.ylabel('Total Sales')
plt.title('Company wise sales count')
plt.grid(True)
plt.bar(x, y)
plt.show()
if ch14==2:
g = df.groupby('A6')
x = df['MODEL']
y = df['A8']
plt.xticks(rotation='vertical')
plt.xlabel('COMPANY')
plt.ylabel('Total Sales')
plt.title('Company wise sales count')
plt.grid(True)
plt.bar(x, y)
plt.show()
if ch14==3:
g = df.groupby('A8')
x = df['MODEL']
y = df['A8']
plt.xticks(rotation='vertical')
plt.xlabel('COMPANY')
plt.ylabel('Total Sales')
plt.title('Company wise sales count')
plt.grid(True)
plt.bar(x, y)
plt.show()
if ch14==4:
g = df.groupby('Q2')
x = df['MODEL']
y = df['Q2']
plt.xticks(rotation='vertical')
plt.xlabel('COMPANY')
plt.ylabel('Total Sales')
plt.title('Company wise sales count')
plt.grid(True)
plt.bar(x, y)
plt.show()
if ch14==5:
g = df.groupby('Q8')
x = df['MODEL']
y = df['Q8']
plt.xticks(rotation='vertical')
plt.xlabel('COMPANY')
plt.ylabel('Total Sales')
plt.title('Company wise sales count')
plt.grid(True)
plt.bar(x, y)
plt.show()
if ch14==6:
g = df.groupby('RS7')
x = df['MODEL']

y = df['RS7']
plt.xticks(rotation='vertical')
plt.xlabel('COMPANY')
plt.ylabel('Total Sales')
plt.title('Company wise sales count')
plt.grid(True)
plt.bar(x, y)
plt.show()

if ch == 3:
main_menu()
wait = input()
def main_menu():
clear()
introduction()
while True:
clear()
print('MAIN MENU ')
print('_'*50)
print()
print('1. Read CSV File\n')
print('2. Data Analysis Menu\n')
print('3. Graph Menu\n')
print('4. Exit\n')
choice = int(input('Enter your choice :'))
if choice == 1:

df = pd.read_csv("/Users/admin/Desktop/Kush/Study/IP/PROJECT/CAR.csv")
print (df)
wait = input()
if choice == 2:

data_analysis_menu()
wait = input()
if choice == 3:
graph()
wait = input()
if choice == 4:
print ("Project Made by- Kush Shah")
break
clear()
# call your main menu
main_menu()

OUTPUTS
MAIN MENU
1. READ CSV FILE

2. DATA ANALYSIS MENU

2,1- SHOW COLUMNS
2,2- SHOW TOP ROWS
2,3- SHOW BOTTOM ROWS

2,4- SHOW PARTICULAR COLUMN (SAY, AMAZE)
2,5- ADD A NEW RECORD

2,6- DELETE A COLUMN
2,7- DATA SUMMARY

3. GRAPH MENU
THE GRAPHS OF SALES OF VARIOUS CARS IS SHOWN
WHEN THE USER SELECTS THEM. FIRST THE USER
SELECTS THE MANUFACTURER FROM THE GIVEN SIX
OPTIONS. ONCE THE MANUFACTURER IS SELECTED, THE
USER IS SUPPOSED TO SELECT THE NAME OF THE CAR
MODEL FROM THE GIVEN LIST.
SINCE THERE ARE A LOT OF CAR MODELS IN THE CSV, I
HAVE NOT PRINTED ALL THE CHARTS BUT TWO OR
THREE CHARTS OF EACH TYPE RANDOMLY SELECTED.
STILL ALL THE CAR MODELS ARE CHECKED AND ALL OF
THOSE ARE WORKING JUST PERFECTLY.

LINE GRAPHS OF CARS- (SELECTED RANDOMLY)
HONDA- AMAZE NISSAN- KICKS
TATA- TIGOR MARUTI SUZUKI- CELERIO X

BAR GRAPHS OF CARS- (SELECTED RANDOMLY)
AUDI- A8 NISSAN- TERRA
TATA- NANO HONDA- CITY