Open navigation menu
Close suggestions
Search
Search
en
Change Language
Upload
Sign in
Sign in
Download free for days
0 ratings
0% found this document useful (0 votes)
22 views
14 pages
Pub G Analysis
Uploaded by
deepak Rulez
AI-enhanced title
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here
.
Available Formats
Download as PDF or read online on Scribd
Download
Save
Save pub g analysis For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
0 ratings
0% found this document useful (0 votes)
22 views
14 pages
Pub G Analysis
Uploaded by
deepak Rulez
AI-enhanced title
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here
.
Available Formats
Download as PDF or read online on Scribd
Carousel Previous
Carousel Next
Download
Save
Save pub g analysis For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
Download now
Download
You are on page 1
/ 14
Search
Fullscreen
9718/23, 10:20 AM Unile422-Copy7 - Jupyter Notebook Analyzing PUBG Data with Python PlayerUnknown’s Battlegrounds (PUBG) has taken the gaming world by storm, offering an immersive battle royale experience. Beyond its gaming aspect, PUBG also provides a wealth of data that can be mined and analyzed to gain insights into player behavior, strategies, and performance, In this Jupyter Notebook project, we will delve into the exciting world of PUBG data analysis using Python. We will be working with a dataset containing a treasure trove of information, including player statistics, match details, and in-game events. Our goal is to harness the power of Python libraries such as Pandas, NumPy, and Matplotib to extract meaningful insights from this dataset, Import Library In [2]: import pandas as pd In [29]: import pandas as pd import seaborn as sns import matplotlib.pyplot as plt import seaborn as sns import plotly.express as px Uploading Csv fle In [30]: df = pd.read_csv(r" Users\Syed Arif\Desktop\Pubg_stats.csv") Data Preprocessing -head() head is used show to the By default = 5 rows in the dataset localhost B888/notebooks/Untilee2-Copy7. py ana9718/23, 10:20 AM In [31]: df.head() Unile422-Copy7 - Jupyter Notebook Out [32]: Unnamed: * player Name Matches Played Kills Deaths Assists Damage_Dealt Headshots | ° 0 SteathMaster 250 587143 15248 24 1 4 Shipertion 312 232811 18975 a2 2 2 NinjaGamer 16 49288 ‘1786 156 3 3. Thunderstike 400 923267194 21097 288 4 4 SpoedDemon 149 968682 ees 123 tail() tall is used to show rows by Descending order In [32]: df.tail() out [32]: Unnamed: #: playor Name Matches Played Kills Deaths Assists Damage Dealt Headshi 216 «2168 Grmsonfider zee 7481871 17587 z 217217 BlazingSorcerer 200 set 10972 13129 1 218218 Frozen 208 58378 19758 1 219219 AbyssGuardan 20 sor 448 14987 z 220 220. SpectalPhantom 205 624 149100 15045 i -Shape It show the total no of rows & Column in the dataset In [33]: df-shape out{33]: (221, 15) .Columns It show the no of each Column localhost B888/notebooks/Untilee2-Copy7. py ana9718/23, 10:20 AM In [34]: df.columns out[34]: Index([ "Unnamed: @ ‘assists’, Unile422-Copy7 - Jupyter Notebook “Player_Name", ‘Matches Played’, ‘Kills’, ‘Deaths’, Damage_Dealt', ‘Headshots’, ‘Wins', ‘Top_1és', ‘Revives", "Distance Traveled’, ‘Weapons_Used", ‘Time Survived’, ‘Rank'], dtypes' object") .dtypes This Attribute show the data type of each column In [35]: df.dtypes out[35]: Unnamed: @ Player_Name Matches_Played kills Deaths Assists Damage_Dealt Headshots Wins Top_10s Revives Distance_Traveled Weapons_Used Time_Survived Rank dtype: object -unique() intea object intea intea intea intea intea intea intea intea intea intea intea intea object In a column, It show the unique value of specific column, localhost B888/notebooks/Untilee2-Copy7. py ana9718/23, 10:20 AM Unile422-Copy7 - Jupyter Notebook In [36]: df["Player_Name"].unique() out[36]: array(['StealthMaster’, "SniperLion’, ‘NinjaGaner’, ‘ThunderStrike', “SpeedDenon’, ‘BlazeFury’, ‘RapidShadow’, ‘Frostbite’, “SavageQueen’, ‘SwiftStriker', "VenomousViper", ‘PhoenixFury' ‘SteelStorm’, ‘BlazingSlade', “StormChaser', ‘Nightmare’, “CrimsonTide*, 'SilentShadow’, ‘VengefulViper", ‘SolarFlare', “SkyDancer', ‘RogueWiraith’, ‘LethalLynx’, ‘FrostFang', ‘ScarletStrider’, ‘RagingRaptor’, "ShadowWisp’, "VenonStrike' , “FireFury', ‘BlazingSun', ‘ShadowStrike’, ‘SteelGuardian’, “WickedWitch’, ‘RuthlessRaptor’, ‘FrostyFox', ‘ViperVenon’, “CrimsonReaper', ‘PhantonGhost', 'StormStrider', ‘StormBreaker, ‘SapphireSword’, ‘ShadowReign’, ‘DragonSlayer’, ‘SilverShadow’, ‘Eagletye', ‘BlazingStorn’, 'MidnightSage’, ‘RapidBlaze', ‘Frostfire’, ‘ScarletWitch', ‘RagingTiger’, ‘SpectralRogue' , ‘BlazingRaptor’, ‘EternalShadow', 'WickedStrider', 'CrimsonStorm’ , ‘RuthlessReaper', ‘FrostFury', ‘ShadowBlade’, ‘RapidPhanton', ‘Viperstrike’, 'EternalBlaze', ‘Vengeance’, ‘LunarShadow’, ‘Deathstrike', ‘AzureBlade’, ‘RavenHeart’, ‘SerpentFury’, “CrimsonRogue’, "VoidSeeker', ‘AstralSword’, 'FrozenFlane", ‘TwilightWarden', ‘ShadowPhoenix', ‘PhantonStrider', ‘EternalFire’, ‘NebulaBlade’, 'SilverHawk’, 'SolarSword’, "EclipseShadow’ , ‘StarBlade', ‘LethalWraith’, ‘RadiantBlaze', ‘FrostGuardian', ‘mysticSerpent', ‘InfernoStorm’, 'BlazeRanger’, ‘RagingFire’, “shadowDancer', ‘PhoenixWings', 'TceStorm’, ‘Noonlitsorcerer', "DarkReaper’, ‘CosmicGhost', ‘StormRider’, ‘FlareRogue’, "RadiantBlade', ‘TempestPhantom’, "SapphireViper’, ‘EternalFlame’, "StarlightBlade', ‘CrimsonRider’, "BlazingSorcerer’, ‘FrozenFlare', "AbyssGuardian', ‘SpectralPhantom' J, dtype=object) -nuique() It will show the fotal no of unque value from whole data frame In [37]: df-nunique() out{37]: Unnamed: @ 221 Player_Name 106 Matches_Played 70 kills 90 Deaths 82 Assists 65 Damage_Dealt 102 Headshots 78 Wins 28 Top_10s 59 Revives 39 Distance_Traveled 105 Weapons_Used 9 Time_Survived 107 Rank 4 dtype: intea localhost B888/notebooks/Untilee2-Copy7. py9718/23, 10:20 AM .describe() Unile422-Copy7 - Jupyter Notebook It show the Count, mean , median ete In [38]: df.describe() out[38]: Unnamed: Matches, Playod Kills Deaths Assists Damage_Dealt Headshe ‘count 227000000 221.0000 221.0000 221.000000 22%.000000 227.0000 227.0000 mean 110.0000 -234.624434 612674208 142579186 2.615385 14801.004525 207.3619 std 63.941979 37178429 89.311216 92.882564 21.423045 1902.947975 29.7759 min 0.000000 143.0000 368.000000 68.0000 42.000000 865.0000 123.0000 25% 5.000000 206,000000 543.000000 117.000000 76,000000 13589.000000 193.0000 50% 110,000000 224.0000. 604.000000 138.0000 92.000000 14894.000000 210.0000 +165.000000 257.0000 674.000000 167.000000 117.000000 15987.000000 226.0000 max 220,000000 _409,000000. 923,000000 267.000000 139,000000 21037.000000 312.0000 -value_counts It Shows all the unique values with their count In [39]: df{ out[39]: Vengefulviper Frostbite VenomousViper LethalLynx Nightmare MidnightSage BlazingStorm Eagletye SilverShadow SpectralPhanton 7 5 5 4 4 1 ‘layer_Name" J. value_counts() Name: Player Name, Length: 106, dtype: int6a -isnull() It shows the how many null values localhost B888/notebooks/Untilee2-Copy7. py sina9118/23, 10:20AM In [40]: d#.isnul1() out[4a]: Unnamed: Unitted22-Copy7 - Jupyter Notebook prayer Name Matches Played Kits Deaths Assists 0 Fase CFase Fase Fase Fase Fave Fase Fas 2 False Feo False False False False Faso Fas 3 Fase Faso False False False False Faso Fas 2 Fase Faso Falso False Faso False Faso Fas 0 Fase Fase False False False Fase Fase Fas 221 rows «18 columns In [41]: sns.heatmap(df.isnull()) pit. show() 0050 0100 vee a2F cane: ttotrnoboctal atop eh ena9118/23, 10:20AM Unitted22-Copy7 - Jupyter Notebook In [42]: df.isna().sum() out[42]: Unnamed: @ Player_Name Matches_Played Kills Deaths Assists Damage_Dealt Headshots Wins. Top_1es Revives Distance_Traveled Weapons_Used Time_Survived Rank dtype: intea seeccescccess009 Drop the Unnamed Column In [43]: dF.drop([ ‘Unnamed: @'],axis=1, inplace=True) Show the Rank in Barplot In [44]: df.Rank.value_counts().plot(kind ar") out[44]:
100 0 eo 8 & 8B Platinum Diamona Gold silver Top 10 players By Matches Played localhost B888/notebooks/Untilee2-Copy7. py ma9718/23, 10:20 AM In [48]: bar_top_10 players Unile422-Copy7 - Jupyter Notebook px.bar(df, x="Player_Name", y="Matches Played", titl bar_top_10 players. show() localhost B888/notebooks/Untilee2-Copy7. py sina9118/23, 10:20AM Unitted22-Copy7 - upyter Notebook In [56]: # Sort the DataFrame by "Matches Played" in descending order if = df.sort_values(by="Matches Played”, ascending-False) # Select the top 5 players with the highest matches played ‘top_5 players = df-head(5) # Create a bar plot for the top 5 players plt.figure(figsize=(10, 6)) plt.bar(top_s_players["Player_Name"], top_S_players["Matches_Played"]) plt.xlabel("Player_Name”) plt.ylabel (“Matches_Played") plt.title("Top 5 Players by Matches Played") plt.xticks(rotation=45) out{s6]: ([@, 1, 2, 3], [Text(@, 2, "*), Text(, @ '"), Text(a, 0, ), Text(@, @, '')]) ‘Top 5 Players by Matches Played s Played 8.8 8 es 8 8 Matches Pla 8 Top 5 players By Kills localhost B888/notebooks/Untilee2-Copy7. py ona9118/23, 10:20AM Unitted22-Copy7 - upyter Notebook In [59]: # Sort the DataFrame by "Kills" in descending order if = df.sort_values(by="Kills", ascending=False) # Select the top 5 players with the highest matches played top_5 players = df-head(5) # Create a bar plot for the top 5 players plt.figure(figsize=(10, 6)) plt.bar(top_s_players["Player_Name"], top_S_players["kills"]) plt.xlabel("Player_Name”) plt.ylabel ("Kills") plt.title("Top 5 Players by Kills") plt.xticks(rotation=45) out(59]: (L841, 2, 3], [Text(@, @, ''), Text(@, @, ''), Text(@, @, ''), Text(@, @, '')]) ‘Top 5 Players by Kills 00 00 “00 200 ° f ff # F Player Name Top 5 players By Wins localhost B888/notebooks/Untilee2-Copy7. py son9118/23, 10:20AM In [6]: out [60]: Unitted22-Copy7 - upyter Notebook # Sort the DataFrame by “Wins” in descending order f = df.sort_values(by="Wins", ascending=False) # Select the top 5 players with the highest matches played top_5 players = df-head(5) # Create a bar plot for the top 5 players plt.figure(figsize=(10, 6)) plt.bar(top_s_players["Player_Name"], top_S_players["wins"]) plt.xlabel ("Player Name") plt.ylabel (“wins”) plt.title("Top 5 Players by Wins") plt.xticks(rotation=45) ([@, 1, 2, 3], [Text(@, @, ''), Text(@, @, ''), Text(@, @, ''), Text(@, @, '')]) ‘Top 5 Players by Wins localhost B888/notebooks/Untilee2-Copy7. py wine9118/23, 10:20AM In [67]: Unitted22-Copy7 - Jupyter Notebook # Sort the DataFrame by “Matches Played" in descending order if = df.sort_values(by="Player Name", ascending=False) # Select the top 5 players with the highest matches played players = df-head(5) “figure (figsize=(8, 6)) plt.bar(top_S_players["Player_Name"], top_S_players{"Rank"]) plt.xlabel(‘Player_Name' ) plt.ylabel (‘Rank’) plt.title('Player_Name by Rank’) pit. show() Player_Name by Rank Diamond a Siver WickedWitch WickedStrider WeidSeeker Player_Name How many times Rank are Published localhost B888/notebooks/Untilee2-Copy7. py ana9118/23, 10:20AM Unitted22-Copy7 - Jupyter Notebook In [69]: rank_counts = df["Rank rank_counts.colunns = ["Rank", "Coun rank_counts = rank_counts.sort_values(by="Count", ascending-False) reset_index() plt.figure(figsize=(10, 6)) plt.bar(rank_counts["Rank"], rank_counts[“Count"}) plt.xlabel ("Rank") plt.ylabel ("Count") plt.title("Rank Distribution Among Players") plt.xticks(rotation=45) pit. show() Rank Distribution Among Players 100 » © # | L “ » ° a Rank How many Times Rank Published by Player Name localhost B888/notebooks/Untilee2-Copy7. py a39118/23, 10:20AM Unitted22-Copy7 - Jupyter Notebook In [74]: # Create a cross-tabulation to count how many times each rank was achieved by ( cross_tab = pd.crosstab(df["Player_Name"], df["Rank"]).head(20) # Plot the bar chart cross_tab.plot(kind="bar", stacked=True, figsize=(15, 8) 4 Customize the plot plt.xlabel("Player Name") plt.ylabel ("Count") plt.title("Rank Achievements by Player") # Show the plot pit. show() Rank Achivemants by Payer PeRaPES PEE PEER PPEETEPPRPTT UP DTG! In [ ]: localhost B888/notebooks/Untilee2-Copy7. py sana
You might also like
IP Practical File 2024-25
PDF
100% (7)
IP Practical File 2024-25
22 pages
Python Cheat Sheet: Pandas - Numpy - Sklearn Matplotlib - Seaborn BS4 - Selenium - Scrapy
PDF
100% (3)
Python Cheat Sheet: Pandas - Numpy - Sklearn Matplotlib - Seaborn BS4 - Selenium - Scrapy
9 pages
EDA Lab Manual
PDF
100% (2)
EDA Lab Manual
93 pages
Series and Pandas Methods
PDF
No ratings yet
Series and Pandas Methods
5 pages
EDA Lab Manual
PDF
No ratings yet
EDA Lab Manual
93 pages
Batch2 FDS Printout
PDF
No ratings yet
Batch2 FDS Printout
38 pages
Pyt Manual 1
PDF
No ratings yet
Pyt Manual 1
85 pages
Numpy For Data Science
PDF
No ratings yet
Numpy For Data Science
94 pages
Pandas Notes
PDF
No ratings yet
Pandas Notes
27 pages
Data Science Practicals - Ipynb
PDF
No ratings yet
Data Science Practicals - Ipynb
54 pages
Python Libraries
PDF
No ratings yet
Python Libraries
53 pages
Numpy Boolean Indexing: Filter
PDF
No ratings yet
Numpy Boolean Indexing: Filter
39 pages
Practical File 12.
PDF
No ratings yet
Practical File 12.
22 pages
UNIT-4 Important Q-A
PDF
No ratings yet
UNIT-4 Important Q-A
28 pages
Mukta Sec A Da Fisac
PDF
No ratings yet
Mukta Sec A Da Fisac
43 pages
SESION 12 (Pandas)
PDF
No ratings yet
SESION 12 (Pandas)
41 pages
DataFrame Statistics
PDF
No ratings yet
DataFrame Statistics
41 pages
Report
PDF
No ratings yet
Report
25 pages
AI Final PDF
PDF
No ratings yet
AI Final PDF
38 pages
Practical File 12th
PDF
No ratings yet
Practical File 12th
19 pages
Astros
PDF
No ratings yet
Astros
20 pages
Cheat Sheet: The Pandas Dataframe Object: Preliminaries Get Your Data Into A Dataframe
PDF
100% (1)
Cheat Sheet: The Pandas Dataframe Object: Preliminaries Get Your Data Into A Dataframe
10 pages
Virat Kohil
PDF
No ratings yet
Virat Kohil
31 pages
Ai Tools and Applications-Lab
PDF
No ratings yet
Ai Tools and Applications-Lab
33 pages
Experimenting With Data Analysis Packages and Statistical Operations
PDF
No ratings yet
Experimenting With Data Analysis Packages and Statistical Operations
18 pages
Ge Sem II Dav Upc 2344001201 Sl. No. Qp. 2012 July 2023
PDF
No ratings yet
Ge Sem II Dav Upc 2344001201 Sl. No. Qp. 2012 July 2023
16 pages
Python Solution
PDF
No ratings yet
Python Solution
30 pages
Pandas
PDF
No ratings yet
Pandas
30 pages
Pandas DataFrame Notes
PDF
No ratings yet
Pandas DataFrame Notes
10 pages
Numpy - Pandas - Lab - Jupyter Notebook
PDF
No ratings yet
Numpy - Pandas - Lab - Jupyter Notebook
29 pages
Ip 12th Practical
PDF
No ratings yet
Ip 12th Practical
22 pages
Importing Libraries: Import As Import As Import As Import As Import As Import
PDF
No ratings yet
Importing Libraries: Import As Import As Import As Import As Import As Import
13 pages
Exp - 1 - Introduction To Data Analytics and Python Fundamentals - SDK - Ok
PDF
No ratings yet
Exp - 1 - Introduction To Data Analytics and Python Fundamentals - SDK - Ok
9 pages
Technologyname Phase2
PDF
No ratings yet
Technologyname Phase2
20 pages
Practical File
PDF
No ratings yet
Practical File
19 pages
L3 Notes-1
PDF
No ratings yet
L3 Notes-1
8 pages
10 Minutes To Pandas - Pandas 1.2.4 Documentation
PDF
No ratings yet
10 Minutes To Pandas - Pandas 1.2.4 Documentation
18 pages
Mayank Chaudhary DEV Practicals
PDF
No ratings yet
Mayank Chaudhary DEV Practicals
14 pages
Exemplar - Perform Feature Engineering
PDF
No ratings yet
Exemplar - Perform Feature Engineering
14 pages
Data Science
PDF
No ratings yet
Data Science
8 pages
Fds SLOT 2
PDF
No ratings yet
Fds SLOT 2
12 pages
Dsa 1
PDF
No ratings yet
Dsa 1
8 pages
Pandas Plots
PDF
No ratings yet
Pandas Plots
14 pages
Assignment 1 - LP1
PDF
No ratings yet
Assignment 1 - LP1
14 pages
Unit 5 Descriptive Statistics
PDF
No ratings yet
Unit 5 Descriptive Statistics
7 pages
Analysing NBA DATA
PDF
No ratings yet
Analysing NBA DATA
13 pages
Youtube Analysis
PDF
No ratings yet
Youtube Analysis
13 pages
Instagram Analysis
PDF
No ratings yet
Instagram Analysis
13 pages
ML Lab A1 A4
PDF
No ratings yet
ML Lab A1 A4
6 pages
Experiment No. 1
PDF
No ratings yet
Experiment No. 1
7 pages
Amazon Prime Analysis
PDF
No ratings yet
Amazon Prime Analysis
10 pages
Pandas 2
PDF
No ratings yet
Pandas 2
17 pages
GE02 (DAVP) Assignment
PDF
No ratings yet
GE02 (DAVP) Assignment
3 pages
Netflix Users Analysis Using Python-1
PDF
No ratings yet
Netflix Users Analysis Using Python-1
15 pages
Dsbda Assignment 1
PDF
No ratings yet
Dsbda Assignment 1
5 pages
Kohli Batting Analysis
PDF
No ratings yet
Kohli Batting Analysis
19 pages
Another Cheatsheet
PDF
No ratings yet
Another Cheatsheet
7 pages
Players Performance Numpy & Titanic SurvivalAnalysis Pandas BUG
PDF
No ratings yet
Players Performance Numpy & Titanic SurvivalAnalysis Pandas BUG
4 pages
Pandas DataFrame Notes
PDF
100% (1)
Pandas DataFrame Notes
10 pages
Pandas DataFrameObject
PDF
No ratings yet
Pandas DataFrameObject
4 pages
Eidd S8 TD1
PDF
No ratings yet
Eidd S8 TD1
3 pages
DAT p3 EDA - Ipynb - Colaboratory
PDF
No ratings yet
DAT p3 EDA - Ipynb - Colaboratory
3 pages
Matchdata - Ipynb - Colaboratory
PDF
No ratings yet
Matchdata - Ipynb - Colaboratory
3 pages