0% found this document useful (0 votes)
667 views27 pages

IPL Statistics Analysis Project

The document outlines a project titled 'IPL All Time Statistics' developed by Bhavyay Gupta using Python 3.7.0, Pandas, and Matplotlib. It includes various sections such as acknowledgments, introduction to the Indian Premier League (IPL), coding, output screens, and bibliography. The project focuses on data manipulation and visualization of IPL statistics through a CSV file and interactive menus for data analysis.

Uploaded by

prernabudhiraja9
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)
667 views27 pages

IPL Statistics Analysis Project

The document outlines a project titled 'IPL All Time Statistics' developed by Bhavyay Gupta using Python 3.7.0, Pandas, and Matplotlib. It includes various sections such as acknowledgments, introduction to the Indian Premier League (IPL), coding, output screens, and bibliography. The project focuses on data manipulation and visualization of IPL statistics through a CSV file and interactive menus for data analysis.

Uploaded by

prernabudhiraja9
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

INFORMATICS PRACTICES

PROJECT CLASS XII

Concept used: Pandas and Matplotlib


Submitted to: Mr. Nitin Gupta

Project Title: IPL ALL TIME STATISTICS


Compiler Version: Python 3.7.0
Developed By: BHAVYAY GUPTA
Class: XIID
INDEX
SNO DESCRIPTION PAGE NO.
1. Certificate 1
2. Acknowledgement 2
3. Introduction 3
4. Csv file data format 4
5. Coding 4-10
6. Output screen 11-23
7. bibliography 24
ACKNOWLEDGEMENT

I would like to express my special thanks of gratitude to my


teacher [Link] Gupta who gave me the golden opportunity to
do this project. This also helped me to know so many new things
while doing the project. I am really thankful to you and my
classmates who gave me valuable suggestions on this project
made by me which gave me inspiration to improve my work. I
thank all the people who have helped me in completing this
project.
INTRODUCTION
IPL
The Indian Premier League (IPL) Is A Professional T20
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 Is The Most-Attended Cricket
League In The World And In 2014 Was Ranked Sixth By Average
Attendance Among All Sports Leagues.

Technology Used:
Python 3.7.0
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 pd
MATPLOTLIB: Matplotlib is a plotting library for the Python
programming language and its numerical mathematics extension
NumPy.
To import this library: import [Link] as plt
IPL- ALL TIME STATISTICS ANALYSIS
PROJECT
CSV DATA:
FILE NAME: [Link]
FILE LOCATION: C:\\Users\\Admin\\Desktop

