0% found this document useful (0 votes)
366 views

IP CSV Project For Class 12

Information practices project for class 12 Topic: movie recommendations

Uploaded by

Gaurav Agrawal
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
366 views

IP CSV Project For Class 12

Information practices project for class 12 Topic: movie recommendations

Uploaded by

Gaurav Agrawal
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 22

SHREE SWAMINARAYAN ENGLISH MEDIUM SCHOOL

SALVAV, VAPI

PROJECT REPORT

ON
MOVIE RECOMNENDATION

FOR

SSCE 2024 -25 EXAMINATIONS

(As a part of Informatics Practices)

SUBMITTED BY: GAURAV AGRAWAL


BOARD ROLL NO:
UNDER THE GUIDANCE OF: MRS. DEEPIKA PARDESHI

1
CERTIFICATE
This is to certify that

the project entitled,

MOVIE RECOMMENDATION
is a bona-fide work done by

GAURAV AGRAWAL
of class

XII-COMMERCE

SHREE SWAMINARAYAN ENGLISH MEDIUM SCHOOL - SALVAV


For session 2024 - 25
In partial fulfillment of
CBSE SSCE Examination 2024
Has been carried out under my direct supervision and guidance. This
report or a similar report on this topic has notbeen submitted for any
other examination and does not form
a part of any other course undergone by the candidate.

___________________________________________ ____________________________________________ _____________________________________

External examiner Internal examiner Principal

School Seal
2
ACKNOWLEDGEMENT

In the accomplishment of this project successfully, many


people have bestowed their blessings and heart pledged
support upon me. I would like to express my special thanks of
gratitude to my teacher Mrs. Deepika Pardeshi, who gave
me golden opportunity to do this wonderful project of and for
giving me able guidance and support in completing my
project. I would also like to extend my gratitude to Principal
Ma’am Mrs. Minal Desai for providing me with all the facility
that was required.

I sincerely applaud my parents, friends and classmate who


have helped me with their valuable suggestions which was
helpful to me in various phases of the completion of the project.

~Gaurav.Agrawal
XII COMMERCE

3
REFERENCES
Textbook by Sumita Arora
www.google.com
Textbook by NCERT

4
INDEX
Sr.No. DESCRIPTION PAGE.NO.

1. CERTIFICATE 2

2. ACKNOWLEDGEMENT 3

3. REFERENCES 4

4. OBJECTIVE 6

5. CSV FILE IN EXCEL 7

6. SOURCE CODE 8

7. OUTPUT SCREEN 17

8. HARDWARE AND 22
SOFTWARE
REQUIREMENT

5
PROJECT ON MOVIE RECOMMENDATION SYSTEM
INTRODUCTION

Python is a high-level, general-purpose programming language. Its design philosophy


emphasizes code readability with the use of significant indentation. Python is
dynamically-typed and garbage collected. It supports multiple programming
paradigms, including structured (particularly procedural), object-oriented and
functional programming. It is often described as a “batteries included” language due
to its comprehensive standard library. It is a popular embedded programming
language used in Arduino, Raspberry Pi, and others. This project aims to familiarize
beginners with some Python libraries that can be implemented in embedded projects
as well. Python is simple to start out with, fun, and easy to learn.

The “MOVIE RECOMMENDATION PROJECT” is a recommendation system. It


is a filtration program with the primary purpose of predicting a user’s
“rating” or “preference” for a domain-specific object or item. Since the
domain-specific object in our case is a movie, the main goal of our
recommendation system is to filter and predict only those movies that a
user would choose based on certain information about the user.

6
CSV file in Excel

7
Source Code
import pandas as pd
import matplotlib.pyplot as plt
from datetime import datetime
#Load movie data (you should replace 'movies.csv'
with your dataset)
movies = pd.read_csv('D:\\ip\\csv.csv')

#1
def Display():
df = pd.read_csv('D:\\ip\\csv.csv')
print(df[['MovieName','Genre']])

