0% found this document useful (0 votes)
8 views2 pages

Python Script for Netflix Data Management

The Python script for the Gopal Project allows users to manage a CSV file containing Netflix program data. Users can read, display, search, add, delete, modify records, and visualize salary data using line and bar graphs. The script includes a loop for continuous interaction until the user chooses to exit.

Uploaded by

tpass7716
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)
8 views2 pages

Python Script for Netflix Data Management

The Python script for the Gopal Project allows users to manage a CSV file containing Netflix program data. Users can read, display, search, add, delete, modify records, and visualize salary data using line and bar graphs. The script includes a loop for continuous interaction until the user chooses to exit.

Uploaded by

tpass7716
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

Python Script - Gopal Project

import pandas as pd
import [Link] as pl
ch='Y'
while ch=='Y':
print('[Link] CSV File')
print('[Link] All Records')
print('[Link] The Director Name Of Cobra Kai')
print('[Link] Record')
print('[Link] New Record')
print('[Link] Record')
print('[Link] Record')
print('[Link] Salary Chart Using Line Graph')
print('[Link] Salary Chart Using Bar Graph')
print('[Link] Data Into CSV File')
choice=int(input('Enter Your Choice:'))

if choice==1:
df = pd.read_csv('Gopal [Link]') # updated file name
print('File Opened')

elif choice==2:
print(df)

elif choice==3:
print(df[df['Director_name']=='Josh Heald'])

elif choice==4:
e=int(input('Enter Netflix ID to search'))
inx=df[df.Netflix_Id==e].[Link] # to get index value
if len(inx)==0:
print("Record Not Found")
else:
print(df[df.Netflix_Id==e])

elif choice==5:
n=int(input('Enter Netflix ID'))
p=input('Enter Programme Name')
ns=input('Enter Number Of Seasons')
d=input('Enter Director Name')
a=input('Enter Actor Name')
an=input('Enter Actress Name')
ap=int(input('Enter Amount Paid'))
df=df._append({'Netflix_Id':n,'Programme Name':p,'No_Of_Seasons':ns,'Director_name':d,'Act

elif choice==6:
e=int(input('Enter Netflix ID To Delete'))
inx=df[df.Netflix_Id==e].[Link]
if len(inx)==0:
print('Record Not Found')
else:
print(df[df.Netflix_Id==e])
df=df[df['Netflix_Id']!=e]
print('Record Deleted')
[Link]=range(len(df))

elif choice==7:
e=int(input('Enter Netflix ID To Modify'))
inx=df[df.Netflix_Id==e].[Link]
if len(inx)==0:
print("Record Not Found")
else:
print(df[df.Netflix_Id==e])
n=input('Enter New Netflix ID')
p=input('Enter New Programme Name')
ns=int(input("Enter New Number Of Seasons"))
d=input("Enter New Director Name")
a=input("Enter New Actor Name")
an=input("Enter New Actress Name")
ap=input("Enter New Amount Paid")
[Link][inx,"Netflix_id"]=n
[Link][inx,"Programme Name"]=p
[Link][inx,"No_Of_Seasons"]=ns
[Link][inx,"Director_name"]=d
[Link][inx,"Actor_Name"]=a
[Link][inx,"Actress_Name"]=an
[Link][inx,"Amount_Paid"]=ap
print("Record Updated")

elif choice==8:
[Link]('Number Of Seasons')
[Link]('Programme Name')
[Link](df['Programme Name'],df['No_Of_Seasons'])
[Link]('Total Seasons')
[Link]()

elif choice==9:
[Link](df['Actor_Name'],df['Amount_Paid'])
[Link]('Salary Graph')
[Link]('Names')
[Link]()

elif choice==10:
df.to_csv('Gopal [Link]', index=False) # updated file name
print('File Saved')
ch=input(' Do You Want To Continue ').upper()

You might also like