SOURCE CODE
import pandas as pd
import [Link] as plt
ipl=pd.read_csv('C:\\Users\\Admin\\Desktop\\
[Link]',encoding='latin1',index_col=0)
ch='y'
while ch=='y' or ch=='Y':
print("Main Menu")
print("1. Fetch Data")
print("2. Dataframe Statistics")
print("3. Display Records")
print("4. Search specific row/column")
print("5. Data Visualization")
print("6. Data analytics")
print("7. Exit")
ch1=int(input("Enter your choice"))
if ch1==1:
print("DISPLAYING ALL TIME IPL STATISTICS DATA")
print("=============================")
print(ipl)
elif ch1==2:
while (True):
print("Dataframe Statistics Menu")
print("1. Display all column names")
print("2. Display the indexes")
print("3. Display the shape")
print("4. Display the dimension")
print("5. Display the data types of all columns")
print("6. Display the size")
print("7. Exit")
ch2=int(input("Enter choice"))
if ch2==1:
print([Link])
elif ch2==2:
print([Link])
elif ch2==3:
print([Link])
elif ch2==4:
print([Link])
elif ch2==5:
print([Link])
elif ch2==6:
print([Link])
elif ch2==7:
break
elif ch1==3:
while (True):
print("Display Records Menu")
print("1. Top 5 Resords")
print("2. Bottom 5 Records")
print("3. Specific number of records from the top")
print("4. Specific number of records from the bottom")
print("5. Details of a specific Player")
print("6. Display details of all Players")
print("7. Exit")
ch3=int(input("Enter choice"))
if ch3==1:
print([Link]())
elif ch3==2:
print([Link]())
elif ch3==3:
n=int(input("Enter how many records you want to display
from the top"))
print([Link](n))
elif ch3==4:
n=int(input("Enter how many records you want to display
from the bottom"))
print([Link](n))
elif ch3==5:
plyr=input("Enter the player name for which you want to see
the details")
print([Link][plyr])
elif ch3==6:
print("Overall Statistics of players of the IPL")
print(ipl)
elif ch3==7:
break
elif ch1==4:
while (True):
print("Search Menu")
print("1. Search for the details of a specific player")
print("2. Search details of a specific as per a specific column
heading")
print("3. Exit")
ch4=int(input("Enter choice"))
if ch4==1:
plyr=input("Enter the name of the player whose details you
want to see")
print([Link][plyr])
elif ch4==2:
col=input("Enter column/heading name whose details you
want to see")
print(ipl[col])
elif ch4==3:
break
elif ch1==5:
while (True):
print("Data Visualization Menu")
print("1. Line Plot--> No. of matches played by each player")
print("2. Histogram-->No. of runs scored by players")
print("3. Horizontal Bar Plot-->strike rate of each player")
print("4. Vertical bar plot-->No. of 4s and 6s of each player")
print("5. Exit")
ch5=int(input("Enter choice"))
if ch5==1:
[Link]([Link],ipl['matches'])
[Link]("No. of matches played by each player")
[Link]("PLAYERS")
[Link]("NO. OF MATCHES")
[Link](rotation=90)
[Link]()
elif ch5==2:
[Link](ipl['runs'],bins=5,edgecolor="black",color='red')
[Link]("No. of runs scored by players")
[Link]("RUNS")
[Link]("FREQUENCY")
[Link]()
elif ch5==3:
[Link]([Link],ipl['strike
rate'],color=['b','c','g','k','m','r','b','y'])
[Link]("STRIKE RATE OF EACH PLAYER")
[Link]("PLAYERS")
[Link]("STRIKE RATES")
[Link]()
elif ch5==4:
[Link]([Link],ipl['4s'],label="No. of 4s")
[Link]([Link],ipl['6s'],label="No. of 6s")
[Link]("No. of 4s and 6s of each player")
[Link]([Link])
[Link]("PLAYERS")
[Link]("NO. OF 4s AND 6s")
[Link]()
[Link](rotation=90)
[Link]()
elif ch5==5:
break
elif ch1==6:
while(True):
print("Data Analytics Menu")
print("1. Player with maximum number of matches played")
print("2. Player with minimum number of matches played")
print("3. Player with maximum number of inns")
print("4. Player with minimum number of inns")
print("5. Player with maximum number of centuries")
print("6. Player with maximum number of half-centuries")
print("7. Exit")
ch6=int(input("Enter choice:"))
if ch6==1:
m=ipl['matches'].max()
s=[Link][[Link]==m]
print("Player with maximum number of matches played-",m,"
is\n ",[Link])
elif ch6==2:
m=ipl['matches'].min()
s=[Link][[Link]==m]
print("Player with minimum number of matches played- ",m,"
is\n ",[Link])
elif ch6==3:
m=ipl['inns'].max()
s=[Link][[Link]==m]
print("Player with maximum number of inns-",m," is\n
",[Link])
elif ch6==4:
m=ipl['inns'].min()
s=[Link][[Link]==m]
print("Player with minimum number of inns-",m," is\n
",[Link])
elif ch6==5:
m=ipl['n100'].max()
s=[Link][ipl.n100==m]
print("Player with maximum number of centuries-",m," is\n
",[Link])
elif ch6==6:
m=ipl['n50'].max()
s=[Link][ipl.n50==m]
print("Player with maximum number of half-centuries-",m,"
is\n ",[Link])
elif ch6==7:
break
elif ch1==7:
break
ch=input("Do you want to continue?(y/n)")
OUTPUT SCREEN
BIBLIOGRAPHY

1. Informatics Practices By- Sumit Arora


2. Informatics Practices With Python By-Preeti Arora
3. Class Notes

You might also like