#2
def Recommend_a_Movie():
movie_data = pd.read_csv('csv.csv')
preferred_genre = input("Enter your preferred
movie genre: ")
genre_filtered = movie_data[movie_data['Genre']
8
== preferred_genre]
sorted_movies =
genre_filtered.sort_values(by='Rating',
ascending=False)
if not sorted_movies.empty:
recommended_movie =
sorted_movies.iloc[0]['MovieName']
print(f"Recommended movie in the
{preferred_genre} genre: {recommended_movie}")
else:
print(f"No movies found in the {preferred_genre}
genre.")
#3
def List_Top_10_Movies():
df = pd.read_csv('csv.csv')
top_10_movies = df.sort_values(by='Rating',
ascending=False).head(10)
print(top_10_movies)

#4
9
def Search_by_Rating():
df = pd.read_csv('D:\\ip\\csv.csv')
rating_threshold=float(input("Enter the rating out
of 10 :- "))
high_rated_movies = df[df['Rating'] <=
rating_threshold]
print(high_rated_movies)

#5
def Add_Movie():
df = pd.read_csv('D:\\ip\\csv.csv')
movie_name = input("Enter the movie name: ")
rating = float(input("Enter the movie rating: "))
genre = input("Enter the movie genre: ")
director = input("Enter the movie director: ")
release_date = input("Enter the movie release date
(YYYY-MM-DD): ")
new_movie = {'MovieName': movie_name,
'Rating': rating,
'Genre': genre,
10
'Director': director,
'ReleaseDate': release_date}
df = df._append(new_movie, ignore_index=True)
df.to_csv('D:\\ip\\csv.csv', index=False)
print(f"{movie_name} has been added to the movie
list.")

#6
def Update():
df = pd.read_csv('D:\\ip\\csv.csv')
movie_name = input("Enter the movie name you
want to update: ")
if movie_name in df['MovieName'].values:
new_rating = float(input("Enter the new rating
for the movie: "))
df.loc[df['MovieName'] == movie_name, 'Rating']
= new_rating
df.to_csv('D:\\ip\\csv.csv', index=False)
print(f" {movie_name} has been updated with
the new data.")
11
else:
print(f" The movie'{movie_name}' was not found
in the database.")

#7
def Delete():
df = pd.read_csv('csv.csv')
movie_name = input("Enter the movie name you
want to delete: ")
if movie_name in df['MovieName'].values:
df = df[df['MovieName'] != movie_name]
df.to_csv('csv.csv', index=False)
print(f"{movie_name} has been deleted from the
movie list.")
else:
print(f"The movie {movie_name} was not found
in the database.")

#8
def top_rated_movie():
12
data = pd.read_csv('D:\\ip\\csv.csv')
MovieNick = data['MovieNick'].tolist()
Rating = data['Rating'].tolist()
plt.plot(MovieNick, Rating)
plt.title('Top Rated movie')
plt.xlabel('MovieNick')
plt.ylabel('Rating')
plt.show()

#9
def movie_by_genre():
data = pd.read_csv('D:\\ip\\csv.csv')
MovieNick = data['MovieNick'].tolist()
Genre = data['Genre'].tolist()
plt.bar(MovieNick,Genre)
plt.title('Top Movie By Genre')
plt.xlabel('MovieNick')
plt.ylabel('Genre')
plt.show()

13
#User input function

def get_user_input():
print('-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-')
print("Movie Recommendation System Menu:")
print("1. Display all Movie")
print("2. Recommend a
Movie(Drama,Crime,Adventure,Sci-
Fi,Horror,Action,)")
print("3. List Top 10 Movies")
print("4. Search by Rating")
print("5. Add a Movie")
print("6. Update data")
print("7. Delete data")
print("8. Top rated movie")
print("9. Movie by genre bar graph")
print("10. Exit")
print('-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-')
choice = input("Enter your choice (1-10): ")
print('-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-')
14
return choice

# Main program
while True:
choice = get_user_input()
if choice=="1":
print("All movie")
Display()
elif choice=="2":
print("Recommend a
Movie(Drama,Crime,Adventure,Sci-
Fi,Horror,Action,)")
Recommend_a_Movie()
elif choice=="3":
print("List Top 10 Movies")
List_Top_10_Movies()
elif choice=="4":
print("Search by Rating")
Search_by_Rating()
elif choice=="5":
15
print("Add a Movie")
Add_Movie()
elif choice=="6":
print("Update data")
Update()
elif choice=="7":
print("Delete data")
Delete()
elif choice=="8":
top_rated_movie()
elif choice=="9":
movie_by_genre()
elif choice=="10":
print("Goodbye!")
break
else:
print("Invalid choice. Please enter a number
between 1 and 10.")

16
Output

17
18
19
20
21
Hardware Requirements:
1. Processor:
Minimum: Intel i3 to i7 or equivalent
2. RAM -
Minimum: 4 GB,
3. Storage-
Minimum: 10 GB of free storage (for the operating system,
Python installation, libraries, and project files).
4. Display-Standard resolution monitor (1366x768 pixels).
5. Other Peripherals- A keyboard and mouse.
Software Requirements:
1. Operating System- - Windows: Windows 10 or higher.
2. Python: - Version: Python 3.8 or higher.
-Installation: Python can be downloaded from
[python.org](https://www.python.org/downloads/).
3. Integrated Development Environment (IDE)/Text Editor
IDLE: Python’s built-in editor, good for beginners.
4. Python Libraries:
- pandas: For handling and processing CSV files.
- numpy: Useful for numerical operations.
- matplotlib : For data visualization, if required.

22

You might also like