100% found this document useful (12 votes)
21K views28 pages

T20 Batting Analysis Project Class 12

This document is a project report for a T20 Batting Analysis System created by Bhumita Sejwal. The report includes chapters on introduction, functionalities/source code, proposed methodology and implementation, experimental results/output, conclusion and future scope, and references. The source code section outlines the Python code used to analyze a T20 cricket batting dataset stored in a CSV file, including functions for viewing dataframe stats, record analysis, inserting/deleting records, and data visualization. Charts and tables can be generated from the CSV data to visualize batting performances.

Uploaded by

Bhumita Sejwal
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
100% found this document useful (12 votes)
21K views28 pages

T20 Batting Analysis Project Class 12

This document is a project report for a T20 Batting Analysis System created by Bhumita Sejwal. The report includes chapters on introduction, functionalities/source code, proposed methodology and implementation, experimental results/output, conclusion and future scope, and references. The source code section outlines the Python code used to analyze a T20 cricket batting dataset stored in a CSV file, including functions for viewing dataframe stats, record analysis, inserting/deleting records, and data visualization. Charts and tables can be generated from the CSV data to visualize batting performances.

Uploaded by

Bhumita Sejwal
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
  • Introduction
  • Functionality/Source Code
  • Proposed Methodology and Implementation
  • Experimental Results/Output
  • Conclusion and Future Scope
  • References

PROJECT IN

INFORMATICS PRACTICES (065)


Academic Year 2022-2023

T20 Batting Analysis System

NAME: Bhumita Sejwal

CLASS:12-Sci

ROLL NUMBER:

1
CONTENTS

DESCRIPTION PAGE NO.

Chapter 1: INTRODUCTION 5
Chapter 2: FUNCTIONALTIES/SOURCE CODE 7

Chapter 3: PROPOSED METHODOLOGY AND IMPLEMENTATION 6

Chapter 4: EXPERIMENTAL RESULTS /OUTPUT 13

Chapter 5: CONCLUSION AND FUTURE SCOPE 27

LITERATURE REFERENCES/BIBLIOGRAPHY 28

2
CERTIFICATE

This is to certify that this project report entitled T20 Batting Analysis
is a bonafide record of the project work done by Bhumita Sejwal of
class XII-Science, roll number ………...…. In the academic year
2022-2023. The project has been submitted in partial fulfillment of
AISSCE for practical held at St. Anthony’s Senior Secondary School,
Hauz Khas, New Delhi.

Date - Teacher-in-Charge

Internal Examiner External Examiner

3
ACKNOWLEDGEMENTS

First and foremost, I thank Lord Almighty for the grace, strength and
hope to make my endeavor a success.

I would like to express my gratitude towards the Principal of my In-


stitution, Rev Sr Daisy, for making available all possible resources
to help in my endeavors. It gives me immense pleasure to express my
sincere gratitude towards my supervisor Ms. Shalini Mehra, PGT
Informatics Practices, St Anthony’s Senior Secondary School,
Hauz Khas, for her invaluable guidance. I consider myself extremely
fortunate to have had a chance to work under her supervision.

I also express my gratitude to all the respected faculty members of St


Anthony’s Senior Secondary School, Hauz Khas, who have helped
me directly or indirectly.

I would also like to express my indebtedness to blessings of my


parents and family.

4
INTRODUCTION

The data stored in csv or database file is used and analyzed using
Python libraries and appropriate charts are generated to visualize our
data. This project has been made for storing the T20 Batting records
of the different matches. The code include City, Team, Against,
Name, Runs, BallsFaced, Fours, Sixes, StrikeRate,[Link] contains of
addition, modification, deletion and searching of records, generating
of records as per there requirement. At last the changes will be shown
automatically by justclicking enter key.

5
HARDWARE AND SOFTWARE RE-
QUIREMENTS
Hardware
Processor : 10th Generation Intel(R) Core(TM) i3-1035G1
Solid State Drive : 512GB
Screen Resolution : 1920 × 1080 RAM : 8 GB
Others : Standard computer peripherals like keyboard, mouse, etc.
Software
Operating System : : Windows 10 Programming
Tool : Python 3.11
CSV File Tool : Microsoft Excel

