0% found this document useful (0 votes)
4 views13 pages

Code

Uploaded by

Puru Jangid
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views13 pages

Code

Uploaded by

Puru Jangid
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 13

IEW NUJATI FENIAN ROTI FENVIUIET Sey sep

##Made By: Kush Shah, 12 Agni/ ZSE-G

import pandas as pd

import numpy as np

import me

import matplotlib.pyplot as pit

df = pd.DataFrame()

def introduc on():

def read_csv_file():

df = pd.read_csv("/Users/admin/Desktop/Kush/Study/IP/PROJECT/CAR csv")

print(df)

##Name of func on: clear()

##Purpose: Clear Oulput Screen

def clear():

for x in range(3):

print()

def data_analysis menu():

ai = pa.read_csv( /Users/aomin/Leskliop/RusivSiudy/IF/FROJEC T/UAR.CS

while True:

clear()

print(\n\nData Analysis MENU )

print(_*50)

print('1. Show Columnsin)

print(’2. Show Top Rows\n’)

print('3. Show Bo om Rows\n')

print(4. Show Specific Column’)

prini(5. Add a New Record\n’)

prin(6. Delete a Columnin’)

print(7. Data Summary’)

print(8. Exit (Move to main menu)\n’)

ch = int(input( Enter your choice:))


ifoh==1:

print (df.columns)

wait = input()

ifoh==2:

n = int(input( Enter Total rows you want to show :))

print(df.head(n))

wait = input()

ifoh==3:

n = int(input(Enter Total rows you want to show :))

print(df.tail(n))

wait = input()

ifoh == 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 = inpul( Enter New Model Name )

b = inpul(’ Enter Sales in 2015 -)

‘c= int(input( Enter Sales in 2016 ))

d = int(input( Enter Sales in 2017 ))

© = int(input( Enter Sales in 2018 )) g= int(input( Enter Sales in 2020 1)

new._data= pd.Series([b,c,d.e.f.g))

df= pd.read_csv("/Users/admin/Deskiop/Kush/Study/IP/PROJECT/CAR csv", index_col=None)

Z=len(df.axes{1])

diinsert(z, a, new_data)

d.to_csv(*/Users/admin/Desktop/Kush/Study/IP/PROJECT/CAR csv", index=False)

print(d)

wait=input()

if ch==6:

col_name =input('Enter column Name to delete :)


del difcol_name]

df.o_csv(*/Users/admin/Deskiop/Kush/Study/IP/PROJECT/CAR csv", index= False)

print(d)

print(\n\nin Press any key to con nue...)

wait=input()

if ch==7:

print(dt.describe())

print("\n\n\nPress any key to con nue....")

wait=input()

if ch ==6:

main_menu()

break

def graph():

df = pd.read_osv("/Users/admin/Deskiop/Kush/Study/IP/PROJECT/CAR csv")

while True:

clear()

print(\nGRAPH MENU )

print(_"50)

print(1. Car Wise Line Graphin')

print(2. Car Wise Bar Graphin')

print(3. Exit (Move to main menu)\n’)

ch = int(input( Enter your choice:))

ifoh==1:

clear()

print(\nSELECT MANUFACTURER)

print(_*50)

print('1. Hondaln')

print(2. Hyundailn')

print(3. Maru Suzuki’)

print(4. Tataln')

print(’s. Nissanin’)
print(6. Audi)

cht = int(input( Enter your choice:))

font == 1:

clear()

print(\nSELECT CAR)

print(*50)

print(1. Amaze\n')

print(2. Jazz\n)

print(3, WR-V\n')

~~ oAnf'4. CRAY

print(’5. HR-V\n') 3

print(6. City\n') :

print(7. Civic\n') :

ch2 = int(input( Enter your choice)

if ch2==1: :

g = df.groupby( AMAZE")

x =dif MODEL] :

y = dif AMAZE] :

plt.x cks(rota on="ver cal’)

plt.xlabel( COMPANY) :

plt.ylabel( Total Sales) :

ph. tle('Company wise sales count’) :

pitgrid(True) :

plt.plot(x, y) :

pit.show() :

if ch2==2:

g = df.groupby(JAZZ)

x= dif MODEL] :

y = dif JAZZ] ;

plt.x cks(rota on="ver cal’)

pit.xiabel( COMPANY) i
plt.ylabel( Total Sales) :

pl tle('Company wise sales count) :

plt.grid(True) :

plt.plot(x, y)

pit.show()

if ch2==3:

g = df.groupby('WR-V') :

x= dif MODEL]

y= dif WR-V] :

plt.x cks(rota on="ver cal’)

pit.xiabel( COMPANY) :

plt.ylabel(Total Sales) :

pl tle('Company wise sales count) :

plt.grid(True) :

plt.plot(x, y) ;

pit.show()I che==4: i

g = dl.groupby( CR-V)

x = df MODEL]

y= dif CR-V]

plt.x cks(rota on= ver cal’)

plt.xlabel( COMPANY)

plt.ylabel( Total Sales)

pit. le( Company wise sales count)

pit grid(True)

pit plot(x, y)

plt.show()

if ch2==5:

g = di.groupby(HA-V)

x= dif MODEL]
y= difHR-V]

pit x cks(rota on=ver cal)

plt.xlabel( COMPANY)

plt.ylabel( Total Sales)

pit. le(‘ Company wise sales count)

plt.grid(True) f

pitplot(x, y)

plt.show()

if ch2==G:

g = dl.groupby(CITY)

x= dif MODEL

y=df[CITY] |

plt.x cks(rota on=ver cal)

pit.xlabel( COMPANY)

pitylabel( Total Sales)

pit. le( Company wise sales count)

plt.grid(True)

plt.plot(x, y)

pit.show()

if ch2==7:

g = df.groupby('CIVIC')

x = dff MODEL] x =dffMODEL]

y=difCIVIC]

pltx cks{(rota on=ver cal)

pltxlabel( COMPANY)

plt.ylabel( Total Sales)

pi tle( Company wise sales count)

pit.grid(True)
pit.plot(x, y)

plt.show()

if ch1==2:

clear()

print(\nSELECT CARY)

print(_"*50)

print('1. i10\)

print(2. i201)

print('3. Cretan’)

print('4. Venue\n')

prini(’5. Verna\n')

print(’6. Santon’)

print('7. Elantra\n’)

print(’8. Xcen n)

print('9. Sonata\n')

print('10. Palisade\n')

print(‘11. Kona\n')
ch3 = int(input( Enter your choice:))

if chd==1:

g = df.groupby(i10)

x = dif MODEL]

y=dfi10]

pht.x cks(rota on="ver cal)

pitxlabel( COMPANY)

pt.ylabel( Total Sales)

plt. tle( Company wise sales count)

plt.grid(True)

plt.plot(x, y)

pit.show()

if ch3==2:

g = df.groupby(120)

x= dif MODEL] y =df[i20] ;

plt.x cks(rota on="ver cal’) :

plt.xlabel( COMPANY’) :

plt.ylabel(Total Sales) :

pl tle('Company wise sales count’)

plt.grid(True) ;

plt.plot(x, y)

plt.show() ;

if ch3==3: :

g = df.groupby('CRETA') ;

x= dif MODEL]

~~ y=dfflCRFTATpit.x cks(rota on="ver cal)

pitxlabel( COMPANY)
plt.ylabel( Total Sales)

pl tle( Company wise sales count’)

plt.grid(True)

pit.plot(x, y)

plt.show()

if ch3==1:

9 = dt.groupby(VENUE')

x= dif MODEL]

y= df VENUE]

plt.x cks(rota on="ver cal’)

pitxlabel( COMPANY)

plt.ylabel( Total Sales)

plt.itle( Company wise sales count’)

pit.grid(True)

pit.plot(x, y)

plt.show()

if ch3==5:

9 = df.groupby( VERNA)

x= dif MODEL]

y = dif VERNA]

ph.x cks(rota on="ver cal)

pt.xlabel( COMPANY)

pt.ylabel( Total Sales)

plt. tle( Company wise sales count)

pit.grid(True)

pit.plot(x, y)

plt.show()

if chd==6:;
9 = di.groupby(SANTRO')

x= dif MODEL]

y = dif SANTRO]

ph.x cks(rota on=ver cal)

pitxlabel( COMPANY)

plt.ylabel( Total Sales)

pl tle( Company wise sales count’)

plt.grid(True)

pit.plot(x, y)

pit.show()

if ch3==7: g = df.groupby('ELANTHA') :

x= di MODEL]

y = Aff ELANTRA]

pit.x cks(rota on=ver cal)

plt.xlabel( COMPANY)

pll.ylabel( Total Sales)

pit. le(‘ Company wise sales count)

pit grid(True)

pit.plot(x, y) |

plt.show() |

if ch==6:

g = dl.groupby(XCENT)

x= df{MODEL]

y = di XCENT]

pt x cksrota on="ver cal’)

plt.xlabel( COMPANY)

pitylabel( Total Sales)

ph. tle('Company wise sales count’) f

plt.grid(True) f

plt.plot(x, y)
pit.show()

if ch3==0:

a = df.aroupbv('SONATAY ;

x = df MODEL] |

y = df SONATA] f

pit.x cks(rota on="ver cal)

plt.xlabel( COMPANY’)

plt.ylabel( Total Sales)

plt. tle(‘Company wise sales count)

plt.grid(True)

pitplot(x, y)

plt.show()

if ch3==10: :

g = di.groupby( PALISADE")

x= df[ MODEL]

y = dif PALISADE)

plt.x cks(rota on="ver cal’)

plt.xlabel( COMPANY)

plt.ylabel( Total Sales)

plt. tle( Company wise sales count) pit.grid(True) :

pitplot(x, y)

pit show()

if chd==11:

g = df.groupby(KONA) :

x = dif MODEL]

y = dif KONA] ;

plt.x cks(rota on= ver cal’) :

pit.xdabel( COMPANY)

pht.ylael( Total Sales)


plt. tle( Company wise sales count)

pltgrid(True)

pitplot(x, y)

pit.show() ;

if chi==3:

clear() :

print(\nSELECT CARY)

print(_*50)

print(1. Baleno\n)

print(2. Swi ’)

print(3. DZire\n')

print(4. Alton)

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 chd==1:

g = df.groupby(BALENO) :

x= dif MODEL]

y = difBALENO]

pitx cks(rota on="ver cal)

pt.xlabel( COMPANY)

pit ylabel( Total Sales)

pi. tls( Company wise sales count)

pit.grid(True) ;

plt.plot(x, y) ;
plt.show() : if cha==2:

g = dl.groupby(SWIFT)

x= df MODEL]

y = dif SWIFT]

oit xicksrota on=voriical)

You might also like