0% found this document useful (0 votes)
25 views31 pages

IP PROJECT Vedant

Uploaded by

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

IP PROJECT Vedant

Uploaded by

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

IPL DATASET ANALYSIS

S.NO. TOPIC PAGE


NO.

1 Certificate 3

2 Acknowledgement 4

3 Aim& Problem Definition, Front-End, 5


Back-End, Operating System

4 Hardware/Software configuration 6
required

5 History & overview of Python 3.7.3 7

6 Python features 8

7 Pandas &Matplotlib 9

8 Introduction to the project 10

9 Source code and Output 11-27

10 Bibliography 28

-:INDEX:-
CERTIFICATE

This is to certify that of class XII


– Commerce has worked under my supervision
on the project of Informatics Practices(065). He
has involved deeply for the successfully
completion of this project. I hope this project can
be useful as teaching aid as well as demonstration
package for Informatics Practices students.

Informatics Practices(065)
ACKNOWLEDGEMENT

It is with great pleasure that I find myself penning down these


line to express my sincere thanks to various people who
helped me a long way in completing this project.
The harmonious climate in our school provided proper guide
for preparing the project. It was a privilege to have been
guided by
Thanks to all my classmates who helped me during the
development of this project with their constructive criticism
and advise.
This report is submitted as a part of Informatics Practices
Practical Examination included in curriculum of C.B.S.E for
All India Senior Secondary Examination to be held in year
2024-25.

Name :-
Class :-
AIM TO DEVELOP:
IPL DATASET ANALYSIS
FRONT END :
● Python 3.8.2
BACK END :
● CSV file (.csv file with
records)
Operating system:
●Ms-Windows 10

HARDWARE &
SOFTWARE
REQUIREMENTS:
Hardware Requirement
i5/i7 With at least 8 GB RAM Hard Disk Colour Monitor/LCD

Operating System & Compiler


MS Windows10
Python with related libraries used for Data Analysis

OPEN SOURCE SOFTWARE BEING


USED:
1.Python 3.8.2
 Pandas
 Matplotlib

PANDAS:

Pandas is a software library written for the Python


programming language for data manipulation and analysis. In
particular, it offers data structures and operations for
manipulating numerical tables and time series.

To import this library:

Import pandas as pan

MATPLOTLIB:

Matplotlib is a plotting library for the Python programming


language and its numerical mathematics extension NumPy.

To import this library:

import matplotlib.pyplot as plt


<HISTORY OF PYTHON>

The programming language Python was conceived in


the late 1980s, and its implementation was started in
December 1989 by Guido van Rossum at CWI in the
Netherlands as a successor to ABC capable
of exception handling and interfacing with the system.
Van Rossum is Python's principal author, and his
continuing central role in deciding the direction of
Python is reflected in the title given to him by the
Python community, Benevolent Dictator for
Life (BDFL). (However, van Rossum stepped down as
leader on July 12, 2018). Python was named after the
BBC TV show Monty Python's Flying Circus.
Python 2.0 was released on October 16, 2000, with
many major new features, including a cycle-
detecting garbage collector (in addition to reference
counting) for memory management and support
for Unicode. However, the most important change was
to the development process itself, with a shift to a more
transparent and community-backed process.
OVERVIEW OF PYTHON

Python is a high-level, interpreted, interactive and object-


oriented scripting language. Python is designed to be highly
readable. It uses English keywords frequently where as other
languages use punctuation, and it has fewer syntactical
constructions than other languages.
Python is Interpreted − Python is processed at runtime by the
interpreter. You do not need to compile your program before
executing it. This is similar to PERL and PHP.
Python is Interactive − You can actually sit at a Python
prompt and interact with the interpreter directly to write your
programs.
Python is Object-Oriented − Python supports Object-Oriented
style or technique of programming that encapsulates code
within objects.
Python is a Beginner's Language − Python is a great language
for the beginner-level programmers and supports the
development of a wide range of applications from simple text
processing to WWW browsers to games.
PYTHON FEATURES
Python's features include −

Easy-to-learn − Python has few keywords, simple structure, and a clearly


defined syntax. This allows the student to pick up the language quickly.

Easy-to-read − Python code is more clearly defined and visible to the eyes.

