{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"
Introduction
\n",
"\n",
"Fifa is one of the most played console games in the world. Fifa 21 is a series of this. Fifa 21 is a soccer game.FIFA 21 is a football simulation video game published by Electronic Arts as part of the FIFA series. It is the 28th installment in the FIFA series, and was released on 9 October 2020 for Microsoft Windows, Nintendo Switch, PlayStation 4 and Xbox One. Enhanced versions for the PlayStation 5 and Xbox Series X and Series S were released on 3 December 2020, in addition to a version for Stadia. I performed Exploratory Data Analysis using the Fifa 21 data set. Later, I made visualizations using matplotlib & seaborn libraries.
\n",
"\n",
" Content :
\n",
"\n",
"1. [Importing our libraries for EDA](#0)\n",
"1. [Load And Check Data](#1)\n",
"1. [Variable Description](#2)\n",
" * [Check for Missing Value In Dataset](#3)\n",
" * [Rename Columns](#4)\n",
" * [Covert Datetime(D.O.B) Column to Numerical Data](#5)\n",
"1. [Subtract 2021 from Date Of Birth to get Age](#6)\n",
"1. [Dropping columns in our Dataset with Pandas](#7)\n",
"1. [Checking for the Shape of Dataset in Rows and Columns](#8)\n",
" * [Data types in our dataset](#9)\n",
" * [Statistical Analysis of our Dataset](#10)\n",
"1. [Unique Features in Each Column](#11)\n",
" * [Fastest Players for FIFA 2021](#12)\n",
" * [Tallest Players in FIFA 2021](#13)\n",
" * [Best Defender in FIFA 2021](#14)\n",
" * [Strongest Players in FIFA 2021](#15)\n",
" * [Best Player's with LongPasses in FIFA 2021](#16)\n",
" * [Best Player's with ShortPasses in FIFA 2021](#17)\n",
" * [Most Paid Players](#18)\n",
" * [Best GoalKeeper by Reflex](#19)\n",
" \n",
" \n",
" \n",
"\n",
"\n",
"\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"\n",
" Importing our libraries for EDA
"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
"import numpy as np # linear algebra\n",
"import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)\n",
"\n",
"import matplotlib.pyplot as plt #visualize\n",
"plt.style.use(\"seaborn-whitegrid\")\n",
"\n",
"import seaborn as sns #visualize\n",
"\n",
"from collections import Counter\n",
"\n",
"import warnings # don't show warnings\n",
"warnings.filterwarnings(\"ignore\")\n",
"from wordcloud import WordCloud\n",
"%matplotlib inline"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"\n",
" Load and Check Data
"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" int_player_id | \n",
" str_player_name | \n",
" str_positions | \n",
" dt_date_of_birth | \n",
" int_height | \n",
" int_weight | \n",
" int_overall_rating | \n",
" int_potential_rating | \n",
" str_best_position | \n",
" int_best_overall_rating | \n",
" ... | \n",
" int_international_reputations | \n",
" str_work_rate | \n",
" str_body_type | \n",
" int_dribbling | \n",
" int_curve | \n",
" int_fk_accuracy | \n",
" int_long_passing | \n",
" int_ball_control | \n",
" str_player_speciality | \n",
" str_trait | \n",
"
\n",
" \n",
" \n",
" \n",
" 11973 | \n",
" 11974 | \n",
" Thijmen Joel Sander Nijhuis | \n",
" GK | \n",
" 7/25/1998 | \n",
" 196 | \n",
" 83 | \n",
" 64 | \n",
" 70 | \n",
" GK | \n",
" 64 | \n",
" ... | \n",
" 1 | \n",
" Medium/ Medium | \n",
" Lean (185+) | \n",
" 11 | \n",
" 14 | \n",
" 12 | \n",
" 23 | \n",
" 14 | \n",
" NaN | \n",
" NaN | \n",
"
\n",
" \n",
" 112 | \n",
" 113 | \n",
" Nicolás Alejandro Tagliafico | \n",
" LB | \n",
" 8/31/1992 | \n",
" 172 | \n",
" 65 | \n",
" 84 | \n",
" 84 | \n",
" LB | \n",
" 84 | \n",
" ... | \n",
" 3 | \n",
" High/ High | \n",
" Normal (170-185) | \n",
" 73 | \n",
" 68 | \n",
" 40 | \n",
" 67 | \n",
" 77 | \n",
" NaN | \n",
" ['Solid Player', 'Power Header', 'Team Player'] | \n",
"
\n",
" \n",
" 4893 | \n",
" 4894 | \n",
" Nana Opoku Ampomah | \n",
" LM, ST | \n",
" 1/2/1996 | \n",
" 175 | \n",
" 68 | \n",
" 70 | \n",
" 74 | \n",
" RM | \n",
" 71 | \n",
" ... | \n",
" 1 | \n",
" High/ Medium | \n",
" Normal (170-185) | \n",
" 76 | \n",
" 59 | \n",
" 34 | \n",
" 53 | \n",
" 73 | \n",
" NaN | \n",
" ['Long Shot Taker (AI)', 'Speed Dribbler (AI)'] | \n",
"
\n",
" \n",
" 8826 | \n",
" 8826 | \n",
" Terrence Anthony Boyd | \n",
" ST | \n",
" 2/16/1991 | \n",
" 188 | \n",
" 82 | \n",
" 66 | \n",
" 66 | \n",
" ST | \n",
" 66 | \n",
" ... | \n",
" 1 | \n",
" Medium/ Low | \n",
" Normal (185+) | \n",
" 56 | \n",
" 42 | \n",
" 34 | \n",
" 33 | \n",
" 62 | \n",
" NaN | \n",
" NaN | \n",
"
\n",
" \n",
" 60 | \n",
" 61 | \n",
" David Josué Jiménez Silva | \n",
" CAM, CM | \n",
" 1/8/1986 | \n",
" 173 | \n",
" 67 | \n",
" 86 | \n",
" 86 | \n",
" CAM | \n",
" 86 | \n",
" ... | \n",
" 4 | \n",
" High/ Medium | \n",
" Normal (170-185) | \n",
" 86 | \n",
" 82 | \n",
" 77 | \n",
" 84 | \n",
" 91 | \n",
" ['Dribbler', 'Playmaker\\xa0', 'Complete Midfie... | \n",
" ['Finesse Shot', 'Flair', 'Playmaker (AI)', 'O... | \n",
"
\n",
" \n",
" 16426 | \n",
" 16427 | \n",
" Milan Obradović | \n",
" CB | \n",
" 12/27/1999 | \n",
" 189 | \n",
" 81 | \n",
" 58 | \n",
" 70 | \n",
" CB | \n",
" 60 | \n",
" ... | \n",
" 1 | \n",
" Medium/ High | \n",
" Normal (185+) | \n",
" 50 | \n",
" 42 | \n",
" 33 | \n",
" 43 | \n",
" 42 | \n",
" NaN | \n",
" NaN | \n",
"
\n",
" \n",
" 12221 | \n",
" 12222 | \n",
" Manuel Schwenk | \n",
" LM, LW, CAM | \n",
" 3/7/1992 | \n",
" 178 | \n",
" 77 | \n",
" 63 | \n",
" 63 | \n",
" LM | \n",
" 63 | \n",
" ... | \n",
" 1 | \n",
" Medium/ Medium | \n",
" Normal (170-185) | \n",
" 66 | \n",
" 50 | \n",
" 41 | \n",
" 54 | \n",
" 64 | \n",
" NaN | \n",
" ['Injury Prone'] | \n",
"
\n",
" \n",
" 3443 | \n",
" 3444 | \n",
" Saúl Savin Salcedo Zárate | \n",
" CB | \n",
" 8/29/1997 | \n",
" 183 | \n",
" 75 | \n",
" 72 | \n",
" 83 | \n",
" CB | \n",
" 74 | \n",
" ... | \n",
" 1 | \n",
" Medium/ High | \n",
" Normal (170-185) | \n",
" 47 | \n",
" 33 | \n",
" 29 | \n",
" 48 | \n",
" 54 | \n",
" NaN | \n",
" NaN | \n",
"
\n",
" \n",
"
\n",
"
8 rows × 56 columns
\n",
"
"
],
"text/plain": [
" int_player_id str_player_name str_positions \\\n",
"11973 11974 Thijmen Joel Sander Nijhuis GK \n",
"112 113 Nicolás Alejandro Tagliafico LB \n",
"4893 4894 Nana Opoku Ampomah LM, ST \n",
"8826 8826 Terrence Anthony Boyd ST \n",
"60 61 David Josué Jiménez Silva CAM, CM \n",
"16426 16427 Milan Obradović CB \n",
"12221 12222 Manuel Schwenk LM, LW, CAM \n",
"3443 3444 Saúl Savin Salcedo Zárate CB \n",
"\n",
" dt_date_of_birth int_height int_weight int_overall_rating \\\n",
"11973 7/25/1998 196 83 64 \n",
"112 8/31/1992 172 65 84 \n",
"4893 1/2/1996 175 68 70 \n",
"8826 2/16/1991 188 82 66 \n",
"60 1/8/1986 173 67 86 \n",
"16426 12/27/1999 189 81 58 \n",
"12221 3/7/1992 178 77 63 \n",
"3443 8/29/1997 183 75 72 \n",
"\n",
" int_potential_rating str_best_position int_best_overall_rating ... \\\n",
"11973 70 GK 64 ... \n",
"112 84 LB 84 ... \n",
"4893 74 RM 71 ... \n",
"8826 66 ST 66 ... \n",
"60 86 CAM 86 ... \n",
"16426 70 CB 60 ... \n",
"12221 63 LM 63 ... \n",
"3443 83 CB 74 ... \n",
"\n",
" int_international_reputations str_work_rate str_body_type \\\n",
"11973 1 Medium/ Medium Lean (185+) \n",
"112 3 High/ High Normal (170-185) \n",
"4893 1 High/ Medium Normal (170-185) \n",
"8826 1 Medium/ Low Normal (185+) \n",
"60 4 High/ Medium Normal (170-185) \n",
"16426 1 Medium/ High Normal (185+) \n",
"12221 1 Medium/ Medium Normal (170-185) \n",
"3443 1 Medium/ High Normal (170-185) \n",
"\n",
" int_dribbling int_curve int_fk_accuracy int_long_passing \\\n",
"11973 11 14 12 23 \n",
"112 73 68 40 67 \n",
"4893 76 59 34 53 \n",
"8826 56 42 34 33 \n",
"60 86 82 77 84 \n",
"16426 50 42 33 43 \n",
"12221 66 50 41 54 \n",
"3443 47 33 29 48 \n",
"\n",
" int_ball_control str_player_speciality \\\n",
"11973 14 NaN \n",
"112 77 NaN \n",
"4893 73 NaN \n",
"8826 62 NaN \n",
"60 91 ['Dribbler', 'Playmaker\\xa0', 'Complete Midfie... \n",
"16426 42 NaN \n",
"12221 64 NaN \n",
"3443 54 NaN \n",
"\n",
" str_trait \n",
"11973 NaN \n",
"112 ['Solid Player', 'Power Header', 'Team Player'] \n",
"4893 ['Long Shot Taker (AI)', 'Speed Dribbler (AI)'] \n",
"8826 NaN \n",
"60 ['Finesse Shot', 'Flair', 'Playmaker (AI)', 'O... \n",
"16426 NaN \n",
"12221 ['Injury Prone'] \n",
"3443 NaN \n",
"\n",
"[8 rows x 56 columns]"
]
},
"execution_count": 4,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"#Reading Our Dataset with Pandas Library\n",
"data_fifa = pd.read_csv(\"players.csv\")\n",
"data_fifa.sample(8)"
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"Index(['int_player_id', 'str_player_name', 'str_positions', 'dt_date_of_birth',\n",
" 'int_height', 'int_weight', 'int_overall_rating',\n",
" 'int_potential_rating', 'str_best_position', 'int_best_overall_rating',\n",
" 'int_value', 'int_wage', 'int_team_id', 'str_nationality',\n",
" 'int_crossing', 'int_finishing', 'int_heading_accuracy',\n",
" 'int_short_passing', 'int_volleys', 'int_defensive_awareness',\n",
" 'int_standing_tackle', 'int_sliding_tackle', 'int_diving',\n",
" 'int_handling', 'int_kicking', 'int_gk_positioning', 'int_reflexes',\n",
" 'int_aggression', 'int_interceptions', 'int_positioning', 'int_vision',\n",
" 'int_penalties', 'int_composure', 'int_acceleration',\n",
" 'int_sprint_speed', 'int_agility', 'int_reactions', 'int_balance',\n",
" 'int_shot_power', 'int_jumping', 'int_stamina', 'int_strength',\n",
" 'int_long_shots', 'str_preferred_foot', 'int_weak_foot',\n",
" 'int_skill_moves', 'int_international_reputations', 'str_work_rate',\n",
" 'str_body_type', 'int_dribbling', 'int_curve', 'int_fk_accuracy',\n",
" 'int_long_passing', 'int_ball_control', 'str_player_speciality',\n",
" 'str_trait'],\n",
" dtype='object')"
]
},
"execution_count": 8,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"#Viweing the columns available in our Dataset\n",
"data_fifa.columns"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"\n",
"Variable Description
\n",
"\n",
"1. **ID** : unique id number to each footballer\n",
"2. **Name** : name of footballer\n",
"3. **Age** : age of footballer\n",
"4. **Photo** : photo of footballer\n",
"5. **Nationality** : the nationality of the player\n",
"6. **Overall** : in-game power\n",
"7. **Potential** : the potential of the football player\n",
"8. **Clup**: football player's club\n",
"9. **Value** : value of the player\n",
"10. **Wage** : wages paid by the player\n",
"11. **Special** : special\n",
"12. **Preferred Foot** : foot used by the footballer(left,Right)\n",
"13. **International Reputation** : the international reputation of the football player\n",
"14. **Weak Foot** : weak foot of the footballer\n",
"15. **Skill Moves** : football player's skills moves\n",
"16. **Work Rate** : football player's work rate\n",
"17. **Body Type** : body type of the football player\n",
"18. **Real Face** : real face of the player(false,true)\n",
"19. **Position** : position played by the football player\n",
"20. **Jersey Number** : jersey number of the football player\n",
"21. **Joined** : Joined\n",
"22. **Loaned From** : is the football player for loaned from\n",
"23. **Contract Valid Until** : the expiry date of the player contract\n",
"24. **Height** : footballer's height\n",
"25. **Weight** : footballer's weight\n",
"26. **Crossing** : long cross pass by the footballer\n",
"27. **Finishing** : football player finishing\n",
"28. **HeadingAccuracy** : HeadingAccuracy\n",
"29. **ShortPassing** : ShortPassing\n",
"30. **Dribbling** : player's dribbling speed\n",
"31. **Curve** : spin on the ball\n",
"32. **LongPassing** : football player's long pass\n",
"33. **BallControl** : football player control the ball\n",
"34. **Acceleration** : the speed of the football player\n",
"35. **SprintSpeed** : the sprintSpeed of the player\n",
"36. **Agility** : the agility of the football player\n",
"37. **Reactions** : the reaction of the footballer\n",
"38. **Balance** : football player's balance\n",
"39. **ShotPower** : football player's shotpower\n",
"40. **Jumping** : the footballer's jumping capacity\n",
"41. **Stamina** : the footballer's stamina\n",
"42. **Strength** : the strength of the football player\n",
"43. **LongShots** : footballer's longest shot\n",
"44. **Aggression** : football player's aggression\n",
"45. **Positioning** : the position of the football player in the football field\n",
"46. **Vision** : football player vision\n",
"47. **Penalties** : footballer's penalties\n",
"48. **Composure** : the calmness of the football player on the field\n",
"49. **Marking** : marking\n",
"50. **StandingTackle** : the fight of the football player\n",
"51. **SlidingTackle** : slide intervention\n",
"52. **GKDiving** : diving\n",
"53. **GKHandling** : handling\n",
"54. **GKKicking** : kicking\n",
"55. **GKPositioning** : Positioning\n",
"56. **GKReflexes** : reflexes\n",
"57. **Release Clause** : the player's release clause\n",
"\n",
" **Football Player Position** : LS, ST, RS, LW, LF, CF, RF, RW, LAM, \n",
" CAM, RAM, LM, LCM, CM, RCM, RM, LWB, LDM, CDM, RDM, RWB, LB, LCB, BC, RCB, RB. \n",
"\n",
"\n",
"\n",
"\n",
"\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"\n",
" Check for Missing Value In Dataset
"
]
},
{
"cell_type": "code",
"execution_count": 9,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"Index(['int_team_id', 'str_player_speciality', 'str_trait'], dtype='object')"
]
},
"execution_count": 9,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"#Viweing the columns available in our Dataset\n",
"data_fifa.columns\n",
"\n",
"\n",
"#Checking for columns with missing values\n",
"data_fifa.columns[data_fifa.isnull().any()] "
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"\n",
" Rename Columns
"
]
},
{
"cell_type": "code",
"execution_count": 11,
"metadata": {},
"outputs": [],
"source": [
"# Renaming the Columns in Dataset in a suitable Pythonic way\n",
"data_fifa = data_fifa.rename(columns = {'str_player_name': 'PlayerName', 'str_positions': 'Positions',\n",
" 'dt_date_of_birth': 'D.O.B', 'int_height': 'PlayerHeight',\n",
" 'int_weight': 'PlayerWeight', 'int_overall_rating': 'OverallRating',\n",
" 'int_potential_rating': 'PotentialRating', 'str_best_position': 'BestPositions',\n",
" 'int_best_overall_rating': 'BestOverallRating', 'int_value': 'PlayerValue',\n",
" 'int_wage': 'Wage', 'str_nationality': 'Nationality',\n",
" 'int_crossing': 'Crossing', 'int_finishing': 'FinishingAccuracy',\n",
" 'int_heading_accuracy': 'HeadingAccuracy', 'int_short_passing': 'ShortPassing',\n",
" 'int_volleys': 'Volleys', 'int_defensive_awareness': 'DefensiveAwareness',\n",
" 'int_standing_tackle': 'StandingTackle', 'int_sliding_tackle': 'SlidingTackle',\n",
" 'int_diving': 'Diving', 'int_handling': 'Handling',\n",
" 'int_kicking': 'Kicking', 'int_gk_positioning': 'GkPositioning',\n",
" 'int_reflexes': 'Reflexes', 'int_aggression': 'Aggression',\n",
" 'int_interceptions': 'Interceptions', 'int_positioning': 'Positioning',\n",
" 'int_vision': 'Vision', 'int_penalties': 'Penalties',\n",
" 'int_composure': 'Composure', 'int_acceleration': 'Acceleration',\n",
" 'int_sprint_speed': 'SprintSpeed', 'int_agility': 'Agility',\n",
" 'int_reactions': 'Reactions', 'int_balance': 'Balance',\n",
" 'int_shot_power': 'ShotPower', 'int_jumping': 'JumpingPower',\n",
" 'int_stamina': 'Stamina', 'int_strength': 'Strength',\n",
" 'int_long_shots': 'LongShots', 'str_preferred_foot': 'PreferredFoot',\n",
" 'int_weak_foot': 'WeakFoot', 'int_skill_moves': 'SkillMoves',\n",
" 'int_international_reputations': 'InternationalReputations', 'str_work_rate': 'WorkRate',\n",
" 'str_body_type': 'BodyType', 'int_dribbling': 'Dribbling',\n",
" 'int_curve': 'Curve', 'int_fk_accuracy': 'FreekickAccuracy',\n",
" 'int_long_passing': 'LongPassing', 'int_ball_control': 'BallControl'}, inplace = False)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"\n",
" Covert Datetime(D.O.B) Column to Numerical Data
\n"
]
},
{
"cell_type": "code",
"execution_count": 12,
"metadata": {},
"outputs": [],
"source": [
"#Converting Our Datatime column to Numerical Column @year e.g 1996 and @Month e.g 11th month\n",
"data_fifa['D.O.B'] = pd.to_datetime(data_fifa['D.O.B'])\n",
"data_fifa['year']= data_fifa['D.O.B'].dt.year\n",
"data_fifa['month']= data_fifa['D.O.B'].dt.month\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"\n",
"\n",
" Subtract 2021 from Date Of Birth to get Age
"
]
},
{
"cell_type": "code",
"execution_count": 13,
"metadata": {},
"outputs": [],
"source": [
"#Subtract 2021 from Date Of Birth to get Age\n",
"today = pd.to_datetime('2021-03-10')\n",
"data_fifa['age'] = today.year - data_fifa['D.O.B'].dt.year"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"\n",
"\n",
" Dropping columns in our Dataset with Pandas
"
]
},
{
"cell_type": "code",
"execution_count": 14,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" 2982 | \n",
" 14918 | \n",
" 9178 | \n",
" 1242 | \n",
"
\n",
" \n",
" \n",
" \n",
" PlayerName | \n",
" Nuno Miguel da Costa Jóia | \n",
" Miguel Angel Vargas Mañan | \n",
" Javier Alván Salas Salazar | \n",
" John Brooks | \n",
"
\n",
" \n",
" PlayerHeight | \n",
" 182 | \n",
" 183 | \n",
" 183 | \n",
" 193 | \n",
"
\n",
" \n",
" PlayerWeight | \n",
" 70 | \n",
" 81 | \n",
" 73 | \n",
" 78 | \n",
"
\n",
" \n",
" PotentialRating | \n",
" 73 | \n",
" 68 | \n",
" 67 | \n",
" 78 | \n",
"
\n",
" \n",
" BestPositions | \n",
" CF | \n",
" GK | \n",
" CM | \n",
" CB | \n",
"
\n",
" \n",
" BestOverallRating | \n",
" 74 | \n",
" 60 | \n",
" 67 | \n",
" 78 | \n",
"
\n",
" \n",
" PlayerValue | \n",
" 3000000 | \n",
" 475000 | \n",
" 1000000 | \n",
" 8000000 | \n",
"
\n",
" \n",
" Wage | \n",
" 43000 | \n",
" 500 | \n",
" 3000 | \n",
" 37000 | \n",
"
\n",
" \n",
" Nationality | \n",
" Cape Verde | \n",
" Chile | \n",
" Mexico | \n",
" United States | \n",
"
\n",
" \n",
" Crossing | \n",
" 63 | \n",
" 18 | \n",
" 58 | \n",
" 36 | \n",
"
\n",
" \n",
" FinishingAccuracy | \n",
" 74 | \n",
" 19 | \n",
" 51 | \n",
" 39 | \n",
"
\n",
" \n",
" HeadingAccuracy | \n",
" 74 | \n",
" 18 | \n",
" 47 | \n",
" 82 | \n",
"
\n",
" \n",
" ShortPassing | \n",
" 72 | \n",
" 38 | \n",
" 72 | \n",
" 72 | \n",
"
\n",
" \n",
" Volleys | \n",
" 61 | \n",
" 15 | \n",
" 54 | \n",
" 32 | \n",
"
\n",
" \n",
" DefensiveAwareness | \n",
" 15 | \n",
" 16 | \n",
" 55 | \n",
" 75 | \n",
"
\n",
" \n",
" StandingTackle | \n",
" 17 | \n",
" 22 | \n",
" 61 | \n",
" 78 | \n",
"
\n",
" \n",
" SlidingTackle | \n",
" 20 | \n",
" 18 | \n",
" 58 | \n",
" 75 | \n",
"
\n",
" \n",
" Diving | \n",
" 14 | \n",
" 59 | \n",
" 12 | \n",
" 8 | \n",
"
\n",
" \n",
" Handling | \n",
" 15 | \n",
" 57 | \n",
" 10 | \n",
" 7 | \n",
"
\n",
" \n",
" Kicking | \n",
" 7 | \n",
" 58 | \n",
" 16 | \n",
" 10 | \n",
"
\n",
" \n",
" GkPositioning | \n",
" 12 | \n",
" 58 | \n",
" 11 | \n",
" 9 | \n",
"
\n",
" \n",
" Reflexes | \n",
" 6 | \n",
" 62 | \n",
" 11 | \n",
" 10 | \n",
"
\n",
" \n",
" Aggression | \n",
" 48 | \n",
" 37 | \n",
" 73 | \n",
" 75 | \n",
"
\n",
" \n",
" Interceptions | \n",
" 37 | \n",
" 26 | \n",
" 64 | \n",
" 76 | \n",
"
\n",
" \n",
" Positioning | \n",
" 76 | \n",
" 19 | \n",
" 60 | \n",
" 40 | \n",
"
\n",
" \n",
" Vision | \n",
" 67 | \n",
" 29 | \n",
" 64 | \n",
" 57 | \n",
"
\n",
" \n",
" Penalties | \n",
" 69 | \n",
" 25 | \n",
" 59 | \n",
" 45 | \n",
"
\n",
" \n",
" Composure | \n",
" 64 | \n",
" 46 | \n",
" 56 | \n",
" 81 | \n",
"
\n",
" \n",
" Acceleration | \n",
" 77 | \n",
" 48 | \n",
" 66 | \n",
" 63 | \n",
"
\n",
" \n",
" SprintSpeed | \n",
" 78 | \n",
" 51 | \n",
" 63 | \n",
" 79 | \n",
"
\n",
" \n",
" Agility | \n",
" 79 | \n",
" 38 | \n",
" 65 | \n",
" 56 | \n",
"
\n",
" \n",
" Reactions | \n",
" 68 | \n",
" 61 | \n",
" 62 | \n",
" 73 | \n",
"
\n",
" \n",
" Balance | \n",
" 74 | \n",
" 28 | \n",
" 61 | \n",
" 51 | \n",
"
\n",
" \n",
" ShotPower | \n",
" 73 | \n",
" 44 | \n",
" 64 | \n",
" 50 | \n",
"
\n",
" \n",
" JumpingPower | \n",
" 81 | \n",
" 62 | \n",
" 43 | \n",
" 72 | \n",
"
\n",
" \n",
" Stamina | \n",
" 65 | \n",
" 42 | \n",
" 72 | \n",
" 61 | \n",
"
\n",
" \n",
" Strength | \n",
" 62 | \n",
" 71 | \n",
" 73 | \n",
" 83 | \n",
"
\n",
" \n",
" LongShots | \n",
" 68 | \n",
" 20 | \n",
" 55 | \n",
" 29 | \n",
"
\n",
" \n",
" PreferredFoot | \n",
" Right | \n",
" Right | \n",
" Right | \n",
" Left | \n",
"
\n",
" \n",
" WeakFoot | \n",
" 3 | \n",
" 2 | \n",
" 3 | \n",
" 3 | \n",
"
\n",
" \n",
" SkillMoves | \n",
" 3 | \n",
" 1 | \n",
" 3 | \n",
" 2 | \n",
"
\n",
" \n",
" InternationalReputations | \n",
" 1 | \n",
" 1 | \n",
" 1 | \n",
" 2 | \n",
"
\n",
" \n",
" WorkRate | \n",
" Medium/ Medium | \n",
" Medium/ Medium | \n",
" Medium/ Medium | \n",
" Medium/ High | \n",
"
\n",
" \n",
" BodyType | \n",
" Lean (170-185) | \n",
" Normal (170-185) | \n",
" Lean (170-185) | \n",
" Normal (185+) | \n",
"
\n",
" \n",
" Dribbling | \n",
" 76 | \n",
" 22 | \n",
" 64 | \n",
" 65 | \n",
"
\n",
" \n",
" Curve | \n",
" 52 | \n",
" 19 | \n",
" 54 | \n",
" 30 | \n",
"
\n",
" \n",
" FreekickAccuracy | \n",
" 46 | \n",
" 20 | \n",
" 42 | \n",
" 28 | \n",
"
\n",
" \n",
" LongPassing | \n",
" 54 | \n",
" 31 | \n",
" 72 | \n",
" 74 | \n",
"
\n",
" \n",
" BallControl | \n",
" 78 | \n",
" 21 | \n",
" 68 | \n",
" 64 | \n",
"
\n",
" \n",
" month | \n",
" 2 | \n",
" 6 | \n",
" 8 | \n",
" 1 | \n",
"
\n",
" \n",
" age | \n",
" 30 | \n",
" 25 | \n",
" 28 | \n",
" 28 | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" 2982 \\\n",
"PlayerName Nuno Miguel da Costa Jóia \n",
"PlayerHeight 182 \n",
"PlayerWeight 70 \n",
"PotentialRating 73 \n",
"BestPositions CF \n",
"BestOverallRating 74 \n",
"PlayerValue 3000000 \n",
"Wage 43000 \n",
"Nationality Cape Verde \n",
"Crossing 63 \n",
"FinishingAccuracy 74 \n",
"HeadingAccuracy 74 \n",
"ShortPassing 72 \n",
"Volleys 61 \n",
"DefensiveAwareness 15 \n",
"StandingTackle 17 \n",
"SlidingTackle 20 \n",
"Diving 14 \n",
"Handling 15 \n",
"Kicking 7 \n",
"GkPositioning 12 \n",
"Reflexes 6 \n",
"Aggression 48 \n",
"Interceptions 37 \n",
"Positioning 76 \n",
"Vision 67 \n",
"Penalties 69 \n",
"Composure 64 \n",
"Acceleration 77 \n",
"SprintSpeed 78 \n",
"Agility 79 \n",
"Reactions 68 \n",
"Balance 74 \n",
"ShotPower 73 \n",
"JumpingPower 81 \n",
"Stamina 65 \n",
"Strength 62 \n",
"LongShots 68 \n",
"PreferredFoot Right \n",
"WeakFoot 3 \n",
"SkillMoves 3 \n",
"InternationalReputations 1 \n",
"WorkRate Medium/ Medium \n",
"BodyType Lean (170-185) \n",
"Dribbling 76 \n",
"Curve 52 \n",
"FreekickAccuracy 46 \n",
"LongPassing 54 \n",
"BallControl 78 \n",
"month 2 \n",
"age 30 \n",
"\n",
" 14918 \\\n",
"PlayerName Miguel Angel Vargas Mañan \n",
"PlayerHeight 183 \n",
"PlayerWeight 81 \n",
"PotentialRating 68 \n",
"BestPositions GK \n",
"BestOverallRating 60 \n",
"PlayerValue 475000 \n",
"Wage 500 \n",
"Nationality Chile \n",
"Crossing 18 \n",
"FinishingAccuracy 19 \n",
"HeadingAccuracy 18 \n",
"ShortPassing 38 \n",
"Volleys 15 \n",
"DefensiveAwareness 16 \n",
"StandingTackle 22 \n",
"SlidingTackle 18 \n",
"Diving 59 \n",
"Handling 57 \n",
"Kicking 58 \n",
"GkPositioning 58 \n",
"Reflexes 62 \n",
"Aggression 37 \n",
"Interceptions 26 \n",
"Positioning 19 \n",
"Vision 29 \n",
"Penalties 25 \n",
"Composure 46 \n",
"Acceleration 48 \n",
"SprintSpeed 51 \n",
"Agility 38 \n",
"Reactions 61 \n",
"Balance 28 \n",
"ShotPower 44 \n",
"JumpingPower 62 \n",
"Stamina 42 \n",
"Strength 71 \n",
"LongShots 20 \n",
"PreferredFoot Right \n",
"WeakFoot 2 \n",
"SkillMoves 1 \n",
"InternationalReputations 1 \n",
"WorkRate Medium/ Medium \n",
"BodyType Normal (170-185) \n",
"Dribbling 22 \n",
"Curve 19 \n",
"FreekickAccuracy 20 \n",
"LongPassing 31 \n",
"BallControl 21 \n",
"month 6 \n",
"age 25 \n",
"\n",
" 9178 1242 \n",
"PlayerName Javier Alván Salas Salazar John Brooks \n",
"PlayerHeight 183 193 \n",
"PlayerWeight 73 78 \n",
"PotentialRating 67 78 \n",
"BestPositions CM CB \n",
"BestOverallRating 67 78 \n",
"PlayerValue 1000000 8000000 \n",
"Wage 3000 37000 \n",
"Nationality Mexico United States \n",
"Crossing 58 36 \n",
"FinishingAccuracy 51 39 \n",
"HeadingAccuracy 47 82 \n",
"ShortPassing 72 72 \n",
"Volleys 54 32 \n",
"DefensiveAwareness 55 75 \n",
"StandingTackle 61 78 \n",
"SlidingTackle 58 75 \n",
"Diving 12 8 \n",
"Handling 10 7 \n",
"Kicking 16 10 \n",
"GkPositioning 11 9 \n",
"Reflexes 11 10 \n",
"Aggression 73 75 \n",
"Interceptions 64 76 \n",
"Positioning 60 40 \n",
"Vision 64 57 \n",
"Penalties 59 45 \n",
"Composure 56 81 \n",
"Acceleration 66 63 \n",
"SprintSpeed 63 79 \n",
"Agility 65 56 \n",
"Reactions 62 73 \n",
"Balance 61 51 \n",
"ShotPower 64 50 \n",
"JumpingPower 43 72 \n",
"Stamina 72 61 \n",
"Strength 73 83 \n",
"LongShots 55 29 \n",
"PreferredFoot Right Left \n",
"WeakFoot 3 3 \n",
"SkillMoves 3 2 \n",
"InternationalReputations 1 2 \n",
"WorkRate Medium/ Medium Medium/ High \n",
"BodyType Lean (170-185) Normal (185+) \n",
"Dribbling 64 65 \n",
"Curve 54 30 \n",
"FreekickAccuracy 42 28 \n",
"LongPassing 72 74 \n",
"BallControl 68 64 \n",
"month 8 1 \n",
"age 28 28 "
]
},
"execution_count": 14,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"#Dropping columns in our Dataset with Pandas\n",
"columns = ['int_team_id', 'str_player_speciality', 'str_trait','int_player_id','D.O.B','year','Positions','OverallRating']\n",
"data_fifa = data_fifa.drop(columns, axis=1, inplace=False )\n",
"data_fifa.sample(4).T"
]
},
{
"cell_type": "code",
"execution_count": 15,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"Normal (170-185) 6535\n",
"Lean (170-185) 4116\n",
"Normal (185+) 4056\n",
"Lean (185+) 1933\n",
"Normal (170-) 681\n",
"Stocky (170-185) 626\n",
"Lean (170-) 462\n",
"Stocky (185+) 373\n",
"Unique 119\n",
"Stocky (170-) 101\n",
"Name: BodyType, dtype: int64"
]
},
"execution_count": 15,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"data_fifa['BodyType'].value_counts()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"\n",
"\n",
" Checking for the Shape of Dataset in Rows and Columns
"
]
},
{
"cell_type": "code",
"execution_count": 9,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"(19002, 51)"
]
},
"execution_count": 9,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"#Checking for the Shape of Dataset in Rows and Columns\n",
"data_fifa.shape"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"\n",
"\n",
" Data types in our dataset
"
]
},
{
"cell_type": "code",
"execution_count": 10,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
"RangeIndex: 19002 entries, 0 to 19001\n",
"Data columns (total 51 columns):\n",
" # Column Non-Null Count Dtype \n",
"--- ------ -------------- ----- \n",
" 0 PlayerName 19002 non-null object\n",
" 1 PlayerHeight 19002 non-null int64 \n",
" 2 PlayerWeight 19002 non-null int64 \n",
" 3 PotentialRating 19002 non-null int64 \n",
" 4 BestPositions 19002 non-null object\n",
" 5 BestOverallRating 19002 non-null int64 \n",
" 6 PlayerValue 19002 non-null int64 \n",
" 7 Wage 19002 non-null int64 \n",
" 8 Nationality 19002 non-null object\n",
" 9 Crossing 19002 non-null int64 \n",
" 10 FinishingAccuracy 19002 non-null int64 \n",
" 11 HeadingAccuracy 19002 non-null int64 \n",
" 12 ShortPassing 19002 non-null int64 \n",
" 13 Volleys 19002 non-null int64 \n",
" 14 DefensiveAwareness 19002 non-null int64 \n",
" 15 StandingTackle 19002 non-null int64 \n",
" 16 SlidingTackle 19002 non-null int64 \n",
" 17 Diving 19002 non-null int64 \n",
" 18 Handling 19002 non-null int64 \n",
" 19 Kicking 19002 non-null int64 \n",
" 20 GkPositioning 19002 non-null int64 \n",
" 21 Reflexes 19002 non-null int64 \n",
" 22 Aggression 19002 non-null int64 \n",
" 23 Interceptions 19002 non-null int64 \n",
" 24 Positioning 19002 non-null int64 \n",
" 25 Vision 19002 non-null int64 \n",
" 26 Penalties 19002 non-null int64 \n",
" 27 Composure 19002 non-null int64 \n",
" 28 Acceleration 19002 non-null int64 \n",
" 29 SprintSpeed 19002 non-null int64 \n",
" 30 Agility 19002 non-null int64 \n",
" 31 Reactions 19002 non-null int64 \n",
" 32 Balance 19002 non-null int64 \n",
" 33 ShotPower 19002 non-null int64 \n",
" 34 JumpingPower 19002 non-null int64 \n",
" 35 Stamina 19002 non-null int64 \n",
" 36 Strength 19002 non-null int64 \n",
" 37 LongShots 19002 non-null int64 \n",
" 38 PreferredFoot 19002 non-null object\n",
" 39 WeakFoot 19002 non-null int64 \n",
" 40 SkillMoves 19002 non-null int64 \n",
" 41 InternationalReputations 19002 non-null int64 \n",
" 42 WorkRate 19002 non-null object\n",
" 43 BodyType 19002 non-null object\n",
" 44 Dribbling 19002 non-null int64 \n",
" 45 Curve 19002 non-null int64 \n",
" 46 FreekickAccuracy 19002 non-null int64 \n",
" 47 LongPassing 19002 non-null int64 \n",
" 48 BallControl 19002 non-null int64 \n",
" 49 month 19002 non-null int64 \n",
" 50 age 19002 non-null int64 \n",
"dtypes: int64(45), object(6)\n",
"memory usage: 7.4+ MB\n"
]
}
],
"source": [
"#Checking for the number of Categorical and Numerical Data\n",
"data_fifa.info()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"\n",
"\n",
"Statistical Analysis of our Dataset
"
]
},
{
"cell_type": "code",
"execution_count": 17,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" PlayerHeight | \n",
" PlayerWeight | \n",
" PotentialRating | \n",
" BestOverallRating | \n",
" PlayerValue | \n",
" Wage | \n",
" Crossing | \n",
" FinishingAccuracy | \n",
" HeadingAccuracy | \n",
" ShortPassing | \n",
" ... | \n",
" WeakFoot | \n",
" SkillMoves | \n",
" InternationalReputations | \n",
" Dribbling | \n",
" Curve | \n",
" FreekickAccuracy | \n",
" LongPassing | \n",
" BallControl | \n",
" month | \n",
" age | \n",
"
\n",
" \n",
" \n",
" \n",
" count | \n",
" 19002.000000 | \n",
" 19002.000000 | \n",
" 19002.000000 | \n",
" 19002.000000 | \n",
" 19002.000000 | \n",
" 19002.000000 | \n",
" 19002.000000 | \n",
" 19002.000000 | \n",
" 19002.000000 | \n",
" 19002.000000 | \n",
" ... | \n",
" 19002.000000 | \n",
" 19002.000000 | \n",
" 19002.000000 | \n",
" 19002.000000 | \n",
" 19002.000000 | \n",
" 19002.000000 | \n",
" 19002.000000 | \n",
" 19002.000000 | \n",
" 19002.000000 | \n",
" 19002.000000 | \n",
"
\n",
" \n",
" mean | \n",
" 181.225660 | \n",
" 75.046311 | \n",
" 71.148932 | \n",
" 66.784286 | \n",
" 2891449.005368 | \n",
" 9113.167035 | \n",
" 49.690454 | \n",
" 45.877329 | \n",
" 51.970056 | \n",
" 58.808494 | \n",
" ... | \n",
" 2.942217 | \n",
" 2.365540 | \n",
" 1.090569 | \n",
" 55.607462 | \n",
" 47.271603 | \n",
" 42.394432 | \n",
" 52.779971 | \n",
" 58.552416 | \n",
" 5.836123 | \n",
" 26.592464 | \n",
"
\n",
" \n",
" std | \n",
" 6.847472 | \n",
" 7.078378 | \n",
" 6.115352 | \n",
" 6.733926 | \n",
" 7733189.305884 | \n",
" 19735.324238 | \n",
" 18.141514 | \n",
" 19.580879 | \n",
" 17.323647 | \n",
" 14.517060 | \n",
" ... | \n",
" 0.669568 | \n",
" 0.766687 | \n",
" 0.359019 | \n",
" 18.786894 | \n",
" 18.217325 | \n",
" 17.240399 | \n",
" 15.172601 | \n",
" 16.580120 | \n",
" 3.446935 | \n",
" 4.715048 | \n",
"
\n",
" \n",
" min | \n",
" 155.000000 | \n",
" 50.000000 | \n",
" 48.000000 | \n",
" 48.000000 | \n",
" 0.000000 | \n",
" 0.000000 | \n",
" 6.000000 | \n",
" 3.000000 | \n",
" 5.000000 | \n",
" 7.000000 | \n",
" ... | \n",
" 1.000000 | \n",
" 1.000000 | \n",
" 1.000000 | \n",
" 5.000000 | \n",
" 4.000000 | \n",
" 5.000000 | \n",
" 5.000000 | \n",
" 5.000000 | \n",
" 1.000000 | \n",
" 18.000000 | \n",
"
\n",
" \n",
" 25% | \n",
" 176.000000 | \n",
" 70.000000 | \n",
" 67.000000 | \n",
" 62.000000 | \n",
" 475000.000000 | \n",
" 1000.000000 | \n",
" 38.000000 | \n",
" 30.000000 | \n",
" 44.000000 | \n",
" 54.000000 | \n",
" ... | \n",
" 3.000000 | \n",
" 2.000000 | \n",
" 1.000000 | \n",
" 49.000000 | \n",
" 35.000000 | \n",
" 31.000000 | \n",
" 43.000000 | \n",
" 54.000000 | \n",
" 3.000000 | \n",
" 23.000000 | \n",
"
\n",
" \n",
" 50% | \n",
" 181.000000 | \n",
" 75.000000 | \n",
" 71.000000 | \n",
" 67.000000 | \n",
" 950000.000000 | \n",
" 3000.000000 | \n",
" 54.000000 | \n",
" 50.000000 | \n",
" 55.000000 | \n",
" 62.000000 | \n",
" ... | \n",
" 3.000000 | \n",
" 2.000000 | \n",
" 1.000000 | \n",
" 61.000000 | \n",
" 49.000000 | \n",
" 41.000000 | \n",
" 56.000000 | \n",
" 63.000000 | \n",
" 5.000000 | \n",
" 26.000000 | \n",
"
\n",
" \n",
" 75% | \n",
" 186.000000 | \n",
" 80.000000 | \n",
" 75.000000 | \n",
" 71.000000 | \n",
" 2000000.000000 | \n",
" 8000.000000 | \n",
" 63.000000 | \n",
" 62.000000 | \n",
" 64.000000 | \n",
" 68.000000 | \n",
" ... | \n",
" 3.000000 | \n",
" 3.000000 | \n",
" 1.000000 | \n",
" 68.000000 | \n",
" 61.000000 | \n",
" 55.000000 | \n",
" 64.000000 | \n",
" 69.000000 | \n",
" 9.000000 | \n",
" 30.000000 | \n",
"
\n",
" \n",
" max | \n",
" 206.000000 | \n",
" 110.000000 | \n",
" 95.000000 | \n",
" 93.000000 | \n",
" 185500000.000000 | \n",
" 560000.000000 | \n",
" 94.000000 | \n",
" 95.000000 | \n",
" 93.000000 | \n",
" 94.000000 | \n",
" ... | \n",
" 5.000000 | \n",
" 5.000000 | \n",
" 5.000000 | \n",
" 96.000000 | \n",
" 94.000000 | \n",
" 94.000000 | \n",
" 93.000000 | \n",
" 96.000000 | \n",
" 12.000000 | \n",
" 54.000000 | \n",
"
\n",
" \n",
"
\n",
"
8 rows × 45 columns
\n",
"
"
],
"text/plain": [
" PlayerHeight PlayerWeight PotentialRating BestOverallRating \\\n",
"count 19002.000000 19002.000000 19002.000000 19002.000000 \n",
"mean 181.225660 75.046311 71.148932 66.784286 \n",
"std 6.847472 7.078378 6.115352 6.733926 \n",
"min 155.000000 50.000000 48.000000 48.000000 \n",
"25% 176.000000 70.000000 67.000000 62.000000 \n",
"50% 181.000000 75.000000 71.000000 67.000000 \n",
"75% 186.000000 80.000000 75.000000 71.000000 \n",
"max 206.000000 110.000000 95.000000 93.000000 \n",
"\n",
" PlayerValue Wage Crossing FinishingAccuracy \\\n",
"count 19002.000000 19002.000000 19002.000000 19002.000000 \n",
"mean 2891449.005368 9113.167035 49.690454 45.877329 \n",
"std 7733189.305884 19735.324238 18.141514 19.580879 \n",
"min 0.000000 0.000000 6.000000 3.000000 \n",
"25% 475000.000000 1000.000000 38.000000 30.000000 \n",
"50% 950000.000000 3000.000000 54.000000 50.000000 \n",
"75% 2000000.000000 8000.000000 63.000000 62.000000 \n",
"max 185500000.000000 560000.000000 94.000000 95.000000 \n",
"\n",
" HeadingAccuracy ShortPassing ... WeakFoot SkillMoves \\\n",
"count 19002.000000 19002.000000 ... 19002.000000 19002.000000 \n",
"mean 51.970056 58.808494 ... 2.942217 2.365540 \n",
"std 17.323647 14.517060 ... 0.669568 0.766687 \n",
"min 5.000000 7.000000 ... 1.000000 1.000000 \n",
"25% 44.000000 54.000000 ... 3.000000 2.000000 \n",
"50% 55.000000 62.000000 ... 3.000000 2.000000 \n",
"75% 64.000000 68.000000 ... 3.000000 3.000000 \n",
"max 93.000000 94.000000 ... 5.000000 5.000000 \n",
"\n",
" InternationalReputations Dribbling Curve FreekickAccuracy \\\n",
"count 19002.000000 19002.000000 19002.000000 19002.000000 \n",
"mean 1.090569 55.607462 47.271603 42.394432 \n",
"std 0.359019 18.786894 18.217325 17.240399 \n",
"min 1.000000 5.000000 4.000000 5.000000 \n",
"25% 1.000000 49.000000 35.000000 31.000000 \n",
"50% 1.000000 61.000000 49.000000 41.000000 \n",
"75% 1.000000 68.000000 61.000000 55.000000 \n",
"max 5.000000 96.000000 94.000000 94.000000 \n",
"\n",
" LongPassing BallControl month age \n",
"count 19002.000000 19002.000000 19002.000000 19002.000000 \n",
"mean 52.779971 58.552416 5.836123 26.592464 \n",
"std 15.172601 16.580120 3.446935 4.715048 \n",
"min 5.000000 5.000000 1.000000 18.000000 \n",
"25% 43.000000 54.000000 3.000000 23.000000 \n",
"50% 56.000000 63.000000 5.000000 26.000000 \n",
"75% 64.000000 69.000000 9.000000 30.000000 \n",
"max 93.000000 96.000000 12.000000 54.000000 \n",
"\n",
"[8 rows x 45 columns]"
]
},
"execution_count": 17,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"#Giving A Statistical Analysis of our Dataset\n",
"data_fifa.describe().apply(lambda s: s.apply(lambda x: format(x, 'f')))"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"\n",
"Unique Features in Each Column
"
]
},
{
"cell_type": "code",
"execution_count": 18,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"PlayerName 18914\n",
"PlayerHeight 50\n",
"PlayerWeight 56\n",
"PotentialRating 46\n",
"BestPositions 15\n",
"BestOverallRating 46\n",
"PlayerValue 256\n",
"Wage 133\n",
"Nationality 165\n",
"Crossing 89\n",
"FinishingAccuracy 93\n",
"HeadingAccuracy 89\n",
"ShortPassing 86\n",
"Volleys 88\n",
"DefensiveAwareness 92\n",
"StandingTackle 87\n",
"SlidingTackle 85\n",
"Diving 69\n",
"Handling 70\n",
"Kicking 79\n",
"GkPositioning 75\n",
"Reflexes 70\n",
"Aggression 88\n",
"Interceptions 89\n",
"Positioning 94\n",
"Vision 86\n",
"Penalties 87\n",
"Composure 85\n",
"Acceleration 85\n",
"SprintSpeed 84\n",
"Agility 81\n",
"Reactions 70\n",
"Balance 82\n",
"ShotPower 76\n",
"JumpingPower 75\n",
"Stamina 85\n",
"Strength 77\n",
"LongShots 91\n",
"PreferredFoot 2\n",
"WeakFoot 5\n",
"SkillMoves 5\n",
"InternationalReputations 5\n",
"WorkRate 9\n",
"BodyType 10\n",
"Dribbling 91\n",
"Curve 91\n",
"FreekickAccuracy 90\n",
"LongPassing 86\n",
"BallControl 91\n",
"month 12\n",
"age 28\n",
"dtype: int64"
]
},
"execution_count": 18,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"#Checking for the Number Unique Features in Each Column.\n",
"data_fifa.nunique()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"\n",
"Fastest Players for FIFA 2021
"
]
},
{
"cell_type": "code",
"execution_count": 49,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" Acceleration | \n",
" BestPositions | \n",
" age | \n",
" Nationality | \n",
" SprintSpeed | \n",
"
\n",
" \n",
" PlayerName | \n",
" | \n",
" | \n",
" | \n",
" | \n",
" | \n",
"
\n",
" \n",
" \n",
" \n",
" Adama Traoré Diarra | \n",
" 97 | \n",
" RM | \n",
" 25 | \n",
" Spain | \n",
" 96 | \n",
"
\n",
" \n",
" Kylian Mbappé Lottin | \n",
" 96 | \n",
" ST | \n",
" 23 | \n",
" France | \n",
" 96 | \n",
"
\n",
" \n",
" Raheem Shaquille Sterling | \n",
" 96 | \n",
" LW | \n",
" 27 | \n",
" England | \n",
" 90 | \n",
"
\n",
" \n",
" Moussa Diaby | \n",
" 96 | \n",
" LM | \n",
" 22 | \n",
" France | \n",
" 90 | \n",
"
\n",
" \n",
" Alphonso Davies | \n",
" 96 | \n",
" LB | \n",
" 21 | \n",
" Canada | \n",
" 96 | \n",
"
\n",
" \n",
" Daniel James | \n",
" 96 | \n",
" RM | \n",
" 24 | \n",
" Wales | \n",
" 95 | \n",
"
\n",
" \n",
" Jérémy Doku | \n",
" 96 | \n",
" RW | \n",
" 19 | \n",
" Belgium | \n",
" 91 | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" Acceleration BestPositions age Nationality \\\n",
"PlayerName \n",
"Adama Traoré Diarra 97 RM 25 Spain \n",
"Kylian Mbappé Lottin 96 ST 23 France \n",
"Raheem Shaquille Sterling 96 LW 27 England \n",
"Moussa Diaby 96 LM 22 France \n",
"Alphonso Davies 96 LB 21 Canada \n",
"Daniel James 96 RM 24 Wales \n",
"Jérémy Doku 96 RW 19 Belgium \n",
"\n",
" SprintSpeed \n",
"PlayerName \n",
"Adama Traoré Diarra 96 \n",
"Kylian Mbappé Lottin 96 \n",
"Raheem Shaquille Sterling 90 \n",
"Moussa Diaby 90 \n",
"Alphonso Davies 96 \n",
"Daniel James 95 \n",
"Jérémy Doku 91 "
]
},
"execution_count": 49,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"player_name = data_fifa[[\"Acceleration\",\"PlayerName\",\"BestPositions\",'age','Nationality','SprintSpeed']].nlargest(7, ['Acceleration']).set_index('PlayerName')\n",
"player_name"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"\n",
"Tallest Players in FIFA 2021
"
]
},
{
"cell_type": "code",
"execution_count": 28,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" PlayerHeight | \n",
" PlayerWeight | \n",
" BestPositions | \n",
" age | \n",
" Nationality | \n",
"
\n",
" \n",
" PlayerName | \n",
" | \n",
" | \n",
" | \n",
" | \n",
" | \n",
"
\n",
" \n",
" \n",
" \n",
" Tomáš Holý | \n",
" 206 | \n",
" 102 | \n",
" GK | \n",
" 30 | \n",
" Czech Republic | \n",
"
\n",
" \n",
" Costel Fane Pantilimon | \n",
" 203 | \n",
" 96 | \n",
" GK | \n",
" 34 | \n",
" Romania | \n",
"
\n",
" \n",
" Abdoul Bocar Bâ | \n",
" 203 | \n",
" 94 | \n",
" CB | \n",
" 27 | \n",
" Mauritania | \n",
"
\n",
" \n",
" Aaron James Chapman | \n",
" 203 | \n",
" 92 | \n",
" GK | \n",
" 31 | \n",
" England | \n",
"
\n",
" \n",
" Vanja Milinković-Savić | \n",
" 202 | \n",
" 92 | \n",
" GK | \n",
" 24 | \n",
" Serbia | \n",
"
\n",
" \n",
" Kjell Scherpen | \n",
" 202 | \n",
" 85 | \n",
" GK | \n",
" 21 | \n",
" Netherlands | \n",
"
\n",
" \n",
" Stefan Maierhofer | \n",
" 202 | \n",
" 98 | \n",
" ST | \n",
" 39 | \n",
" Austria | \n",
"
\n",
" \n",
" Demba Thiam Ngagne | \n",
" 202 | \n",
" 87 | \n",
" GK | \n",
" 23 | \n",
" Senegal | \n",
"
\n",
" \n",
" Lovre Kalinić | \n",
" 201 | \n",
" 99 | \n",
" GK | \n",
" 31 | \n",
" Croatia | \n",
"
\n",
" \n",
" Fraser Forster | \n",
" 201 | \n",
" 93 | \n",
" GK | \n",
" 33 | \n",
" England | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" PlayerHeight PlayerWeight BestPositions age \\\n",
"PlayerName \n",
"Tomáš Holý 206 102 GK 30 \n",
"Costel Fane Pantilimon 203 96 GK 34 \n",
"Abdoul Bocar Bâ 203 94 CB 27 \n",
"Aaron James Chapman 203 92 GK 31 \n",
"Vanja Milinković-Savić 202 92 GK 24 \n",
"Kjell Scherpen 202 85 GK 21 \n",
"Stefan Maierhofer 202 98 ST 39 \n",
"Demba Thiam Ngagne 202 87 GK 23 \n",
"Lovre Kalinić 201 99 GK 31 \n",
"Fraser Forster 201 93 GK 33 \n",
"\n",
" Nationality \n",
"PlayerName \n",
"Tomáš Holý Czech Republic \n",
"Costel Fane Pantilimon Romania \n",
"Abdoul Bocar Bâ Mauritania \n",
"Aaron James Chapman England \n",
"Vanja Milinković-Savić Serbia \n",
"Kjell Scherpen Netherlands \n",
"Stefan Maierhofer Austria \n",
"Demba Thiam Ngagne Senegal \n",
"Lovre Kalinić Croatia \n",
"Fraser Forster England "
]
},
"execution_count": 28,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"\n",
"player_name = data_fifa[[\"PlayerHeight\",\"PlayerName\",\"PlayerWeight\",\"BestPositions\",'age','Nationality']].nlargest(10, ['PlayerHeight']).set_index('PlayerName')\n",
"player_name"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"\n",
"Best Defender in FIFA 2021
"
]
},
{
"cell_type": "code",
"execution_count": 20,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" DefensiveAwareness | \n",
" BestPositions | \n",
" age | \n",
" Nationality | \n",
"
\n",
" \n",
" PlayerName | \n",
" | \n",
" | \n",
" | \n",
" | \n",
"
\n",
" \n",
" \n",
" \n",
" Giorgio Chiellini | \n",
" 94 | \n",
" CB | \n",
" 37 | \n",
" Italy | \n",
"
\n",
" \n",
" Virgil van Dijk | \n",
" 93 | \n",
" CB | \n",
" 30 | \n",
" Netherlands | \n",
"
\n",
" \n",
" Milan Škriniar | \n",
" 92 | \n",
" CB | \n",
" 26 | \n",
" Slovakia | \n",
"
\n",
" \n",
" Kalidou Koulibaly | \n",
" 91 | \n",
" CB | \n",
" 30 | \n",
" Senegal | \n",
"
\n",
" \n",
" Mats Hummels | \n",
" 90 | \n",
" CB | \n",
" 33 | \n",
" Germany | \n",
"
\n",
" \n",
" Clément Nicolas Laurent Lenglet | \n",
" 90 | \n",
" CB | \n",
" 26 | \n",
" France | \n",
"
\n",
" \n",
" Leonardo Bonucci | \n",
" 90 | \n",
" CB | \n",
" 34 | \n",
" Italy | \n",
"
\n",
" \n",
" Diego Roberto Godín Leal | \n",
" 90 | \n",
" CB | \n",
" 35 | \n",
" Uruguay | \n",
"
\n",
" \n",
" N'Golo Kanté | \n",
" 89 | \n",
" CDM | \n",
" 30 | \n",
" France | \n",
"
\n",
" \n",
" Aymeric Laporte | \n",
" 89 | \n",
" CB | \n",
" 27 | \n",
" France | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" DefensiveAwareness BestPositions age \\\n",
"PlayerName \n",
"Giorgio Chiellini 94 CB 37 \n",
"Virgil van Dijk 93 CB 30 \n",
"Milan Škriniar 92 CB 26 \n",
"Kalidou Koulibaly 91 CB 30 \n",
"Mats Hummels 90 CB 33 \n",
"Clément Nicolas Laurent Lenglet 90 CB 26 \n",
"Leonardo Bonucci 90 CB 34 \n",
"Diego Roberto Godín Leal 90 CB 35 \n",
"N'Golo Kanté 89 CDM 30 \n",
"Aymeric Laporte 89 CB 27 \n",
"\n",
" Nationality \n",
"PlayerName \n",
"Giorgio Chiellini Italy \n",
"Virgil van Dijk Netherlands \n",
"Milan Škriniar Slovakia \n",
"Kalidou Koulibaly Senegal \n",
"Mats Hummels Germany \n",
"Clément Nicolas Laurent Lenglet France \n",
"Leonardo Bonucci Italy \n",
"Diego Roberto Godín Leal Uruguay \n",
"N'Golo Kanté France \n",
"Aymeric Laporte France "
]
},
"execution_count": 20,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"\n",
"player_name = data_fifa[[\"DefensiveAwareness\",\"PlayerName\",\"BestPositions\",'age','Nationality']].nlargest(10, ['DefensiveAwareness']).set_index('PlayerName')\n",
"player_name"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"\n",
"Strongest Players in FIFA 2021
"
]
},
{
"cell_type": "code",
"execution_count": 42,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" Strength | \n",
" PlayerHeight | \n",
" Stamina | \n",
" age | \n",
" Nationality | \n",
" PlayerWeight | \n",
" BestPositions | \n",
"
\n",
" \n",
" PlayerName | \n",
" | \n",
" | \n",
" | \n",
" | \n",
" | \n",
" | \n",
" | \n",
"
\n",
" \n",
" \n",
" \n",
" Adebayo Akinfenwa | \n",
" 97 | \n",
" 178 | \n",
" 65 | \n",
" 39 | \n",
" England | \n",
" 110 | \n",
" ST | \n",
"
\n",
" \n",
" Daryl Dike | \n",
" 96 | \n",
" 188 | \n",
" 59 | \n",
" 21 | \n",
" United States | \n",
" 100 | \n",
" ST | \n",
"
\n",
" \n",
" Romelu Lukaku Menama | \n",
" 95 | \n",
" 191 | \n",
" 73 | \n",
" 28 | \n",
" Belgium | \n",
" 94 | \n",
" ST | \n",
"
\n",
" \n",
" Armando Jesús Méndez Alcorta | \n",
" 95 | \n",
" 176 | \n",
" 79 | \n",
" 25 | \n",
" Uruguay | \n",
" 82 | \n",
" RB | \n",
"
\n",
" \n",
" Aleksandar Vukotić | \n",
" 95 | \n",
" 201 | \n",
" 61 | \n",
" 26 | \n",
" Serbia | \n",
" 95 | \n",
" CB | \n",
"
\n",
" \n",
" Joyskim Aurélien Dawa Tchakonte | \n",
" 95 | \n",
" 194 | \n",
" 66 | \n",
" 25 | \n",
" Cameroon | \n",
" 95 | \n",
" CB | \n",
"
\n",
" \n",
" Kalidou Koulibaly | \n",
" 94 | \n",
" 187 | \n",
" 70 | \n",
" 30 | \n",
" Senegal | \n",
" 89 | \n",
" CB | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" Strength PlayerHeight Stamina age \\\n",
"PlayerName \n",
"Adebayo Akinfenwa 97 178 65 39 \n",
"Daryl Dike 96 188 59 21 \n",
"Romelu Lukaku Menama 95 191 73 28 \n",
"Armando Jesús Méndez Alcorta 95 176 79 25 \n",
"Aleksandar Vukotić 95 201 61 26 \n",
"Joyskim Aurélien Dawa Tchakonte 95 194 66 25 \n",
"Kalidou Koulibaly 94 187 70 30 \n",
"\n",
" Nationality PlayerWeight BestPositions \n",
"PlayerName \n",
"Adebayo Akinfenwa England 110 ST \n",
"Daryl Dike United States 100 ST \n",
"Romelu Lukaku Menama Belgium 94 ST \n",
"Armando Jesús Méndez Alcorta Uruguay 82 RB \n",
"Aleksandar Vukotić Serbia 95 CB \n",
"Joyskim Aurélien Dawa Tchakonte Cameroon 95 CB \n",
"Kalidou Koulibaly Senegal 89 CB "
]
},
"execution_count": 42,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"player_name = data_fifa[[\"Strength\",\"PlayerName\",\"PlayerHeight\",\"Stamina\",'age','Nationality','PlayerWeight','BestPositions']].nlargest(7, ['Strength']).set_index('PlayerName')\n",
"player_name"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"\n",
"Best Player's with LongPasses in FIFA 2021
"
]
},
{
"cell_type": "code",
"execution_count": 46,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" LongPassing | \n",
" ShortPassing | \n",
" Stamina | \n",
" age | \n",
" Nationality | \n",
" PlayerWeight | \n",
" BestPositions | \n",
"
\n",
" \n",
" PlayerName | \n",
" | \n",
" | \n",
" | \n",
" | \n",
" | \n",
" | \n",
" | \n",
"
\n",
" \n",
" \n",
" \n",
" Kevin De Bruyne | \n",
" 93 | \n",
" 94 | \n",
" 89 | \n",
" 30 | \n",
" Belgium | \n",
" 70 | \n",
" CAM | \n",
"
\n",
" \n",
" Toni Kroos | \n",
" 93 | \n",
" 93 | \n",
" 75 | \n",
" 31 | \n",
" Germany | \n",
" 76 | \n",
" CM | \n",
"
\n",
" \n",
" Lionel Andrés Messi Cuccittini | \n",
" 91 | \n",
" 91 | \n",
" 72 | \n",
" 34 | \n",
" Argentina | \n",
" 72 | \n",
" RW | \n",
"
\n",
" \n",
" Paul Pogba | \n",
" 91 | \n",
" 86 | \n",
" 83 | \n",
" 28 | \n",
" France | \n",
" 84 | \n",
" CM | \n",
"
\n",
" \n",
" Daniel Parejo Muñoz | \n",
" 90 | \n",
" 92 | \n",
" 78 | \n",
" 32 | \n",
" Spain | \n",
" 74 | \n",
" CM | \n",
"
\n",
" \n",
" Trent Alexander-Arnold | \n",
" 89 | \n",
" 85 | \n",
" 88 | \n",
" 23 | \n",
" England | \n",
" 69 | \n",
" RB | \n",
"
\n",
" \n",
" Luka Modrić | \n",
" 89 | \n",
" 91 | \n",
" 83 | \n",
" 36 | \n",
" Croatia | \n",
" 66 | \n",
" CM | \n",
"
\n",
" \n",
" Marco Verratti | \n",
" 89 | \n",
" 90 | \n",
" 76 | \n",
" 29 | \n",
" Italy | \n",
" 60 | \n",
" CM | \n",
"
\n",
" \n",
" Hakim Ziyech | \n",
" 89 | \n",
" 86 | \n",
" 80 | \n",
" 28 | \n",
" Morocco | \n",
" 65 | \n",
" CAM | \n",
"
\n",
" \n",
" Luis Alberto Romero Alconchel | \n",
" 89 | \n",
" 90 | \n",
" 75 | \n",
" 29 | \n",
" Spain | \n",
" 74 | \n",
" CAM | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" LongPassing ShortPassing Stamina age \\\n",
"PlayerName \n",
"Kevin De Bruyne 93 94 89 30 \n",
"Toni Kroos 93 93 75 31 \n",
"Lionel Andrés Messi Cuccittini 91 91 72 34 \n",
"Paul Pogba 91 86 83 28 \n",
"Daniel Parejo Muñoz 90 92 78 32 \n",
"Trent Alexander-Arnold 89 85 88 23 \n",
"Luka Modrić 89 91 83 36 \n",
"Marco Verratti 89 90 76 29 \n",
"Hakim Ziyech 89 86 80 28 \n",
"Luis Alberto Romero Alconchel 89 90 75 29 \n",
"\n",
" Nationality PlayerWeight BestPositions \n",
"PlayerName \n",
"Kevin De Bruyne Belgium 70 CAM \n",
"Toni Kroos Germany 76 CM \n",
"Lionel Andrés Messi Cuccittini Argentina 72 RW \n",
"Paul Pogba France 84 CM \n",
"Daniel Parejo Muñoz Spain 74 CM \n",
"Trent Alexander-Arnold England 69 RB \n",
"Luka Modrić Croatia 66 CM \n",
"Marco Verratti Italy 60 CM \n",
"Hakim Ziyech Morocco 65 CAM \n",
"Luis Alberto Romero Alconchel Spain 74 CAM "
]
},
"execution_count": 46,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"\n",
"player_name = data_fifa[[\"LongPassing\",\"PlayerName\",\"ShortPassing\",\"Stamina\",'age','Nationality','PlayerWeight','BestPositions']].nlargest(10, ['LongPassing']).set_index('PlayerName')\n",
"player_name"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"\n",
"Best Player's with ShortPasses in FIFA 2021
"
]
},
{
"cell_type": "code",
"execution_count": 50,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" ShortPassing | \n",
" LongPassing | \n",
" Stamina | \n",
" age | \n",
" Nationality | \n",
" PlayerWeight | \n",
" BestPositions | \n",
"
\n",
" \n",
" PlayerName | \n",
" | \n",
" | \n",
" | \n",
" | \n",
" | \n",
" | \n",
" | \n",
"
\n",
" \n",
" \n",
" \n",
" Kevin De Bruyne | \n",
" 94 | \n",
" 93 | \n",
" 89 | \n",
" 30 | \n",
" Belgium | \n",
" 70 | \n",
" CAM | \n",
"
\n",
" \n",
" Toni Kroos | \n",
" 93 | \n",
" 93 | \n",
" 75 | \n",
" 31 | \n",
" Germany | \n",
" 76 | \n",
" CM | \n",
"
\n",
" \n",
" David Josué Jiménez Silva | \n",
" 92 | \n",
" 84 | \n",
" 70 | \n",
" 35 | \n",
" Spain | \n",
" 67 | \n",
" CAM | \n",
"
\n",
" \n",
" Daniel Parejo Muñoz | \n",
" 92 | \n",
" 90 | \n",
" 78 | \n",
" 32 | \n",
" Spain | \n",
" 74 | \n",
" CM | \n",
"
\n",
" \n",
" Lionel Andrés Messi Cuccittini | \n",
" 91 | \n",
" 91 | \n",
" 72 | \n",
" 34 | \n",
" Argentina | \n",
" 72 | \n",
" RW | \n",
"
\n",
" \n",
" Luka Modrić | \n",
" 91 | \n",
" 89 | \n",
" 83 | \n",
" 36 | \n",
" Croatia | \n",
" 66 | \n",
" CM | \n",
"
\n",
" \n",
" Marco Verratti | \n",
" 90 | \n",
" 89 | \n",
" 76 | \n",
" 29 | \n",
" Italy | \n",
" 60 | \n",
" CM | \n",
"
\n",
" \n",
" Frenkie de Jong | \n",
" 90 | \n",
" 86 | \n",
" 90 | \n",
" 24 | \n",
" Netherlands | \n",
" 74 | \n",
" CM | \n",
"
\n",
" \n",
" Luis Alberto Romero Alconchel | \n",
" 90 | \n",
" 89 | \n",
" 75 | \n",
" 29 | \n",
" Spain | \n",
" 74 | \n",
" CAM | \n",
"
\n",
" \n",
" Christian Dannemann Eriksen | \n",
" 90 | \n",
" 87 | \n",
" 92 | \n",
" 29 | \n",
" Denmark | \n",
" 76 | \n",
" CAM | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" ShortPassing LongPassing Stamina age \\\n",
"PlayerName \n",
"Kevin De Bruyne 94 93 89 30 \n",
"Toni Kroos 93 93 75 31 \n",
"David Josué Jiménez Silva 92 84 70 35 \n",
"Daniel Parejo Muñoz 92 90 78 32 \n",
"Lionel Andrés Messi Cuccittini 91 91 72 34 \n",
"Luka Modrić 91 89 83 36 \n",
"Marco Verratti 90 89 76 29 \n",
"Frenkie de Jong 90 86 90 24 \n",
"Luis Alberto Romero Alconchel 90 89 75 29 \n",
"Christian Dannemann Eriksen 90 87 92 29 \n",
"\n",
" Nationality PlayerWeight BestPositions \n",
"PlayerName \n",
"Kevin De Bruyne Belgium 70 CAM \n",
"Toni Kroos Germany 76 CM \n",
"David Josué Jiménez Silva Spain 67 CAM \n",
"Daniel Parejo Muñoz Spain 74 CM \n",
"Lionel Andrés Messi Cuccittini Argentina 72 RW \n",
"Luka Modrić Croatia 66 CM \n",
"Marco Verratti Italy 60 CM \n",
"Frenkie de Jong Netherlands 74 CM \n",
"Luis Alberto Romero Alconchel Spain 74 CAM \n",
"Christian Dannemann Eriksen Denmark 76 CAM "
]
},
"execution_count": 50,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"\n",
"player_name = data_fifa[[\"ShortPassing\",\"PlayerName\",\"LongPassing\",\"Stamina\",'age','Nationality','PlayerWeight','BestPositions']].nlargest(10, ['ShortPassing']).set_index('PlayerName')\n",
"player_name"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"\n",
"Most Paid Players
"
]
},
{
"cell_type": "code",
"execution_count": 57,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" Wage | \n",
" PlayerValue | \n",
" BestOverallRating | \n",
" age | \n",
" Nationality | \n",
" PotentialRating | \n",
" InternationalReputations | \n",
"
\n",
" \n",
" PlayerName | \n",
" | \n",
" | \n",
" | \n",
" | \n",
" | \n",
" | \n",
" | \n",
"
\n",
" \n",
" \n",
" \n",
" Lionel Andrés Messi Cuccittini | \n",
" 560000 | \n",
" 103500000 | \n",
" 93 | \n",
" 34 | \n",
" Argentina | \n",
" 93 | \n",
" 5 | \n",
"
\n",
" \n",
" Kevin De Bruyne | \n",
" 370000 | \n",
" 129000000 | \n",
" 91 | \n",
" 30 | \n",
" Belgium | \n",
" 91 | \n",
" 4 | \n",
"
\n",
" \n",
" Karim Benzema | \n",
" 350000 | \n",
" 83500000 | \n",
" 89 | \n",
" 34 | \n",
" France | \n",
" 89 | \n",
" 4 | \n",
"
\n",
" \n",
" Eden Hazard | \n",
" 350000 | \n",
" 89500000 | \n",
" 88 | \n",
" 30 | \n",
" Belgium | \n",
" 88 | \n",
" 4 | \n",
"
\n",
" \n",
" Carlos Henrique Venancio Casimiro | \n",
" 310000 | \n",
" 90500000 | \n",
" 89 | \n",
" 29 | \n",
" Brazil | \n",
" 89 | \n",
" 3 | \n",
"
\n",
" \n",
" Toni Kroos | \n",
" 310000 | \n",
" 87500000 | \n",
" 88 | \n",
" 31 | \n",
" Germany | \n",
" 88 | \n",
" 4 | \n",
"
\n",
" \n",
" Sergio Ramos García | \n",
" 300000 | \n",
" 33500000 | \n",
" 89 | \n",
" 35 | \n",
" Spain | \n",
" 89 | \n",
" 4 | \n",
"
\n",
" \n",
" Sergio Leonel Agüero del Castillo | \n",
" 300000 | \n",
" 83500000 | \n",
" 89 | \n",
" 33 | \n",
" Argentina | \n",
" 89 | \n",
" 4 | \n",
"
\n",
" \n",
" Antoine Griezmann | \n",
" 290000 | \n",
" 79500000 | \n",
" 87 | \n",
" 30 | \n",
" France | \n",
" 87 | \n",
" 4 | \n",
"
\n",
" \n",
" Neymar da Silva Santos Júnior | \n",
" 270000 | \n",
" 132000000 | \n",
" 91 | \n",
" 29 | \n",
" Brazil | \n",
" 91 | \n",
" 5 | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" Wage PlayerValue BestOverallRating \\\n",
"PlayerName \n",
"Lionel Andrés Messi Cuccittini 560000 103500000 93 \n",
"Kevin De Bruyne 370000 129000000 91 \n",
"Karim Benzema 350000 83500000 89 \n",
"Eden Hazard 350000 89500000 88 \n",
"Carlos Henrique Venancio Casimiro 310000 90500000 89 \n",
"Toni Kroos 310000 87500000 88 \n",
"Sergio Ramos García 300000 33500000 89 \n",
"Sergio Leonel Agüero del Castillo 300000 83500000 89 \n",
"Antoine Griezmann 290000 79500000 87 \n",
"Neymar da Silva Santos Júnior 270000 132000000 91 \n",
"\n",
" age Nationality PotentialRating \\\n",
"PlayerName \n",
"Lionel Andrés Messi Cuccittini 34 Argentina 93 \n",
"Kevin De Bruyne 30 Belgium 91 \n",
"Karim Benzema 34 France 89 \n",
"Eden Hazard 30 Belgium 88 \n",
"Carlos Henrique Venancio Casimiro 29 Brazil 89 \n",
"Toni Kroos 31 Germany 88 \n",
"Sergio Ramos García 35 Spain 89 \n",
"Sergio Leonel Agüero del Castillo 33 Argentina 89 \n",
"Antoine Griezmann 30 France 87 \n",
"Neymar da Silva Santos Júnior 29 Brazil 91 \n",
"\n",
" InternationalReputations \n",
"PlayerName \n",
"Lionel Andrés Messi Cuccittini 5 \n",
"Kevin De Bruyne 4 \n",
"Karim Benzema 4 \n",
"Eden Hazard 4 \n",
"Carlos Henrique Venancio Casimiro 3 \n",
"Toni Kroos 4 \n",
"Sergio Ramos García 4 \n",
"Sergio Leonel Agüero del Castillo 4 \n",
"Antoine Griezmann 4 \n",
"Neymar da Silva Santos Júnior 5 "
]
},
"execution_count": 57,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"\n",
"player_name = data_fifa[[\"Wage\",\"PlayerName\",\"PlayerValue\",\"BestOverallRating\",'age','Nationality','PotentialRating','InternationalReputations']].nlargest(10, ['Wage']).set_index('PlayerName')\n",
"player_name"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"\n",
"Best GoalKeeper by Reflex
"
]
},
{
"cell_type": "code",
"execution_count": 21,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" Reflexes | \n",
" age | \n",
" Nationality | \n",
" Kicking | \n",
" Handling | \n",
"
\n",
" \n",
" PlayerName | \n",
" | \n",
" | \n",
" | \n",
" | \n",
" | \n",
"
\n",
" \n",
" \n",
" \n",
" Jan Oblak | \n",
" 90 | \n",
" 28 | \n",
" Slovenia | \n",
" 78 | \n",
" 92 | \n",
"
\n",
" \n",
" Marc-André ter Stegen | \n",
" 90 | \n",
" 29 | \n",
" Germany | \n",
" 88 | \n",
" 85 | \n",
"
\n",
" \n",
" Keylor Navas Gamboa | \n",
" 90 | \n",
" 35 | \n",
" Costa Rica | \n",
" 75 | \n",
" 81 | \n",
"
\n",
" \n",
" Hugo Lloris | \n",
" 90 | \n",
" 35 | \n",
" France | \n",
" 68 | \n",
" 82 | \n",
"
\n",
" \n",
" Alisson Ramsés Becker | \n",
" 89 | \n",
" 29 | \n",
" Brazil | \n",
" 85 | \n",
" 88 | \n",
"
\n",
" \n",
" Manuel Neuer | \n",
" 89 | \n",
" 35 | \n",
" Germany | \n",
" 91 | \n",
" 87 | \n",
"
\n",
" \n",
" Samir Handanovič | \n",
" 89 | \n",
" 37 | \n",
" Slovenia | \n",
" 73 | \n",
" 85 | \n",
"
\n",
" \n",
" David De Gea Quintana | \n",
" 89 | \n",
" 31 | \n",
" Spain | \n",
" 78 | \n",
" 81 | \n",
"
\n",
" \n",
" Gianluigi Donnarumma | \n",
" 89 | \n",
" 22 | \n",
" Italy | \n",
" 76 | \n",
" 81 | \n",
"
\n",
" \n",
" Kasper Schmeichel | \n",
" 89 | \n",
" 35 | \n",
" Denmark | \n",
" 83 | \n",
" 77 | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" Reflexes age Nationality Kicking Handling\n",
"PlayerName \n",
"Jan Oblak 90 28 Slovenia 78 92\n",
"Marc-André ter Stegen 90 29 Germany 88 85\n",
"Keylor Navas Gamboa 90 35 Costa Rica 75 81\n",
"Hugo Lloris 90 35 France 68 82\n",
"Alisson Ramsés Becker 89 29 Brazil 85 88\n",
"Manuel Neuer 89 35 Germany 91 87\n",
"Samir Handanovič 89 37 Slovenia 73 85\n",
"David De Gea Quintana 89 31 Spain 78 81\n",
"Gianluigi Donnarumma 89 22 Italy 76 81\n",
"Kasper Schmeichel 89 35 Denmark 83 77"
]
},
"execution_count": 21,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"\n",
"player_name = data_fifa[[\"Reflexes\",\"PlayerName\",'age','Nationality','Kicking','Handling']].nlargest(10, ['Reflexes']).set_index('PlayerName')\n",
"player_name"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.1"
},
"widgets": {
"application/vnd.jupyter.widget-state+json": {
"state": {},
"version_major": 2,
"version_minor": 0
}
}
},
"nbformat": 4,
"nbformat_minor": 4
}