Project Documents On Cricket Analysis
Project Documents On Cricket Analysis
A
PROJECT
REPORT
ON
{Cricket analysis}
DIRECTED BY
CENTRAL Board OF SECONDARY
EDUCATION (CBSE)
Roll no:_________
Certificate 1
This is to certify that _____________of class 12th ___
(Commerce/science) of MAR BASELIOS VIDHYA BHAWAN,
kailash NAGAR, BHILAI has completed his/her project entitled
cricket analysis under my supervision. He/She has taken a
proper care and sincerity in completion of his/her project.
I certify that this project is up to my expectation and as per the
guideline given by CBSE.
Principal signature
INDEX
S.NO DESCRIPTION
1. ACKNOWLEDGEMENT
2. PREFACE
3. INTRODUCTION TO python,tkinter,
pandas,matplotlib & csv
2
4. HARDWARE AND SOFTWARE REQUIREMENT
5. Source code
6. output
7. CONCLUSION
8. REMARKS
9. BIBLIOGRAPHY
ACKNOWLEDGEMENT
First of all the express of our deep, sense and gratitude and whole
thanks and honourable guide Mrs. Shaili Mitra for her valuable
guidance, keen interest and constant encouragement throughout in
making our project came to live. We are feeling great pleasure to
have undertaken this project entitled cricket analysis. Throughout
project development we get immense support from Mrs. Shaili
Mitra and all faculty members of MBVB. We express sincere
thanks to Mrs. Shaili Mitra for providing us with relevant facility,
valuable guidance and extra lab time for completion of our project
and proper time. We would like to thanks our school management
for giving a coordinate support throughout the project
development.
3
We greatly respect each other’s contribution,
dedication, sincere efforts in making this project come to alive.
Preface
I am introducing project on cricket analysis, it’s a small attempt from
my side to utilise information technology. The s/w used in my project
are python pandas, csv & matplotlib which makes the user interface
very easy and friendly.the softwares are open source and free version.
My project takes care of:-
1. to know which Team had won by maximum run .
2. to know which Team had won by maximum
wickets.
3. to know which Team had won by (closest
margin) minimum run.
4. to know which Team had won by minimum wicket.
5. to know which season had most number of
matches.
6. To know the Most Successful IPL Team.
7. To know the Players who got maximum times
Man of the Match.
Further this project can be improved by providing various
services options by users. I.
4
THEORETICAL
BACKGROUND
1.Python: Python is easy to learn and use and
more expressive interacted and
cross-platform language which
has a large and broad library
such as Pandas, matplotlib,
logging, time, sys and much more
that gives a programmer a huge
resource to take advantage of
this language.
Features:
➔Easy to learn and use
➔Free and open source
➔Large standard library
➔More expressive
2.Tkinter: Tkinter is a python binding to the Tk
GUI toolkit. It is the standard Python
interface to the Tk GUI toolkit which
supports Linux, Microsoft Windows,
and mac os.
Features:
5
➔Easy to learn and use.
➔Free and open source.
➔Provide various controls.
➔It is the most commonly used method.
3. 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.
Features:
➔Handling of data
➔Alignment and indexing
➔Handling missing data
➔Cleaning up data
4.Matplotlib: Matplotlib is a plotting library
for the Python programming
language and its numerical
mathematics extension numpy. It
provides an object-oriented API
for embedding plots into the
application using general purpose.
6
Features:
➔Easy Visualisation.
➔Free and open source.
➔Embedded GUI.
➔Widely used for data analysis.
5. CSV file(Comma-separated values): A comma-
separated values file is a
delimited text file that uses a
comma to separate values. Each
line of the file is a data record.
Each record consists of one or more
fields, separated by commas. The
use of the comma as a field
separator is the source of the
name for this file format.
Features:
➔One line for each record.
➔Comma-separated fields.
➔Space-characters adjacent to commas
is ignored.
7
➔Fields with in-built commas are
separated by double-quote
characters.
SYSTEM IMPLEMENTATION
The Hardware used: While developing the Software, Dell
Inspiron 15 3000 3567 15.6-inch FHD Laptop (7th Gen
Core i7-7500U/8GB/1TB/Windows 10 with Office 2016
Home and Student/2GB Graphics) The Software used:
➔Windows Operating System (WOS)
➔Python idle
➔Pages for Documentation
8
9
10
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt #visualization
plt.rcParams['figure.figsize'] = (14, 8)
df = pd.read_csv("E:\\t20.csv")
print('------------------------------------------------------------')
print('------------------------------------------------------------')
print(df.info())
print()
print('------------------------------------------------------------')
print('------------------------------------------------------------')
print('Total Matches are::::',df['id'].max())
print()
print('------------------------------------------------------------')
print('------------------------------------------------------------')
print('How many seasons data we’ve got in the dataset?')
print(df['season'].unique())
print()
print('------------------------------------------------------------')
print('------------------------------------------------------------')
print('Which Team had won by maximum runs?')
print(df.iloc[df['win_by_runs'].idxmax()])
print()
print('------------------------------------------------------------')
print('------------------------------------------------------------')
print('Which Team had won by maximum wickets?')
print(df.iloc[df['win_by_wickets'].idxmax()]['winner'])
print()
print('------------------------------------------------------------')
print('------------------------------------------------------------')
print('Which Team had won by (closest margin) minimum runs?')
print(df.iloc[df[df['win_by_runs'].ge(1)].win_by_runs.idxmin()]
['winner'])
print()
print('------------------------------------------------------------')
print('------------------------------------------------------------')
print('Which Team had won by minimum wickets?')
print(df.iloc[df[df['win_by_wickets'].ge(1)].win_by_wickets.idxmin()])
print()
11
print('------------------------------------------------------------')
print('------------------------------------------------------------')
print('Which season had most number of matches?')
plt.bar(x='season',data=df,height=df['season'])
plt.show()
print()
print('------------------------------------------------------------')
print('------------------------------------------------------------')
print('The Most Successful IPL Team is:::')
data = df.winner.value_counts()
print(data)
print()
print('------------------------------------------------------------')
print('------------------------------------------------------------')
print('The Players who got maximum times Man of the Match are:::')
top_players = df.player_of_match.value_counts()[:10]
print(top_players)
print("Data Frame Analysis")
menu=''' 1. Top record of the Players
\n 2. Bottom Records of the Players
\n 3. To print particular column
\n 4. To print multiple columns
\n 5. To display complete statistics of the Matches
\n Press enter to go back '''
print(menu)
ch=int(input("Enter your choice"))
if ch==1:
n=int(input("Enter the number of records to be displayed"))
print("Top ", n," records from the dataframe")
print(df.head(n))
elif ch==2:
n=int(input("Enter the number of records to be displayed"))
print("Bottom ", n," records from the dataframe")
print(df.tail(n))
elif ch==3:
print("Name of the columns\n",df.columns)
co=input("Enter the column name to be displayed")
print(df[[co]])
elif ch==4:
12
print("Name of the columns\n",df.columns)
co=eval(input("Enter the column names as list in square bracket"))
print(df[co])
elif ch==5:
print("The statistics of the dataframe is:",
df.describe(include='all'))
13
output
14
15
16
Conclusion
The conclusion that we drawn from this project report is that from
aspect the project on the cricket analysis is technically feasible, usable
and it is also valuable.
17
Remarks
18
BIBILIOGRAPHY
Python pandas:-
1. Informatics PRACTICE BY sumita arora (dhanpat rai publication).
2. Informatics practices by preeti arora (sultan chand publication).
19