Easy-to-maintain − Python's source code is fairly easy-to-maintain.

A broad standard library − Python's bulk of the library is very portable and
cross-platform compatible on UNIX, Windows, and Macintosh.

Interactive Mode − Python has support for an interactive mode which allows
interactive testing and debugging of snippets of code.

Portable − Python can run on a wide variety of hardware platforms and has the
same interface on all platforms.

Extendable − you can add low-level modules to the Python interpreter. These
modules enable programmers to add to or customize their tools to be more
efficient.

Databases − Python provides interfaces to all major commercial databases.

GUI Programming − Python supports GUI applications that can be created and
ported to many system calls, libraries and windows systems, such as Windows
MFC, Macintosh, and the X Window system of Unix.

Scalable − Python provides a better structure and support for large programs
than shell scripting.

Apart from the above-mentioned features, Python has a big list of good features
, few are listed below:

It supports functional and structured programming methods as well as OOP.

It can be used as a scripting language or can be compiled to byte-code for


building large applications.

It provides very high-level dynamic data types and supports dynamic type
checking.

It supports automatic garbage collection.


PANDAS:

Pandas is a high-level data manipulation tool developed


by Wes McKinney. It is built on the Numpy package and its
key data structure is called the DataFrame. DataFrames
allow you to store and manipulate tabular data in rows of
observations and columns of variables.

MATPLOTLIB:

The matplotlib Python library, developed by John


Hunter and many other contributors, is used to
create high-quality graphs, charts, and figures. The
library is extensive and capable of changing very
minute details of a figure.

INTRODUCTION TO
INDIAN PREMIER
LEAGUE
The Indian Premier League (IPL) is a
professional Twenty20 cricket league
in India usually contested between March and May
of every year by eight teams representing eight
different cities or states in India. The league was
founded by the Board of Control for Cricket in
India (BCCI) in 2007. The IPL has an exclusive
window in ICC Future Tours Programmed.

The IPL is the most-attended cricket league in the


world and in 2014 was ranked sixth by average
attendance among all sports leagues. In 2010, the
IPL became the first sporting event in the world to
be broadcast live on YouTube. The brand value of
the IPL in 2019 was ₹475 billion (US$6.7 billion),
according to Duff & Phelps. According to BCCI, the
2015 IPL season contributed ₹11.5
billion (US$160 million) to the GDP of the Indian
economy.

There have been thirteen seasons of the IPL


tournament. The current IPL title holders are
the Mumbai Indians, who won the 2020 season.
The venue for the 2020 season was moved due to
the COVID-19 pandemic and games were played in
the United Arab Emirates.
IPL DATASET ANALYSIS

#Code To Import Csv File Into Pandas


Interface.
import pandas as pan

importmatplotlib.pyplot as plt

print("\n")

print("*********************************************************")

print("Importig the csv file")

print('_____________________')

csv=pan.read_csv("C:\\Users\\student\\Desktop\\New folder\\matches.csv")

print(csv)

print("=============================")

Output:
#Extracting Top 10 Rows Of The Given
Dataset.

print("\n")

print("Having a glance at top 10 rows of the given dataset")

print('__________________________________________')

top10=csv.head(10)

print(top10)

print("=============================")

Output:
#Extracting Last 10 Rows Of The Given
Dataset.

print("\n")

print("Having a glance at last 10 rows of the given dataset")

print('__________________________________________')

last10=csv.tail(10)

print(last10)

print("=============================")

Output:
#To Know The Number Of Rows And
Columns In The Given Dataset.

print("\n")

print("Getting the number of rows and columns")

print('______________________________________')

print(csv.shape)

print("=============================")

Output:
#Getting The Top 10 Man Of The Match
Title Winner.

print("\n")

print("These are the top 10 man of the match title winners")

print('___________________________________________________')

man_of_the_match=csv['player_of_match'].value_counts()[0:10]

print(man_of_the_match)

print("=============================")

Output:
#Creating A Bar Plot For Top 10 Players
With Man Of The Match Title.
print("\n")

plt.figure(figsize=(7,7))

x=['r','g','b','k','c','m','gold','silver','brown','r']

plt.bar(list(csv['player_of_match'].value_counts()[0:10].keys()),

list(csv['player_of_match'].value_counts()[0:10]),width=.5,color=x)

