12th Group Project Ip
12th Group Project Ip
INTRODUCTION TO PYTHON
Python is a widely used general-purpose interpreted, object-oriented, high-level
programming language with dynamic semantics. Its high-level built in data
structures, combined with dynamic typing and dynamic binding, make it very
attractive for Rapid Application Development, as well as for use as a scripting or
glue language to connect existing components together.
Python's simple, easy to learn syntax emphasizes readability and therefore reduces
the cost of program maintenance. Python supports modules and packages, which
encourages program modularity and code reuse. The Python interpreter and the
extensive standard library are available in source or binary form without charge for
all major platforms, and can be freely distributed.
Python was created by Guido van Rossum in 1991 and further developed by the
Python Software Foundation. It was designed with an emphasis on code
readability, and its syntax allows programmers to express their concepts in fewer
lines of code.
Python is a programming language that lets you work quickly and integrate
systems more efficiently.
It is used for:
• web development (server-side),
• software development,
• mathematics, • system scripting.
Keshav choudhary
Page 1
CLASS 12th INFORMATION PRACTICES(065)
HISTORY OF PYTHON
In the late 1980s, history was about to be written. It was that time when working on
Python started. Soon after that, Guido Van Rossum began doing its
applicationbased work in December of 1989 at Centrum Wiskunde & Informatica
(CWI) which is situated in the Netherlands. It was started as a hobby project
because he was looking for an interesting project to keep him occupied during
Christmas.
The inspiration for the name came from the BBC’s TV Show – ‘Monty Python’s
Flying Circus’, as he was a big fan of the TV show and also he wanted a short,
unique and slightly mysterious name for his invention and hence he named it
Python! He was the “Benevolent dictator for life” (BDFL) until he stepped down
from the position as the leader on 12th July 2018. For quite some time he used to
work for Google, but currently, he is working at Dropbox.
Keshav choudhary
Page 2
CLASS 12th INFORMATION PRACTICES(065)
FEATURES OF PYTHON
• Python is an interpreted, interactive, directly executed language with a
precompiled code.
• It is a loosely typed object-oriented programming language with few
keywords, simple English-like structure and easy to learn.
• It is a free, open-source and portable language having a large repository of
libraries.
• It takes less time to develop as python programs are typically 3 to 5 times
shorter than the equivalent programming languages. This is because of its
builtin, high level data types and its dynamic typing.
• It is extensible/ extendable and highly efficient as there is no wastage of time
in declaring the types of variable or arguments.
• It supports GUI (graphical user interface) and garbage collection.
• It is easily compatible with other languages like C, C++, core java, etc.
• Python is used for both scientific and non-scientific programming.
Keshav choudhary
Page 3
CLASS 12th INFORMATION PRACTICES(065)
ADVANTAGES OF PYTHON
Keshav choudhary
Page 4
CLASS 12th INFORMATION PRACTICES(065)
DISADVANTAGES OF PYTHON
Keshav choudhary
Page 5
CLASS 12th INFORMATION PRACTICES(065)
INTRODUCTION TO PANDAS
Pandas is a powerful Python library for data analysis and manipulation. It is
widely used for working with structured data, such as tables, spreadsheets, or
databases.
HISTORY OF PANDAS
Pandas is a Python library used for working with data. Its development is a story
of solving real-world problems with better tools for data analysis.
TIMELINE:
- 2009: The first version of Pandas was released. The name “PANDAS”
comes from “PANEL DATA SYSTEM” which refers to multi-dimensional data
used in statistics.
- 2010s: Pandas quickly gained popularity among data scientists and analysts
for its powerful and flexible data handling capabilities. It became a key tool in the
Python data science ecosystem.
- 2015 and Beyond: Pandas continued to grow with frequent updates, adding
new features and improvements. It remains a core library for data analysis in
Python today.
Pandas has evolved from a personal project into one of the most important tools for
working with data in Python.
Keshav choudhary
Page 6
CLASS 12th INFORMATION PRACTICES(065)
1. DATA STRUCTURES:
- Series: Think of it as a single column of data with labels.
- DataFrame: Imagine a table with rows and columns, like a spreadsheet.
2. MAIN USES:
- Data Cleaning: Fix issues like missing values and incorrect data types.
- Data Transformation: Reshape or combine data to fit your needs.
- Data Analysis: Summarize and analyze data to find insights.
3. FILE HANDLING:
- Read and Write: Easily read data from files and save your results to files.
4. TIME SERIES:
- Dates and Times: Handle and analyze time-based data efficiently.
Pandas simplifies many tasks involved in working with data, making it easier to
clean, analyze, and visualize information.
Keshav choudhary
Page 7
CLASS 12th INFORMATION PRACTICES(065)
\
INTRODUCTION TO MATPLOTLIB
Matplotlib is a widely-used Python library for creating static, animated, and
interactive visualizations in Python. It provides a comprehensive toolkit for
generating a variety of plots and graphs, which makes it a valuable resource for
data analysis, scientific research, and engineering applications.
Keshav choudhary
Page 8
CLASS 12th INFORMATION PRACTICES(065)
Keshav choudhary
Page 9
CLASS
12th
INFORMATION PRACTICES(065)
About Netflix
Netflix is a global streaming platform that offers a wide variety of television shows, movies,
documentaries, and original content. Founded in 1997 by Reed Hastings and Marc Randolph, Netflix
initially operated as a DVD rental service before transitioning to streaming in 2007. Today, it boasts over
230 million subscribers in more than 190 countries.
Netflix is renowned for its original programming, including critically acclaimed series like "Stranger
Things," "The Crown," and "House of Cards," as well as a growing library of films and documentaries. The
platform invests heavily in content creation, spending billions annually to produce and acquire new titles.
Its user-friendly interface allows subscribers to easily browse and discover content tailored to their
preferences, often using sophisticated algorithms to recommend shows and movies. Netflix has also
ventured into interactive content and gaming, expanding its reach in the entertainment industry.
As a pioneer in the streaming revolution, Netflix has significantly influenced how audiences consume
media, shifting the industry from traditional cable to on-demand streaming. The platform continues to
evolve, adapting to changing viewer habits and technological advancements.
About Netflix
Netflix is a global streaming platform that offers a wide variety of television shows, movies,
documentaries, and original content. Founded in 1997 by Reed Hastings and Marc Randolph, Netflix
CLASS
12th
INFORMATION PRACTICES(065)
initially operated as a DVD rental service before transitioning to streaming in 2007. Today, it boasts over
230 million subscribers in more than 190 countries.
Netflix is renowned for its original programming, including critically acclaimed series like "Stranger
Things," "The Crown," and "House of Cards," as well as a growing library of films and documentaries. The
platform invests heavily in content creation, spending billions annually to produce and acquire new titles.
Its user-friendly interface allows subscribers to easily browse and discover content tailored to their
preferences, often using sophisticated algorithms to recommend shows and movies. Netflix has also
ventured into interactive content and gaming, expanding its reach in the entertainment industry.
As a pioneer in the streaming revolution, Netflix has significantly influenced how audiences consume
media, shifting the industry from traditional cable to on-demand streaming. The platform continues to
evolve, adapting to changing viewer habits and technological advancements.
CLASS
12th
INFORMATION PRACTICES(065)
FUNCTIONS USED
SOURCE CODE
import pandas as pd import
matplotlib.pyplot as pl ch='Y'
while ch=='Y':
choice==3:
print(df[df['category']=='Drama']['Series_n'])
elif choice==4:
len(inx)==0:
else:
print(df[df.NID==e])
elif choice==5:
CLASS
12th
INFORMATION PRACTICES(065)
df=df.append({'NID':nid,'Series_n':s,'DOR':dor,'NOE':noe,'Seasons':sea,"Director_n":dn,"Actor":an,"Acto
ress":acn,"category":c,"Rating":r},ignore_index=True) elif choice==6:
inx=df[df.NID==e].index.values if
len(inx)==0:
else:
print(df[df.NID==e])
df=df[df['NID']!=e]
print('record deleted')
df.index=range(len(df))
choice==7:
CLASS
12th
INFORMATION PRACTICES(065)
len(inx)==0:
else:
df.loc[inx,"Series_n"]=n df.loc[inx,"DOR"]=dor
df.loc[inx,"NOE"]=noe df.loc[inx,"Seasons"]=sea
df.loc[inx,"Director_n"]=dn df.loc[inx,"Actor"]=an
df.loc[inx,"Actoress"]=acn
df.loc[inx,"category"]=c
df.loc[inx,"Rating"]=r
choice==8: pl.ylabel('Rating')
pl.xlabel('NID')
pl.plot(df['NID'],df['Rating'])
CLASS
12th
INFORMATION PRACTICES(065)
pl.title('Rating chart')
pl.bar(df['Series_n'],df['NOE'])
choice==10:
df.to_csv('netflix.csv',index=False)
continue ').upper()
Screenshots of code:
CLASS
12th
INFORMATION PRACTICES(065)
Choice 1:
Choice 2:
CLASS
12th
INFORMATION PRACTICES(065)
Choice 3:
CLASS
12th
INFORMATION PRACTICES(065)
Choice 4:
CLASS
12th
INFORMATION PRACTICES(065)
CLASS
12th
INFORMATION PRACTICES(065)
Choice 5:
CLASS
12th
INFORMATION PRACTICES(065)
After changes:
CLASS
12th
INFORMATION PRACTICES(065)
Choice 6:
After changes:
CLASS
12th
INFORMATION PRACTICES(065)
CLASS
12th
INFORMATION PRACTICES(065)
Choice 7:
CLASS
12th
INFORMATION PRACTICES(065)
After changes:
Choice 8:
CLASS
12th
INFORMATION PRACTICES(065)
Choice 9:
CLASS
12th
INFORMATION PRACTICES(065)
CLASS
12th
INFORMATION PRACTICES(065)
Choice 10:
CLASS
12th
INFORMATION PRACTICES(065)
Conclusion
This is a Python program that utilizes the Pandas library for data manipulation and
Matplotlib for data visualization. It offers a command-line interface for users to
interact with a dataset of Netflix series stored in a CSV file. The program enables users
to perform various operations, including reading the CSV file, displaying records,
filtering for drama series, searching for records by Netflix ID, and adding, deleting, or
modifying existing records. Additionally, it provides the capability to visualize data
through line and bar graphs, illustrating ratings and the number of episodes,
respectively.
The program operates in a loop, allowing users to execute multiple operations until
they choose to exit. Each choice corresponds to a different function, enhancing user
interaction and data management capabilities. Furthermore, the code ensures that
the dataset is saved back to the CSV file after modifications, preserving changes
made during the session.
BIBLIOGRAPHY
ww.w.cbseacadmeic.nic.in
www.epython.org www.thonny.org