6
SOURCE CODE
import pandas as pd
import [Link] as plt
while True:
print("MAIN MENU")
print("[Link] Stats")
print("[Link] Analysis")
print("[Link] Delete Record")
print("[Link] Visualization as per records")
print("[Link] Data Visualization")
print("[Link]")
ch=int(input("Enter Your Choice:"))
if(ch==1):
df=pd.read_csv("[Link]")
print("Dataframe Properties:")
print("[Link] the transpose")
print("[Link] column names")
print("[Link] indexes")
print("[Link] the shape")
print("[Link] the dimension")
print("[Link] the data types of all columns")
print("[Link] the size")
print("[Link]")
ch1=int(input("Enter Your Choice:"))
if ch1==1:
print(df.T)
input("Press Enter to continue...")
elif ch1==2:
print([Link])
input("Press Enter to continue...")
elif ch1==3:
print([Link])
input("Press Enter to continue...")
elif ch1==4:
print([Link])
input("Press Enter to continue...")
elif ch1==5:
print([Link])
input("Press Enter to continue...")
elif ch1==6:
print([Link])
input("Press Enter to continue...")
elif ch1==7:
print([Link])
input("Press Enter to continue...")
elif ch1==8:
pass
elif ch==2:
df=pd.read_csv("[Link]")
print("RECORD ANALYSIS MENU")
print("[Link] Score (Inning - Top 10)")
print("[Link] Score (Inning - Botton 10)")
print("[Link] Number of Records From Top")
print("[Link] Number of Records From Bottom")
print("[Link] record for [Link].")

