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

Python Final El

This document discusses analyzing IPL cricket tournament data using Python. Key points: - Python is well-suited for data analytics due to libraries like NumPy, pandas, and scikit-learn that facilitate data manipulation, visualization, and machine learning. - The analysis examines aspects of IPL tournaments from 2008-2020 like average runs scored per match, total runs by season, toss decision trends, and top player and team performances. - Visualizations show variations in runs scored by season, toss preferences, and the top batsmen in singles, doubles, fours and sixes categories.

Uploaded by

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

Python Final El

This document discusses analyzing IPL cricket tournament data using Python. Key points: - Python is well-suited for data analytics due to libraries like NumPy, pandas, and scikit-learn that facilitate data manipulation, visualization, and machine learning. - The analysis examines aspects of IPL tournaments from 2008-2020 like average runs scored per match, total runs by season, toss decision trends, and top player and team performances. - Visualizations show variations in runs scored by season, toss preferences, and the top batsmen in singles, doubles, fours and sixes categories.

Uploaded by

Arvika Bhatia
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11

PYTHON

EL PHASE -2
TOPIC:IPL data Analysis using python

Name USN:
Introduction:-
Data analytics is the process of examining, cleaning, transforming, and interpreting data to uncover
meaningful patterns, trends, and insights. It involves using various statistical, mathematical, and
computational techniques to make data-driven decisions and solve complex problems. Data
analytics plays a pivotal role across various domains, including business, finance, healthcare,
marketing, and more

Python is the preferred choice for data analytics due to its extensive ecosystem of specialized libraries
like NumPy, pandas, Matplotlib, Seaborn, and scikit-learn, which streamline data manipulation,
visualization, and machine learning tasks. Its intuitive and readable syntax reduces the learning curve,
making it accessible to both beginners and experienced analysts. Python enjoys robust community
support with abundant documentation and open-source resources, ensuring that analysts have the tools
and knowledge they need. Its cross-platform compatibility and seamless integration capabilities make it
adaptable to various data sources and workflows. Overall, Python's power, simplicity, and community
backing make it the go-to language for extracting insights and making data-driven decisions in the ever-
evolving field of data analytics.
Components used:-
• Loading libraries:

• Dataset has been taken from Kaggle


Objective:
The objective of making Indian Premier League (IPL) analysis is to gain insights,
understanding, and valuable information about various aspects of the IPL cricket
tournament. IPL analysis involves examining different elements of the tournament,
including player performance, team strategies, match outcomes, statistical trends, and
more
Runs scored per match across the seasons

In the Indian Premier League (IPL) from 2008 to 2020, the


average runs scored per match varied from season to season.
On average, matches in the IPL typically saw totals between 150
to 170 runs per team, resulting in a total of around 300 to 340
runs per match.
Total number of runs scored in the seasons

During these IPL seasons, the total runs scored by all teams
combined typically ranged from approximately 18,000 to 23,000
runs in total for the entire season. These numbers can vary from
season to season due to factors like the number of matches
played, batting performances, and scoring trends.
Toss decision percentage

The toss decision (whether to bat or eld rst) can vary from match
to match and is in uenced by various factors including pitch
conditions, team strategy, and the prevailing weather. 60.8% of
toss winners chose elding over 39.2% choosing elding.
fl
fi
fi
fi
fi
Wins for different venues for RCB

RCB has played their home matches at the M. Chinnaswamy Stadium in


Bangalore, which has been their primary home ground. They have also
played some matches at neutral venues during certain IPL seasons. Their
most wins have been at Chinnaswamy followed by Feroz Shah and Dubai
International stadium.
Total runs scored by each team by choosing batting during the toss

These are the 15 IPL teams and their range of


total runs made per match after choosing to bat
after winning the toss.
Top players of match winners

These players have had a signi cant impact on their respective teams'
success and have often played crucial roles in match-winning performances.
Starting with CH Gayle at the top, followed by VK Pathan and DA Warner
these are the top players of the winner team in matches overall.
fi
Batsman scoring max number of 1’s,2’s,4’s and 6’s

toppers=deliveriesdf.groupby(['batsman','batsman_runs'])['total_runs'].count().reset_index()
toppers=toppers.pivot('batsman','batsman_runs','total_runs')
fig,ax=plt.subplots(2,2,figsize=(18,12)) toppers[1].sort_values(ascending=False)
[:5].plot(kind='barh',ax=ax[0,0],color='#45ff45',width=0.8) ax[0,0].set_title("Most 1's")
ax[0,0].set_ylabel('') toppers[2].sort_values(ascending=False)
[:5].plot(kind='barh',ax=ax[0,1],color='#df6dfd',width=0.8) ax[0,1].set_title("Most 2's")
ax[0,1].set_ylabel('') toppers[4].sort_values(ascending=False)
[:5].plot(kind='barh',ax=ax[1,0],color='#fbca5f',width=0.8) ax[1,0].set_title("Most 4's")
ax[1,0].set_ylabel('') toppers[6].sort_values(ascending=False)
[:5].plot(kind='barh',ax=ax[1,1],color='#ffff00',width=0.8) ax[1,1].set_title("Most 6's")
ax[1,1].set_ylabel('') plt.show()

Categorising runs as 1s, 2s, 4s and 6s, we compare players scoring most in
each category. For example, Sharma, Raina, Dhoni and Villers stand in the
most 6s category still far behind Gayle’s total 6s. This graph helps us
analyse and compare players according to the run categories.

You might also like