{ "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", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
int_player_idstr_player_namestr_positionsdt_date_of_birthint_heightint_weightint_overall_ratingint_potential_ratingstr_best_positionint_best_overall_rating...int_international_reputationsstr_work_ratestr_body_typeint_dribblingint_curveint_fk_accuracyint_long_passingint_ball_controlstr_player_specialitystr_trait
1197311974Thijmen Joel Sander NijhuisGK7/25/1998196836470GK64...1Medium/ MediumLean (185+)1114122314NaNNaN
112113Nicolás Alejandro TagliaficoLB8/31/1992172658484LB84...3High/ HighNormal (170-185)7368406777NaN['Solid Player', 'Power Header', 'Team Player']
48934894Nana Opoku AmpomahLM, ST1/2/1996175687074RM71...1High/ MediumNormal (170-185)7659345373NaN['Long Shot Taker (AI)', 'Speed Dribbler (AI)']
88268826Terrence Anthony BoydST2/16/1991188826666ST66...1Medium/ LowNormal (185+)5642343362NaNNaN
6061David Josué Jiménez SilvaCAM, CM1/8/1986173678686CAM86...4High/ MediumNormal (170-185)8682778491['Dribbler', 'Playmaker\\xa0', 'Complete Midfie...['Finesse Shot', 'Flair', 'Playmaker (AI)', 'O...
1642616427Milan ObradovićCB12/27/1999189815870CB60...1Medium/ HighNormal (185+)5042334342NaNNaN
1222112222Manuel SchwenkLM, LW, CAM3/7/1992178776363LM63...1Medium/ MediumNormal (170-185)6650415464NaN['Injury Prone']
34433444Saúl Savin Salcedo ZárateCB8/29/1997183757283CB74...1Medium/ HighNormal (170-185)4733294854NaNNaN
\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", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
29821491891781242
PlayerNameNuno Miguel da Costa JóiaMiguel Angel Vargas MañanJavier Alván Salas SalazarJohn Brooks
PlayerHeight182183183193
PlayerWeight70817378
PotentialRating73686778
BestPositionsCFGKCMCB
BestOverallRating74606778
PlayerValue300000047500010000008000000
Wage43000500300037000
NationalityCape VerdeChileMexicoUnited States
Crossing63185836
FinishingAccuracy74195139
HeadingAccuracy74184782
ShortPassing72387272
Volleys61155432
DefensiveAwareness15165575
StandingTackle17226178
SlidingTackle20185875
Diving1459128
Handling1557107
Kicking7581610
GkPositioning1258119
Reflexes6621110
Aggression48377375
Interceptions37266476
Positioning76196040
Vision67296457
Penalties69255945
Composure64465681
Acceleration77486663
SprintSpeed78516379
Agility79386556
Reactions68616273
Balance74286151
ShotPower73446450
JumpingPower81624372
Stamina65427261
Strength62717383
LongShots68205529
PreferredFootRightRightRightLeft
WeakFoot3233
SkillMoves3132
InternationalReputations1112
WorkRateMedium/ MediumMedium/ MediumMedium/ MediumMedium/ High
BodyTypeLean (170-185)Normal (170-185)Lean (170-185)Normal (185+)
Dribbling76226465
Curve52195430
FreekickAccuracy46204228
LongPassing54317274
BallControl78216864
month2681
age30252828
\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", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
PlayerHeightPlayerWeightPotentialRatingBestOverallRatingPlayerValueWageCrossingFinishingAccuracyHeadingAccuracyShortPassing...WeakFootSkillMovesInternationalReputationsDribblingCurveFreekickAccuracyLongPassingBallControlmonthage
count19002.00000019002.00000019002.00000019002.00000019002.00000019002.00000019002.00000019002.00000019002.00000019002.000000...19002.00000019002.00000019002.00000019002.00000019002.00000019002.00000019002.00000019002.00000019002.00000019002.000000
mean181.22566075.04631171.14893266.7842862891449.0053689113.16703549.69045445.87732951.97005658.808494...2.9422172.3655401.09056955.60746247.27160342.39443252.77997158.5524165.83612326.592464
std6.8474727.0783786.1153526.7339267733189.30588419735.32423818.14151419.58087917.32364714.517060...0.6695680.7666870.35901918.78689418.21732517.24039915.17260116.5801203.4469354.715048
min155.00000050.00000048.00000048.0000000.0000000.0000006.0000003.0000005.0000007.000000...1.0000001.0000001.0000005.0000004.0000005.0000005.0000005.0000001.00000018.000000
25%176.00000070.00000067.00000062.000000475000.0000001000.00000038.00000030.00000044.00000054.000000...3.0000002.0000001.00000049.00000035.00000031.00000043.00000054.0000003.00000023.000000
50%181.00000075.00000071.00000067.000000950000.0000003000.00000054.00000050.00000055.00000062.000000...3.0000002.0000001.00000061.00000049.00000041.00000056.00000063.0000005.00000026.000000
75%186.00000080.00000075.00000071.0000002000000.0000008000.00000063.00000062.00000064.00000068.000000...3.0000003.0000001.00000068.00000061.00000055.00000064.00000069.0000009.00000030.000000
max206.000000110.00000095.00000093.000000185500000.000000560000.00000094.00000095.00000093.00000094.000000...5.0000005.0000005.00000096.00000094.00000094.00000093.00000096.00000012.00000054.000000
\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", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
AccelerationBestPositionsageNationalitySprintSpeed
PlayerName
Adama Traoré Diarra97RM25Spain96
Kylian Mbappé Lottin96ST23France96
Raheem Shaquille Sterling96LW27England90
Moussa Diaby96LM22France90
Alphonso Davies96LB21Canada96
Daniel James96RM24Wales95
Jérémy Doku96RW19Belgium91
\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", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
PlayerHeightPlayerWeightBestPositionsageNationality
PlayerName
Tomáš Holý206102GK30Czech Republic
Costel Fane Pantilimon20396GK34Romania
Abdoul Bocar Bâ20394CB27Mauritania
Aaron James Chapman20392GK31England
Vanja Milinković-Savić20292GK24Serbia
Kjell Scherpen20285GK21Netherlands
Stefan Maierhofer20298ST39Austria
Demba Thiam Ngagne20287GK23Senegal
Lovre Kalinić20199GK31Croatia
Fraser Forster20193GK33England
\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", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
DefensiveAwarenessBestPositionsageNationality
PlayerName
Giorgio Chiellini94CB37Italy
Virgil van Dijk93CB30Netherlands
Milan Škriniar92CB26Slovakia
Kalidou Koulibaly91CB30Senegal
Mats Hummels90CB33Germany
Clément Nicolas Laurent Lenglet90CB26France
Leonardo Bonucci90CB34Italy
Diego Roberto Godín Leal90CB35Uruguay
N'Golo Kanté89CDM30France
Aymeric Laporte89CB27France
\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", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
StrengthPlayerHeightStaminaageNationalityPlayerWeightBestPositions
PlayerName
Adebayo Akinfenwa971786539England110ST
Daryl Dike961885921United States100ST
Romelu Lukaku Menama951917328Belgium94ST
Armando Jesús Méndez Alcorta951767925Uruguay82RB
Aleksandar Vukotić952016126Serbia95CB
Joyskim Aurélien Dawa Tchakonte951946625Cameroon95CB
Kalidou Koulibaly941877030Senegal89CB
\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", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
LongPassingShortPassingStaminaageNationalityPlayerWeightBestPositions
PlayerName
Kevin De Bruyne93948930Belgium70CAM
Toni Kroos93937531Germany76CM
Lionel Andrés Messi Cuccittini91917234Argentina72RW
Paul Pogba91868328France84CM
Daniel Parejo Muñoz90927832Spain74CM
Trent Alexander-Arnold89858823England69RB
Luka Modrić89918336Croatia66CM
Marco Verratti89907629Italy60CM
Hakim Ziyech89868028Morocco65CAM
Luis Alberto Romero Alconchel89907529Spain74CAM
\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", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
ShortPassingLongPassingStaminaageNationalityPlayerWeightBestPositions
PlayerName
Kevin De Bruyne94938930Belgium70CAM
Toni Kroos93937531Germany76CM
David Josué Jiménez Silva92847035Spain67CAM
Daniel Parejo Muñoz92907832Spain74CM
Lionel Andrés Messi Cuccittini91917234Argentina72RW
Luka Modrić91898336Croatia66CM
Marco Verratti90897629Italy60CM
Frenkie de Jong90869024Netherlands74CM
Luis Alberto Romero Alconchel90897529Spain74CAM
Christian Dannemann Eriksen90879229Denmark76CAM
\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", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
WagePlayerValueBestOverallRatingageNationalityPotentialRatingInternationalReputations
PlayerName
Lionel Andrés Messi Cuccittini5600001035000009334Argentina935
Kevin De Bruyne3700001290000009130Belgium914
Karim Benzema350000835000008934France894
Eden Hazard350000895000008830Belgium884
Carlos Henrique Venancio Casimiro310000905000008929Brazil893
Toni Kroos310000875000008831Germany884
Sergio Ramos García300000335000008935Spain894
Sergio Leonel Agüero del Castillo300000835000008933Argentina894
Antoine Griezmann290000795000008730France874
Neymar da Silva Santos Júnior2700001320000009129Brazil915
\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", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
ReflexesageNationalityKickingHandling
PlayerName
Jan Oblak9028Slovenia7892
Marc-André ter Stegen9029Germany8885
Keylor Navas Gamboa9035Costa Rica7581
Hugo Lloris9035France6882
Alisson Ramsés Becker8929Brazil8588
Manuel Neuer8935Germany9187
Samir Handanovič8937Slovenia7385
David De Gea Quintana8931Spain7881
Gianluigi Donnarumma8922Italy7681
Kasper Schmeichel8935Denmark8377
\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 }