IP PROJECT Vedant
IP PROJECT Vedant
1 Certificate 3
2 Acknowledgement 4
4 Hardware/Software configuration 6
required
6 Python features 8
7 Pandas &Matplotlib 9
10 Bibliography 28
-:INDEX:-
CERTIFICATE
Informatics Practices(065)
ACKNOWLEDGEMENT
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
PANDAS:
MATPLOTLIB:
Easy-to-read − Python code is more clearly defined and visible to the eyes.
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.
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 provides very high-level dynamic data types and supports dynamic type
checking.
MATPLOTLIB:
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.
importmatplotlib.pyplot as plt
print("\n")
print("*********************************************************")
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('__________________________________________')
top10=csv.head(10)
print(top10)
print("=============================")
Output:
#Extracting Last 10 Rows Of The Given
Dataset.
print("\n")
print('__________________________________________')
last10=csv.tail(10)
print(last10)
print("=============================")
Output:
#To Know The Number Of Rows And
Columns In The Given Dataset.
print("\n")
print('______________________________________')
print(csv.shape)
print("=============================")
Output:
#Getting The Top 10 Man Of The Match
Title Winner.
print("\n")
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.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('_____________________________')
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:
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:
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:
print("\n")
print('___________________________________________________')
print(393/755*100)
print("=============================")
Output:
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:
print("\n")
print('____________________________________')
teams=csv["winner"]
no_of_wins=teams.value_counts()
print(no_of_wins)
print("=============================")
Output:
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:
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:
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:
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
● www.google.com/Python project
● www.data.world
● www.YouTube.com
● www.kaggle.com
● Class notes