plt.xticks(rotation=90)

plt.xlabel("Names of the player")

plt.ylabel("No. of title wins")

plt.title("Man of the match title winners")

plt.show()

print("=============================")

Output:
#Creating An Analysis To Obtain The
Number Of Toss Winners.

print("\n")

print("These are the teams which have won the tosses several times")

print('___________________________________________________')

toss_winner=csv["toss_winner"].value_counts()

print(toss_winner)

print("=============================")

Output:
#Extracting The Result Of The Toss.

print("\n")

print("These are the toss decision analysis")

print('_____________________________')

result=csv["toss_decision"].value_counts()

print(result)

print("=============================")

Output:
#Code To Obtain The Number Of Wins
By Batting First.

print("\n")

print("These are the most number of wins by the teams while batting first")

print('_______________________________________________________')

batting_wins=csv[csv["win_by_runs"]!=0]

y=batting_wins["winner"].value_counts()

print(y)

print("=============================")
Output:

#Code To Extract The Number Of Wins By


Batting Second.

print("\n")

print("These are the most number of wins by the teams while batting second")

print('__________________________________________________________')

bowling_wins=csv[csv["win_by_wickets"]!=0]

z=bowling_wins["winner"].value_counts()

print(z)

print("=============================")
Output:

#Making Histogram For The Teams Who Have Won Batting First.

print("\n")

plt.figure(figsize=(7,7))

plt.hist(batting_wins["win_by_runs"])

plt.title("distribution of runs")

plt.xlabel("runs")

plt.show()

print("=============================")
Output:

#Extracting The Number Of Toss Winners


Who Have Also Won The Match.

print("\n")

print("This is the analysis of the toss winners who also emerged as match
winners")

print('_________________________________________________________')

a1=csv[csv['toss_winner']==csv['winner']]

print((a1.winner).value_counts())
print("=============================")

Output:

#Getting The Win Percentage As Per The


Toss Winning Status.

print("\n")

print("This is the win percentage as compared to toss winning status")

print('___________________________________________________')

print(393/755*100)

print("=============================")
Output:

#Getting The Count Of Top 10 Umpires Who Were In


Most Of The Matches.

print("\n")

print("These are the top 10 umpires who were there in most of the matches")

print('_________________________________________________________')

print(csv.umpire1.value_counts()[0:10])
print("=============================")

Output:

#Getting The Number Of Wins By The


Teams.

print("\n")

print("These are the number of wins by the teams")

print('____________________________________')

teams=csv["winner"]
no_of_wins=teams.value_counts()

print(no_of_wins)

print("=============================")

Output:

#Creating PIE Chart According To The


Wins By The Teams.

label=list(csv['winner'].value_counts().keys())

print("\n")

plt.figure(figsize=(7,7))

plt.pie(list(csv['winner'].value_counts()),labels=label,autopct="%3d%%")
plt.show()

print("=============================")

Output:

#Getting The Names Of Top 10 Stadium


Where Matches Have Been Played.

print("\n")

print("These are the name of top 10 stadiums where most of the matches have
been held")
print('__________________________________________________________')

venue=csv["venue"]

print(venue.value_counts()[0:10])

print("=============================")

Output:

#Creating PIE Chart For The Top 15


Umpires.

umpires=list(csv['umpire1'].value_counts()[0:15].keys())

print("\n")
plt.figure(figsize=(7,7))

plt.pie(list(csv['umpire1'].value_counts()[0:15]),labels=umpires,autopct="%3d
%%")

plt.show()

print("=============================")

Output:

#Analysis To Obtain Matches Held In


Different Cities Through Bar Chart.

print("\n")

plt.figure(figsize=(7,7))
plt.bar(list(csv['city'].value_counts().keys()),

list(csv['city'].value_counts()))

plt.xticks(rotation=90)

plt.show()

print("=============================")

Output:

BIBLIOGRAPHY

● Informatics practices class xi & xii


(By : SUMITA ARORA)

● Informatics practices class xi & xii


(By: PREETI ARORA)
● www.google.com

● www.google.com/Python project

● www.wikipedia.com/Pythonand Pandas projects

● www.data.world

● www.YouTube.com

● www.kaggle.com

● Class notes

You might also like