import pandas as pd
import [Link] as plt
a=pd.read_csv("C:/Users/Student/Documents/[Link]")
def mainmenu():
print("--------------------------------------------------")
print(" IP PROJECT ")
print("--------------------------------------------------")
print("1. Display Dataframe ")
print("2. Data Analysis")
print("3. Visualize The Data ")
print("4. Exit")
ch=int(input("enter your choice between 1 and 4: "))
while ch>=1 and ch<=4:
if ch==1:
DF()
elif ch==2:
DA()
elif ch==3:
graphs()
elif ch==4:
print("")
print("Thank you.")
break
mainmenu()
else:
print("Wrong input")
mainmenu()
def DF():
print(a)
print("")
print("Thank you.")
mainmenu()
def DA():
print("---------------------------------------------------")
print(" DATA ANAYLSYSIS MENU ")
print("---------------------------------------------------")
print("1. Item with maximum sale")
print("2. Item with highest cost")
print("3. Item with lowest cost")
print("4. Item that brought in the most money.")
print("5. Back to mainmenu")
cho=int(input("enter the choice between 1 and 4: "))
while cho>=1 and cho<=3:
if cho==1:
print("The item that had the highest number sold is:")
print(a[["COUNTRY","PENETRATION"]]
[(a["PENETRATION"]==a["PENETRATION"].max())])
print("thank you.")
break
elif cho==2:
print("the country with maximum average screen time is")
print(a[["COUNTRY","SCREENTIME"]]
[(a["SCREENTIME"]==a["SCREENTIME"].max())])
print("thank you")
break
elif cho==3:
print("")
break
elif cho==4:
print("")
break
elif cho==5:
print("")
print("Going back to mainmenu...")
break
else:
mainmenu()
break
else:
mainmenu()
def graphs():
print("---------------------------------------------")
print(" DATA VISUALISATION MENU ")
print("---------------------------------------------")
print("1.
print("2. bar graph for penetration in each couuntry")
print("3. line graph for screen time of each country")
ch2=int(input("please enter your choice: "))
while ch2>=1 and ch2<=3:
if ch2==1:
line1()
break
elif ch2==2:
bar1()
break
elif ch2==3:
line2()
break
else:
print("please enter valid input")
graphs()
def line1():
[Link]([Link],[Link],marker="*",markersize=10,linestyle="--",linewidth=
3)
[Link]("COUNTRY v/s PENETRATION")
[Link]("COUNTIRES")
[Link]("PENETRATION")
[Link](rotation=30)
[Link]()
print("thank you")
def bar1():
[Link](kind="bar")
[Link](rotation=30)
[Link]()
print("thank you")
def line2():
[Link]([Link],[Link],marker="*",markersize=10,linestyle="--",linewidth=3
)
[Link]("COUNTRY v/s SCREEN TIME")
[Link]("COUNTIRES")
[Link]("SCREEN TIME")
[Link](rotation=30)
[Link]()
print("thank you")
def bar2():
[Link](kind="bar")
[Link](rotation=30)
[Link]()
print("thank you")
mainmenu()