7
print("[Link] record for a Team")
print("[Link] record for a Batsman")
print("[Link] Runs (Top Ten)")
print("[Link] Runs (Bottom Ten)")
print("[Link]")
ch2=int(input("Enter Your Choice:"))
if ch2==1:
df1=[Link][:,['city','name','runs','ballsFaced']]
df1=df1.sort_values(by='runs',ascending=False)
print([Link](10))
input("Press Enter to continue...")
elif ch2==2:
df1=[Link][:,['city','name','runs','ballsFaced']]
df1=df1.sort_values(by='runs',ascending=False)
print([Link](10))
input("Press Enter to continue...")
elif ch2==3:
no=int(input("How Many Number of Records You Want To Be
Printed From The Top:"))
df1=[Link][:,['city','name','runs','ballsFaced']]
print([Link](no))
input("Press enter to continue...")
elif ch2==4:
n=int(input("How Many Number of Records You Want To Be
Printed From Bottom:"))
df1=[Link][:,['city','name','runs','ballsFaced']]
print([Link](n))
input("Press enter to continue...")
elif ch2==5:
sno=int(input("Enter The [Link]. For Which You Want The
data To Be Displayed:"))
print([Link][sno])
input('Press enter to continue...')
elif ch2==6:
team=input("Enter The [Link]. For Which You Want The
data To Be Displayed:")
df1=[Link][df['team']==team]
print([Link][:,['city','name','runs','ballsFaced']])
input('Press enter to continue...')
elif ch2==7:
print("Ensure the name should match with CSV records:")
b=input("Enter The [Link]. For Which You Want The data To
Be Displayed:")
df1=[Link][df['name']==b]
print([Link][:,['city','name','runs','ballsFaced']])
print('------------------------------------------------')
[Link]['Total','runs']=df1['runs'].sum()
print(df1)
input('Press enter to continue...')
elif ch2==8:
df1=df[['name','runs']].groupby('name').sum()
df1=df1.sort_values(by='runs',ascending=False)
print([Link](10))
input("Press enter to continue...")
elif ch2==9:
df1=df[['name','runs']].groupby('name').sum()
df1=df1.sort_values('runs')
print([Link](10))

8
input("Press enter to continue...")
elif ch2==0:
pass
else:
print("Invalid Choice")
elif(ch==3):
df=pd.read_csv("[Link]")
print("Insert Delete record")
print("[Link] a record")
print("[Link] a records")
print("[Link] The Records Menu")
ch3=int(input("Enter Your Choice:"))
if ch3==1:
col=[Link]
print(col)
j=0
rec={}
for i in col:
print("Enter",col[j],"value:")
nval=input()
rec[col[j]]=nval
j=j+1
df=[Link](rec,ignore_index=True)
print("Data is Successfully Updated")
df.to_csv('[Link]',index=False)
input("Press enter to continue...")
elif ch3==2:
a=int(input("Enter [Link]. whose data You Want to be
deleted:"))
[Link]([a-1],inplace=True)
df.to_csv('[Link]',index=False)
print("Record deleted...")
input("Press enter to continue...")
elif ch3==3:
pass
elif(ch==4):
df=pd.read_csv("[Link]")
print("Data Visualization Menu - According to no. of rows")
print("[Link] Plot")
print("[Link] Bar Plot")
print("[Link] Bar Plot")
print("[Link]")
print("[Link] The Data Visualization Menu")
ch4=int(input("Enter Choice:"))
df1=[Link]()
if ch4==1:
n=int(input("How many records from the top of table you
want to plot:"))
df1=[Link](n)
[Link](linestyle="-.",linewidth=2,label="WORLD CUP RECORD
OF MS DHONI")
[Link]()
elif ch4==2:
n=int(input("How many records from the top of table you
want to plot:"))
df1=[Link](n)
[Link](kind="bar",color="pink",width=.8)
[Link]()

9
elif ch4==3:
n=int(input("How many records from the top of table you
want to plot:"))
df1=[Link](n)
[Link](kind="barh",color="cyan",width=.8)
[Link]()
elif ch4==4:
[Link](color="yellow",edgecolor="pink")
[Link]()
elif ch4==5:
pass
elif(ch==5):
df=pd.read_csv("[Link]")
print("Customized Data Visualization Menu")
print("[Link] Player")
print("[Link] Team")
print("[Link]")
ch5=int(input("Enter Choice:"))
df1=[Link]()
if ch5==1:
print("Ensure the name should match with CSV records:")
player=input("Enter player name you want to plot:")
print('''
1. Line Chart
2. Bar Chart
3. Horizontal Bar Chart
4. Histogram
5. Back
''')
ch5_1=int(input("Enter your choice:"))
if ch5_1==1:
df1=[Link][df['name']==player]
df1=[Link][:,['against','runs']]

[Link](x='against',y='runs',kind='line',linestyle="-.",linewidth=2,co
lor='r')
[Link]()
elif ch5_1==2:
df1=[Link][df['name']==player]
df1=[Link][:,['against','runs']]
[Link](x='against',y='runs',kind='bar',color='r')
[Link]()
[Link](x='against',y='runs',kind='hist',bins=25,cumula-
tive=True)
[Link]()
elif cf5_1==5:
pass
elif ch5==2:
print("Ensure the name should match with CSV records:")
team=input("Enter team name you want to plot:")
print('''
1. Line Chart
2. Bar Chart
3. Horizontal Bar Chart
4. Histogram
5. Back
''')
ch5_2=int(input("Enter your choice:"))

10
if ch5_2==1:
df1=[Link][df['team']==team]
df1=[Link][:,['name','runs']]

[Link](x='name',y='runs',kind='line',linestyle="-.",linewidth=2,color
='r')
[Link]()
elif ch5_2==2:
df1=[Link][df['team']==team]
df1=[Link][:,['name','runs']]
[Link](x='name',y='runs',kind='bar',color='r')
[Link]()
[Link](x='name',y='runs',kind='hist',bins=25,cumula-
tive=True)
[Link]()
elif ch5_2==5:
pass
elif ch==6:
print(“Invalid Choice”)
break
else:
print("*---------------------*INVALID
CHOICE*---------------------*")

11
PROPOSED METHODOLOGY AND IM-
PLEMENTATION
The T20 Batting Analysis System is designed to maintain records and details of
the teams and batsman. It allows the user to manupilate or view the details to
suit his or her needs. The T20 Batting Analysis System contains the details of
teams and batsman such as:-
[Link]
[Link]
[Link]
[Link]
[Link]
[Link] Faced
[Link]
[Link]
[Link] Rate
Based on these data values the application provides with the following function
required by him or her:
[Link] transpose ofdataframe.
2. .Adding new records
[Link] records.
4. Graphical representation.

Upon choosing an option, depending on the chosen function,the user would be


given a choice to perform further functions on the whole record. If the user
chooses to apply on an individual or group of batsman,they have an option of
selection based on their [Link],the data provided is small there are no
identical or repetition of names it is easy for the user to get details through
names. Finally,after the user has entered all the details which are needed to ob-
tain the necessary outcome,some outcomes are shown through graphs.

12
OUTPUT
[Link] transpose the datframe:

[Link] display column names:

13
14
[Link] display column names:

[Link] display the shape:

15
[Link] display the dimensions:

[Link] display data type of all columns:

16
7. To display size:

[Link] display top 10 score:

17
[Link] display bottom 10 score:

[Link] display specific no. of records from top:

18
[Link] display specific no. of records from top:

12. To display records for specific Sr. No.

19
13. To display records for a team:

14. To display records for a batsman:

20
15. To display most runs:

16. To insert a record:

21
17. To delete a record:

18. To plot a bar graph:

22
19. To plot lines graph:

23
20. To plot horizontal bars graph:

24
21. To plot line graph for specific teams:

25
22. To plot line graph for specific batsman:

23. To plot bars graph for specific teams:

26
LIMITATIONS
[Link] data:- The application only deals with data restricted to the
details of the batsman and teams. Our study has limitations due to the
sampling methods we employed; we were only able to collect data to
a limited amount. Future research should continue examining the
levels of different matches and types of players .

2. Execution across platforms: Unfortunately,the data is limited


because most of the data is confidential.

[Link] requires rerunning:-Due to time constraints the 1 source


code hasn't been developed to provide the user with option for
returning to the main [Link] If the user wants to further
perform the functions,they would need to execute the program again.

[Link] while searching using batsman name:-If the user wishes to


search details using batsman name there is a possibility of repetition
of names.

Future Scope
1. Easy to modify the source code and data given.
2. Easy to update.
3. Easy to expand the data in future.

CONCLUSION
After careful analysis and capabilities of constraints of application,it
can be concluded that it is a highly efficient Python [Link]
the programme has some limitations it is not a dire failure and can be
easily worked [Link] one may conclude that the project “T20
BATTING ANALYSIS SYSTEM” is a success.

27
REFERENCES

1. [Link]
tuaoREP6yDuZJO8eGjrp/view2
2. [Link]
3. Arora,S 2021,Informatics Practices(XI),Dhanpatrai & co.
(P)Ltd.,Delhi.\
4. Arora,S 2022,Informatics Practices(XII),Dhanpatrai & co.
(P)Ltd.,Delhi. 5. NCERT,Information Practices,Class XII

28

PROJECT IN
INFORMATICS PRACTICES (065)
Academic Year 2022-2023
T20 Batting Analysis System
NAME: Bhumita Sejwal
CLASS:12-Sci
CONTENTS
DESCRIPTION                                                                                                       PA
CERTIFICATE
This is to certify that this project report entitled T20 Batting Analysis 
is a bonafide record of the project wo
ACKNOWLEDGEMENTS
First and foremost, I thank Lord Almighty for the grace, strength and
hope to make my endeavor a success.
I
INTRODUCTION
The data stored in csv or database file is used and analyzed using 
Python libraries and appropriate charts are
HARDWARE AND SOFTWARE RE-
QUIREMENTS 
Hardware
 Processor :  10th Generation Intel(R) Core(TM) i3-1035G1
 Solid State Drive :
SOURCE CODE
import pandas as pd
import matplotlib.pyplot as plt
while True:
    print("MAIN MENU")
    print("1.Dataframe S
print("6.Details record for a Team")
            print("7.Details record for a Batsman")
            print("8.Mos
input("Press enter to continue...")
            elif ch2==0:
                pass
            else:
elif ch4==3:
            n=int(input("How many records from the top of table you 
want to plot:"))
            df1=df

You might also like