{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
""
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Unification of Aggregated Seasonal Football Datasets\n",
"##### Notebook to join the scraped and engineered player datasets inclduing the performance dataset from [FBref](https://fbref.com/en/) (provided by [StatsBomb](https://statsbomb.com/)), [TransferMarkt](https://www.transfermarkt.co.uk/) bio, status, historical player values, and [recorded transfer](https://github.com/ewenme/transfers) datasets, and player salaries dataset from [Capology](https://www.capology.com/), through the [record-linkage](https://pypi.org/project/recordlinkage/) library, to create one, unified source of information, that can be used for for further analysis of players performance statistics and financial valuations.\n",
"\n",
"### By [Edd Webster](https://www.twitter.com/eddwebster)\n",
"Notebook first written: 03/08/2021
\n",
"Notebook last updated: 03/11/2021\n",
"\n",
"![title](../../img/logos/fbref-logo-banner.png)\n",
"\n",
"![title](../../img/logos/stats-bomb-logo.png)\n",
"\n",
"![title](../../img/logos/transfermarkt-logo-banner.png)\n",
"\n",
"![title](../../img/logos/capology-logo.jpeg)\n",
"\n",
"Click [here](#section5) to jump straight to the Exploratory Data Analysis section and skip the [Task Brief](#section2), [Data Sources](#section3), and [Data Engineering](#section4) sections. Or click [here](#section6) to jump straight to the Conclusion."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"___\n",
"\n",
"\n",
"\n",
"## Introduction\n",
"This notebook joins datasets scraped from [FBref](https://fbref.com/en/) provided by [StatsBomb](https://statsbomb.com/), [TransferMarkt](https://www.transfermarkt.co.uk/) estimated player values and [recorded transfer](https://github.com/ewenme/transfers) datasets, and player salaries dataset from [Capology](https://www.capology.com/), through the [record-linkage](https://pypi.org/project/recordlinkage/) library, to create one, unified source of information, that can be used for for further analysis of players performance statistics and financial valuations.\n",
"\n",
"For more information about this notebook and the author, I'm available through all the following channels:\n",
"* [eddwebster.com](https://www.eddwebster.com/);\n",
"* edd.j.webster@gmail.com;\n",
"* [@eddwebster](https://www.twitter.com/eddwebster);\n",
"* [linkedin.com/in/eddwebster](https://www.linkedin.com/in/eddwebster/);\n",
"* [github/eddwebster](https://github.com/eddwebster/);\n",
"* [public.tableau.com/profile/edd.webster](https://public.tableau.com/profile/edd.webster);\n",
"* [kaggle.com/eddwebster](https://www.kaggle.com/eddwebster); and\n",
"* [hackerrank.com/eddwebster](https://www.hackerrank.com/eddwebster).\n",
"\n",
"![title](../../img/fifa21eddwebsterbanner.png)\n",
"\n",
"The accompanying GitHub repository for this notebook can be found [here](https://github.com/eddwebster/football_analytics) and a static version of this notebook can be found [here](https://nbviewer.jupyter.org/github/eddwebster/football_analytics/blob/master/notebooks/4_data_unification/Player%20Golden%20ID%20of%20Football%20Datasets.ipynb)."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"___\n",
"\n",
"\n",
"\n",
"## Notebook Contents\n",
"1. [Notebook Dependencies](#section1)
\n",
"2. [Project Brief](#section2)
\n",
"3. [Data Sources](#section3)
\n",
" 1. [Introduction](#section3.1)
\n",
" 2. [Read in CSV files as pandas DataFrames](#section3.2)
\n",
" 3. [Initial Data Handling](#section3.3)
\n",
"4. [Data Engineering](#section4)
\n",
" 1. [FBref-TransferMarkt Mapping (URLs)](#section4.1)
\n",
" 2. [FBref Players](#section4.2)
\n",
" 3. [TransferMarkt Bio and Status](#section4.3)
\n",
" 4. [TransferMarkt Historical Player Valuations](#section4.4)
\n",
" 5. [TransferMarkt Recorded Transfers](#section4.5)
\n",
" 6. [Capology Player Salaries](#section4.6)
\n",
"5. [Data Unification](#section5)
\n",
" 1. [Introduction](#section5.1)
\n",
" 2. [About Record Linkage](#section5.2)
\n",
" 3. [Unify Datasets](#section5.3)
\n",
" 4. [Reorder Columns](#section5.4)
\n",
"6. [Data Export](#section6)
\n",
"7. [Summary](#section7)
\n",
"8. [Next Steps](#section8)
\n",
"9. [Bibliography](#section9)
"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"___\n",
"\n",
"\n",
"\n",
"## 1. Notebook Dependencies\n",
"This notebook was written using [Python 3](https://docs.python.org/3.7/) and requires the following libraries:\n",
"* [`Jupyter notebooks`](https://jupyter.org/) for this notebook environment with which this project is presented;\n",
"* [`NumPy`](http://www.numpy.org/) for multidimensional array computing;\n",
"* [`pandas`](http://pandas.pydata.org/) for data analysis and manipulation; and\n",
"* [`record-linkage`](https://pypi.org/project/recordlinkage/) for joining of fuzzy datasets.\n",
"\n",
"All packages used for this notebook except for BeautifulSoup can be obtained by downloading and installing the [Conda](https://anaconda.org/anaconda/conda) distribution, available on all platforms (Windows, Linux and Mac OSX). Step-by-step guides on how to install Anaconda can be found for Windows [here](https://medium.com/@GalarnykMichael/install-python-on-windows-anaconda-c63c7c3d1444) and Mac [here](https://medium.com/@GalarnykMichael/install-python-on-mac-anaconda-ccd9f2014072), as well as in the Anaconda documentation itself [here](https://docs.anaconda.com/anaconda/install/)."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Import Libraries and Modules"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Setup Complete\n"
]
}
],
"source": [
"# Python ≥3.5 (ideally)\n",
"import platform\n",
"import sys, getopt\n",
"assert sys.version_info >= (3, 5)\n",
"import csv\n",
"\n",
"# Import Dependencies\n",
"%matplotlib inline\n",
"\n",
"# Math Operations\n",
"import numpy as np\n",
"from math import pi\n",
"\n",
"# Datetime\n",
"import datetime\n",
"from datetime import date\n",
"import time\n",
"\n",
"# Data Preprocessing\n",
"import pandas as pd\n",
"#import pandas_profiling as pp\n",
"import os\n",
"import re\n",
"import chardet\n",
"import random\n",
"from io import BytesIO\n",
"from pathlib import Path\n",
"\n",
"# Reading Directories\n",
"import glob\n",
"import os\n",
"\n",
"# Working with JSON\n",
"import json\n",
"from pandas.io.json import json_normalize\n",
"\n",
"# Web Scraping\n",
"import requests\n",
"from bs4 import BeautifulSoup\n",
"import re\n",
"\n",
"# Fuzzy Matching - Record Linkage\n",
"import recordlinkage\n",
"import jellyfish\n",
"import numexpr as ne\n",
"\n",
"# Data Visualisation\n",
"import matplotlib as mpl\n",
"import matplotlib.pyplot as plt\n",
"import seaborn as sns\n",
"plt.style.use('seaborn-whitegrid')\n",
"import missingno as msno\n",
"\n",
"# Progress Bar\n",
"from tqdm import tqdm\n",
"\n",
"# Display in Jupyter\n",
"from IPython.display import Image, YouTubeVideo\n",
"from IPython.core.display import HTML\n",
"\n",
"# Ignore Warnings\n",
"import warnings\n",
"warnings.filterwarnings(action=\"ignore\", message=\"^internal gelsd\")\n",
"\n",
"print(\"Setup Complete\")"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {
"scrolled": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Python: 3.7.6\n",
"NumPy: 1.20.3\n",
"pandas: 1.3.2\n",
"matplotlib: 3.4.2\n"
]
}
],
"source": [
"# Python / module versions used here for reference\n",
"print('Python: {}'.format(platform.python_version()))\n",
"print('NumPy: {}'.format(np.__version__))\n",
"print('pandas: {}'.format(pd.__version__))\n",
"print('matplotlib: {}'.format(mpl.__version__))"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Defined Variables"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [],
"source": [
"# Define today's date\n",
"today = datetime.datetime.now().strftime('%d/%m/%Y').replace('/', '')"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Defined Dictionaries"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [],
"source": [
"# Define seasons\n",
"dict_seasons = {'2016-2017': '2016/2017',\n",
" '2017-2018': '2017/2018',\n",
" '2018-2019': '2018/2019',\n",
" '2019-2020': '2019/2020',\n",
" '2020-2021': '2020/2021',\n",
" '2021-2022': '2021/2022'\n",
" }"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Define Data Paths"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {
"scrolled": true
},
"outputs": [],
"source": [
"# Set up initial paths to subfolders\n",
"base_dir = os.path.join('..', '..')\n",
"data_dir = os.path.join(base_dir, 'data')\n",
"data_dir_fbref = os.path.join(base_dir, 'data', 'fbref')\n",
"data_dir_tm = os.path.join(base_dir, 'data', 'tm')\n",
"data_dir_capology = os.path.join(base_dir, 'data', 'capology')\n",
"data_dir_guardian = os.path.join(base_dir, 'data', 'guardian')\n",
"img_dir = os.path.join(base_dir, 'img')\n",
"fig_dir = os.path.join(base_dir, 'img', 'fig')\n",
"video_dir = os.path.join(base_dir, 'video')"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Notebook Settings"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {},
"outputs": [],
"source": [
"pd.set_option('display.max_columns', None)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"---\n",
"\n",
"\n",
"\n",
"## 2. Project Brief"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### 2.1. About this notebook\n",
"This Jupyter notebook is part of a series of notebooks, to scrape, parse, engineer, and unify datasets, that can be used for modeling purposes.\n",
"\n",
"This particular notebook is the **data unification** notebook, that joins data from [FBref](https://fbref.com/en/) (provided by [StatsBomb](https://statsbomb.com/)), [TransferMarkt](https://www.transfermarkt.co.uk/), and [Capology](https://www.capology.com/), using [RecordLinkage].\n",
"\n",
"This notebook, along with the other notebooks in this project workflow are shown in the following diagram:\n",
"\n",
"![roadmap](../../img/football_analytics_data_roadmap.png)\n",
"\n",
"Links to these notebooks in the [`football_analytics`](https://github.com/eddwebster/football_analytics) GitHub repository can be found at the following:\n",
"* [1. Webscraping](https://github.com/eddwebster/football_analytics/tree/master/notebooks/1_data_scraping)\n",
" + [FBref Player Stats Webscraping](https://github.com/eddwebster/football_analytics/blob/master/notebooks/1_data_scraping/FBref%20Player%20Stats%20Web%20Scraping.ipynb)\n",
" + [TransferMarket Player Bio and Status Webscraping](https://github.com/eddwebster/football_analytics/blob/master/notebooks/1_data_scraping/TransferMarkt%20Player%20Bio%20and%20Status%20Web%20Scraping.ipynb)\n",
" + [TransferMarket Player Valuation Webscraping](https://github.com/eddwebster/football_analytics/blob/master/notebooks/1_data_scraping/TransferMarkt%20Player%20Valuation%20Web%20Scraping.ipynb)\n",
" + [TransferMarkt Player Recorded Transfer Fees Webscraping](https://github.com/eddwebster/football_analytics/blob/master/notebooks/1_data_scraping/TransferMarkt%20Player%20Recorded%20Transfer%20Fees%20Webscraping.ipynb)\n",
" + [Capology Player Salary Webscraping](https://github.com/eddwebster/football_analytics/blob/master/notebooks/1_data_scraping/Capology%20Player%20Salary%20Web%20Scraping.ipynb)\n",
" + [FBref Team Stats Webscraping](https://github.com/eddwebster/football_analytics/blob/master/notebooks/1_data_scraping/FBref%20Team%20Stats%20Web%20Scraping.ipynb)\n",
"* [2. Data Parsing](https://github.com/eddwebster/football_analytics/tree/master/notebooks/2_data_parsing)\n",
" + [ELO Team Ratings Data Parsing](https://github.com/eddwebster/football_analytics/blob/master/notebooks/2_data_parsing/ELO%20Team%20Ratings%20Data%20Parsing.ipynb)\n",
"* [3. Data Engineering](https://github.com/eddwebster/football_analytics/tree/master/notebooks/3_data_engineering)\n",
" + [FBref Player Stats Data Engineering](https://github.com/eddwebster/football_analytics/blob/master/notebooks/3_data_engineering/FBref%20Player%20Stats%20Data%20Engineering.ipynb)\n",
" + [TransferMarket Player Bio and Status Data Engineering](https://github.com/eddwebster/football_analytics/blob/master/notebooks/3_data_engineering/TransferMarkt%20Player%20Bio%20and%20Status%20Data%20Engineering.ipynb)\n",
" + [TransferMarket Player Valuation Data Engineering](https://github.com/eddwebster/football_analytics/blob/master/notebooks/3_data_engineering/TransferMarkt%20Player%20Valuation%20Data%20Engineering.ipynb)\n",
" + [TransferMarkt Player Recorded Transfer Fees Data Engineering](https://github.com/eddwebster/football_analytics/blob/master/notebooks/3_data_engineering/TransferMarkt%20Player%20Recorded%20Transfer%20Fees%20Data%20Engineering.ipynb)\n",
" + [Capology Player Salary Data Engineering](https://github.com/eddwebster/football_analytics/blob/master/notebooks/3_data_engineering/Capology%20Player%20Salary%20Data%20Engineering.ipynb)\n",
" + [FBref Team Stats Data Engineering](https://github.com/eddwebster/football_analytics/blob/master/notebooks/3_data_engineering/FBref%20Team%20Stats%20Data%20Engineering.ipynb)\n",
" + [ELO Team Ratings Data Parsing](https://github.com/eddwebster/football_analytics/blob/master/notebooks/3_data_engineering/ELO%20Team%20Ratings%20Data%20Parsing.ipynb)\n",
" + [TransferMarkt Team Recorded Transfer Fee Data Engineering](https://github.com/eddwebster/football_analytics/blob/master/notebooks/3_data_engineering/TransferMarkt%20Team%20Recorded%20Transfer%20Fee%20Data%20Engineering.ipynb) (aggregated from [TransferMarkt Player Recorded Transfer Fees notebook](https://github.com/eddwebster/football_analytics/blob/master/notebooks/3_data_engineering/TransferMarkt%20Player%20Recorded%20Transfer%20Fees%20Data%20Engineering.ipynb))\n",
" + [Capology Team Salary Data Engineering](https://github.com/eddwebster/football_analytics/blob/master/notebooks/3_data_engineering/Capology%20Team%20Salary%20Data%20Engineering.ipynb) (aggregated from [Capology Player Salary notebook](https://github.com/eddwebster/football_analytics/blob/master/notebooks/3_data_engineering/Capology%20Player%20Salary%20Data%20Engineering.ipynb))\n",
"* [4. Data Unification](https://github.com/eddwebster/football_analytics/tree/master/notebooks/4_data_unification)\n",
"* [5. Modeling and Data Analysis]()\n",
"\n",
"**Notebook Conventions**:
\n",
"* Variables that refer a `DataFrame` object are prefixed with `df_`.\n",
"* Variables that refer to a collection of `DataFrame` objects (e.g., a list, a set or a dict) are prefixed with `dfs_`."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"---\n",
"\n",
"\n",
"\n",
"## 3. Data Sources"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### 3.1. Read in CSV files as pandas DataFrames\n",
"The following cells read in the `CSV` files as a pandas `DataFrame`s"
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {},
"outputs": [],
"source": [
"# Import data as a pandas DataFrames\n",
"\n",
"## FBref-TransferMarkt Player Mapping (including page URLs and positions) by Jason Ziv and rahul Iyer\n",
"\n",
"### Define file location\n",
"file = data_dir + '/reference/player_mapping/fbref_to_tm_mapping_latest.csv'\n",
"\n",
"###\n",
"with open(file, 'rb') as rawdata:\n",
" result = chardet.detect(rawdata.read(100000))\n",
"\n",
"### Read in dataset\n",
"df_fbref_tm_urls = pd.read_csv(file, encoding='ISO-8859-1')\n",
"\n",
"\n",
"## FBref Player Performance data\n",
"df_fbref_players = pd.read_csv(data_dir_fbref + '/engineered/outfield-goalkeeper-combined/fbref_outfield_player_goalkeeper_stats_combined_latest.csv')\n",
"\n",
"\n",
"## TransferMarkt Player Bio-Status data\n",
"df_tm_bio_status = pd.read_csv(data_dir_tm + '/engineered/bio-status/tm_player_bio_status_all_1617-2122_latest.csv')\n",
"\n",
"\n",
"## TransferMarkt Player Historical Market Values data\n",
"df_tm_valuations = pd.read_csv(data_dir_tm + '/engineered/historical_market_values/tm_player_valuations_all_1617-2122_latest.csv')\n",
"\n",
"\n",
"## TransferMarkt Player Recorded Transfer History data\n",
"df_tm_transfers = pd.read_csv(data_dir_tm + '/engineered/transfer_history/tm_player_transfer_history_latest.csv')\n",
"\n",
"\n",
"## Capology Player Salary data\n",
"df_capology = pd.read_csv(data_dir_capology + '/engineered/capology_big5_mls_latest.csv')\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"\n",
"\n",
"### 3.3. Initial Data Handling"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"#### FBref to TM Player Mapping\n",
"Source: https://github.com/JaseZiv/worldfootballR_data/blob/master/raw-data/fbref-tm-player-mapping/output/fbref_to_tm_mapping.csv"
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"
\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" PlayerFBref | \n",
" UrlFBref | \n",
" UrlTmarkt | \n",
" TmPos | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" Aaron Connolly | \n",
" https://fbref.com/en/players/27c01749/Aaron-Co... | \n",
" https://www.transfermarkt.com/aaron-connolly/p... | \n",
" Centre-Forward | \n",
"
\n",
" \n",
" 1 | \n",
" Aaron Cresswell | \n",
" https://fbref.com/en/players/4f974391/Aaron-Cr... | \n",
" https://www.transfermarkt.com/aaron-cresswell/... | \n",
" Left-Back | \n",
"
\n",
" \n",
" 2 | \n",
" Aarón Escandell | \n",
" https://fbref.com/en/players/67669ce7/Aaron-Es... | \n",
" https://www.transfermarkt.com/aaron-escandell/... | \n",
" Goalkeeper | \n",
"
\n",
" \n",
" 3 | \n",
" Aaron Herzog | \n",
" https://fbref.com/en/players/565c3fe4/Aaron-He... | \n",
" https://www.transfermarkt.com/aaron-herzog/pro... | \n",
" Attacking Midfield | \n",
"
\n",
" \n",
" 4 | \n",
" Aaron Hickey | \n",
" https://fbref.com/en/players/1780bb4a/Aaron-Hi... | \n",
" https://www.transfermarkt.com/aaron-hickey/pro... | \n",
" Left-Back | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" PlayerFBref UrlFBref \\\n",
"0 Aaron Connolly https://fbref.com/en/players/27c01749/Aaron-Co... \n",
"1 Aaron Cresswell https://fbref.com/en/players/4f974391/Aaron-Cr... \n",
"2 Aarón Escandell https://fbref.com/en/players/67669ce7/Aaron-Es... \n",
"3 Aaron Herzog https://fbref.com/en/players/565c3fe4/Aaron-He... \n",
"4 Aaron Hickey https://fbref.com/en/players/1780bb4a/Aaron-Hi... \n",
"\n",
" UrlTmarkt TmPos \n",
"0 https://www.transfermarkt.com/aaron-connolly/p... Centre-Forward \n",
"1 https://www.transfermarkt.com/aaron-cresswell/... Left-Back \n",
"2 https://www.transfermarkt.com/aaron-escandell/... Goalkeeper \n",
"3 https://www.transfermarkt.com/aaron-herzog/pro... Attacking Midfield \n",
"4 https://www.transfermarkt.com/aaron-hickey/pro... Left-Back "
]
},
"execution_count": 8,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"df_fbref_tm_urls.head()"
]
},
{
"cell_type": "code",
"execution_count": 9,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"(6300, 4)"
]
},
"execution_count": 9,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"df_fbref_tm_urls.shape"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"#### FBref Players"
]
},
{
"cell_type": "code",
"execution_count": 10,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" Player | \n",
" Nation | \n",
" Pos | \n",
" Squad | \n",
" Comp | \n",
" Age | \n",
" Born | \n",
" MP | \n",
" Starts | \n",
" Min | \n",
" 90s | \n",
" Gls | \n",
" Ast | \n",
" G-PK | \n",
" PK | \n",
" PKatt | \n",
" CrdY | \n",
" CrdR | \n",
" Gls.1 | \n",
" Ast.1 | \n",
" G+A | \n",
" G-PK.1 | \n",
" G+A-PK | \n",
" xG | \n",
" npxG | \n",
" xA | \n",
" npxG+xA | \n",
" xG.1 | \n",
" xA.1 | \n",
" xG+xA | \n",
" npxG.1 | \n",
" npxG+xA.1 | \n",
" Matches | \n",
" Sh | \n",
" SoT | \n",
" SoT% | \n",
" Sh/90 | \n",
" SoT/90 | \n",
" G/Sh | \n",
" G/SoT | \n",
" Dist | \n",
" FK | \n",
" npxG/Sh | \n",
" G-xG | \n",
" np:G-xG | \n",
" Cmp | \n",
" Att | \n",
" Cmp% | \n",
" TotDist | \n",
" PrgDist | \n",
" Cmp.1 | \n",
" Att.1 | \n",
" Cmp%.1 | \n",
" Cmp.2 | \n",
" Att.2 | \n",
" Cmp%.2 | \n",
" Cmp.3 | \n",
" Att.3 | \n",
" Cmp%.3 | \n",
" A-xA | \n",
" KP | \n",
" 1/3 | \n",
" PPA | \n",
" CrsPA | \n",
" Prog | \n",
" Live | \n",
" Dead | \n",
" TB | \n",
" Press | \n",
" Sw | \n",
" Crs | \n",
" CK | \n",
" In | \n",
" Out | \n",
" Str | \n",
" Ground | \n",
" Low | \n",
" High | \n",
" Left | \n",
" Right | \n",
" Head | \n",
" TI | \n",
" Other | \n",
" Off | \n",
" Out.1 | \n",
" Int | \n",
" Blocks | \n",
" SCA | \n",
" SCA90 | \n",
" PassLive | \n",
" PassDead | \n",
" Drib | \n",
" Fld | \n",
" Def | \n",
" GCA | \n",
" GCA90 | \n",
" PassLive.1 | \n",
" PassDead.1 | \n",
" Drib.1 | \n",
" Sh.1 | \n",
" Fld.1 | \n",
" Def.1 | \n",
" Tkl | \n",
" TklW | \n",
" Def 3rd | \n",
" Mid 3rd | \n",
" Att 3rd | \n",
" Tkl.1 | \n",
" Tkl% | \n",
" Past | \n",
" Succ | \n",
" % | \n",
" Def 3rd.1 | \n",
" Mid 3rd.1 | \n",
" Att 3rd.1 | \n",
" ShSv | \n",
" Pass | \n",
" Tkl+Int | \n",
" Clr | \n",
" Err | \n",
" Touches | \n",
" Def Pen | \n",
" Att Pen | \n",
" Succ% | \n",
" #Pl | \n",
" Megs | \n",
" Carries | \n",
" CPA | \n",
" Mis | \n",
" Dis | \n",
" Targ | \n",
" Rec | \n",
" Rec% | \n",
" Prog.1 | \n",
" Mn/MP | \n",
" Min% | \n",
" Mn/Start | \n",
" Compl | \n",
" Subs | \n",
" Mn/Sub | \n",
" unSub | \n",
" PPM | \n",
" onG | \n",
" onGA | \n",
" +/- | \n",
" +/-90 | \n",
" On-Off | \n",
" onxG | \n",
" onxGA | \n",
" xG+/- | \n",
" xG+/-90 | \n",
" On-Off.1 | \n",
" 2CrdY | \n",
" Fls | \n",
" PKwon | \n",
" PKcon | \n",
" OG | \n",
" Recov | \n",
" Won | \n",
" Lost | \n",
" Won% | \n",
" League Name | \n",
" League ID | \n",
" Season | \n",
" Team Name | \n",
" Team Country | \n",
" Player Lower | \n",
" First Name Lower | \n",
" Last Name Lower | \n",
" First Initial Lower | \n",
" Team Country Lower | \n",
" Nationality Code | \n",
" Nationality Cleaned | \n",
" Primary Pos | \n",
" Position Grouped | \n",
" Outfielder Goalkeeper | \n",
" GA | \n",
" GA90 | \n",
" SoTA | \n",
" Saves | \n",
" Save% | \n",
" W | \n",
" D | \n",
" L | \n",
" CS | \n",
" CS% | \n",
" PKA | \n",
" PKsv | \n",
" PKm | \n",
" Save%.1 | \n",
" PSxG | \n",
" PSxG/SoT | \n",
" PSxG+/- | \n",
" /90 | \n",
" Thr | \n",
" Launch% | \n",
" AvgLen | \n",
" Launch%.1 | \n",
" AvgLen.1 | \n",
" Opp | \n",
" Stp | \n",
" Stp% | \n",
" #OPA | \n",
" #OPA/90 | \n",
" AvgDist | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" Aaron Cresswell | \n",
" eng ENG | \n",
" DF | \n",
" West Ham | \n",
" Premier League | \n",
" 27 | \n",
" 1989.0 | \n",
" 36 | \n",
" 35 | \n",
" 3069.0 | \n",
" 34.1 | \n",
" 1 | \n",
" 3 | \n",
" 1 | \n",
" 0 | \n",
" 0 | \n",
" 7 | \n",
" 0 | \n",
" 0.03 | \n",
" 0.09 | \n",
" 0.12 | \n",
" 0.03 | \n",
" 0.12 | \n",
" 0.8 | \n",
" 0.8 | \n",
" 2.8 | \n",
" 3.6 | \n",
" 0.02 | \n",
" 0.08 | \n",
" 0.10 | \n",
" 0.02 | \n",
" 0.10 | \n",
" Matches | \n",
" 21.0 | \n",
" 6.0 | \n",
" 28.6 | \n",
" 0.62 | \n",
" 0.18 | \n",
" 0.05 | \n",
" 0.17 | \n",
" 28.1 | \n",
" 8.0 | \n",
" 0.04 | \n",
" 0.2 | \n",
" 0.2 | \n",
" 1224.0 | \n",
" 1708.0 | \n",
" 71.7 | \n",
" 23519.0 | \n",
" 10212.0 | \n",
" 560.0 | \n",
" 623.0 | \n",
" 89.9 | \n",
" 472.0 | \n",
" 587.0 | \n",
" 80.4 | \n",
" 183.0 | \n",
" 449.0 | \n",
" 40.8 | \n",
" 0.2 | \n",
" 35.0 | \n",
" 117.0 | \n",
" 21.0 | \n",
" 14.0 | \n",
" 96.0 | \n",
" 1343.0 | \n",
" 365.0 | \n",
" 1.0 | \n",
" 222.0 | \n",
" 83.0 | \n",
" 93.0 | \n",
" 67.0 | \n",
" 35.0 | \n",
" 15.0 | \n",
" 9.0 | \n",
" 893.0 | \n",
" 293.0 | \n",
" 522.0 | \n",
" 1329.0 | \n",
" 78.0 | \n",
" 59.0 | \n",
" 210.0 | \n",
" 5.0 | \n",
" 15.0 | \n",
" 44.0 | \n",
" 39.0 | \n",
" 52.0 | \n",
" 62.0 | \n",
" 1.82 | \n",
" 35.0 | \n",
" 21.0 | \n",
" 1.0 | \n",
" 3.0 | \n",
" 0.0 | \n",
" 9.0 | \n",
" 0.26 | \n",
" 6.0 | \n",
" 3.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 38.0 | \n",
" 18.0 | \n",
" 15.0 | \n",
" 18.0 | \n",
" 5.0 | \n",
" 17.0 | \n",
" 53.1 | \n",
" 15.0 | \n",
" 115.0 | \n",
" 32.1 | \n",
" 181.0 | \n",
" 123.0 | \n",
" 54.0 | \n",
" 0.0 | \n",
" 38.0 | \n",
" 90.0 | \n",
" 133.0 | \n",
" 0.0 | \n",
" 2050.0 | \n",
" 125.0 | \n",
" 17.0 | \n",
" 33.3 | \n",
" 7.0 | \n",
" 0.0 | \n",
" 1071.0 | \n",
" 2.0 | \n",
" 18.0 | \n",
" 19.0 | \n",
" 1171.0 | \n",
" 1094.0 | \n",
" 93.4 | \n",
" 31.0 | \n",
" 85 | \n",
" 89.7 | \n",
" NaN | \n",
" 30.0 | \n",
" 1 | \n",
" NaN | \n",
" 1 | \n",
" 1.14 | \n",
" 45.0 | \n",
" 60.0 | \n",
" -15.0 | \n",
" -0.44 | \n",
" 0.84 | \n",
" 38.0 | \n",
" 51.5 | \n",
" -13.5 | \n",
" -0.40 | \n",
" 1.09 | \n",
" 0.0 | \n",
" 20 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 277.0 | \n",
" 70.0 | \n",
" 57.0 | \n",
" 55.1 | \n",
" Big-5-European-Leagues | \n",
" Big5 | \n",
" 2017-2018 | \n",
" West Ham | \n",
" England | \n",
" aaron cresswell | \n",
" aaron | \n",
" cresswell | \n",
" a | \n",
" england | \n",
" ENG | \n",
" England | \n",
" DF | \n",
" Defender | \n",
" Outfielder | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
"
\n",
" \n",
" 1 | \n",
" Aaron Hunt | \n",
" de GER | \n",
" MF,FW | \n",
" Hamburger SV | \n",
" Bundeliga | \n",
" 30 | \n",
" 1986.0 | \n",
" 28 | \n",
" 26 | \n",
" 2081.0 | \n",
" 23.1 | \n",
" 3 | \n",
" 2 | \n",
" 2 | \n",
" 1 | \n",
" 1 | \n",
" 1 | \n",
" 0 | \n",
" 0.13 | \n",
" 0.09 | \n",
" 0.22 | \n",
" 0.09 | \n",
" 0.17 | \n",
" 2.8 | \n",
" 2.1 | \n",
" 5.6 | \n",
" 7.6 | \n",
" 0.12 | \n",
" 0.23 | \n",
" 0.35 | \n",
" 0.09 | \n",
" 0.32 | \n",
" Matches | \n",
" 27.0 | \n",
" 6.0 | \n",
" 22.2 | \n",
" 1.17 | \n",
" 0.26 | \n",
" 0.07 | \n",
" 0.33 | \n",
" 23.4 | \n",
" 10.0 | \n",
" 0.08 | \n",
" 0.2 | \n",
" -0.1 | \n",
" 883.0 | \n",
" 1229.0 | \n",
" 71.8 | \n",
" 16889.0 | \n",
" 5315.0 | \n",
" 406.0 | \n",
" 480.0 | \n",
" 84.6 | \n",
" 292.0 | \n",
" 376.0 | \n",
" 77.7 | \n",
" 165.0 | \n",
" 303.0 | \n",
" 54.5 | \n",
" -3.6 | \n",
" 65.0 | \n",
" 83.0 | \n",
" 31.0 | \n",
" 5.0 | \n",
" 97.0 | \n",
" 977.0 | \n",
" 252.0 | \n",
" 11.0 | \n",
" 245.0 | \n",
" 67.0 | \n",
" 66.0 | \n",
" 123.0 | \n",
" 35.0 | \n",
" 41.0 | \n",
" 14.0 | \n",
" 672.0 | \n",
" 236.0 | \n",
" 321.0 | \n",
" 999.0 | \n",
" 137.0 | \n",
" 42.0 | \n",
" 23.0 | \n",
" 9.0 | \n",
" 5.0 | \n",
" 29.0 | \n",
" 29.0 | \n",
" 49.0 | \n",
" 102.0 | \n",
" 4.25 | \n",
" 54.0 | \n",
" 43.0 | \n",
" 1.0 | \n",
" 2.0 | \n",
" 1.0 | \n",
" 6.0 | \n",
" 0.25 | \n",
" 5.0 | \n",
" 1.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 30.0 | \n",
" 22.0 | \n",
" 12.0 | \n",
" 16.0 | \n",
" 2.0 | \n",
" 5.0 | \n",
" 13.5 | \n",
" 32.0 | \n",
" 135.0 | \n",
" 27.9 | \n",
" 102.0 | \n",
" 261.0 | \n",
" 121.0 | \n",
" 0.0 | \n",
" 28.0 | \n",
" 44.0 | \n",
" 21.0 | \n",
" 0.0 | \n",
" 1475.0 | \n",
" 28.0 | \n",
" 68.0 | \n",
" 58.3 | \n",
" 23.0 | \n",
" 4.0 | \n",
" 892.0 | \n",
" 7.0 | \n",
" 45.0 | \n",
" 42.0 | \n",
" 1176.0 | \n",
" 893.0 | \n",
" 75.9 | \n",
" 178.0 | \n",
" 74 | \n",
" 68.0 | \n",
" NaN | \n",
" 14.0 | \n",
" 2 | \n",
" NaN | \n",
" 0 | \n",
" 1.07 | \n",
" 22.0 | \n",
" 34.0 | \n",
" -12.0 | \n",
" -0.52 | \n",
" 0.58 | \n",
" 27.0 | \n",
" 31.3 | \n",
" -4.3 | \n",
" -0.18 | \n",
" 0.94 | \n",
" 0.0 | \n",
" 27 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 213.0 | \n",
" 22.0 | \n",
" 37.0 | \n",
" 37.3 | \n",
" Big-5-European-Leagues | \n",
" Big5 | \n",
" 2017-2018 | \n",
" Hamburger SV | \n",
" Germany | \n",
" aaron hunt | \n",
" aaron | \n",
" hunt | \n",
" a | \n",
" germany | \n",
" GER | \n",
" Germany | \n",
" MF | \n",
" Midfielder | \n",
" Outfielder | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
"
\n",
" \n",
" 2 | \n",
" Aaron Lennon | \n",
" eng ENG | \n",
" MF | \n",
" Burnley | \n",
" Premier League | \n",
" 30 | \n",
" 1987.0 | \n",
" 14 | \n",
" 13 | \n",
" 1118.0 | \n",
" 12.4 | \n",
" 0 | \n",
" 2 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 2 | \n",
" 0 | \n",
" 0.00 | \n",
" 0.16 | \n",
" 0.16 | \n",
" 0.00 | \n",
" 0.16 | \n",
" 0.6 | \n",
" 0.6 | \n",
" 1.4 | \n",
" 2.0 | \n",
" 0.05 | \n",
" 0.11 | \n",
" 0.16 | \n",
" 0.05 | \n",
" 0.16 | \n",
" Matches | \n",
" 10.0 | \n",
" 4.0 | \n",
" 40.0 | \n",
" 0.81 | \n",
" 0.32 | \n",
" 0.00 | \n",
" 0.00 | \n",
" 16.6 | \n",
" 0.0 | \n",
" 0.06 | \n",
" -0.6 | \n",
" -0.6 | \n",
" 204.0 | \n",
" 294.0 | \n",
" 69.4 | \n",
" 3223.0 | \n",
" 887.0 | \n",
" 116.0 | \n",
" 142.0 | \n",
" 81.7 | \n",
" 68.0 | \n",
" 92.0 | \n",
" 73.9 | \n",
" 17.0 | \n",
" 34.0 | \n",
" 50.0 | \n",
" 0.6 | \n",
" 8.0 | \n",
" 11.0 | \n",
" 13.0 | \n",
" 5.0 | \n",
" 22.0 | \n",
" 289.0 | \n",
" 5.0 | \n",
" 0.0 | \n",
" 61.0 | \n",
" 5.0 | \n",
" 19.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 193.0 | \n",
" 51.0 | \n",
" 50.0 | \n",
" 27.0 | \n",
" 250.0 | \n",
" 7.0 | \n",
" 4.0 | \n",
" 3.0 | \n",
" 0.0 | \n",
" 9.0 | \n",
" 8.0 | \n",
" 30.0 | \n",
" 18.0 | \n",
" 1.45 | \n",
" 12.0 | \n",
" 0.0 | \n",
" 1.0 | \n",
" 1.0 | \n",
" 0.0 | \n",
" 3.0 | \n",
" 0.24 | \n",
" 2.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 1.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 18.0 | \n",
" 10.0 | \n",
" 6.0 | \n",
" 11.0 | \n",
" 1.0 | \n",
" 4.0 | \n",
" 19.0 | \n",
" 17.0 | \n",
" 61.0 | \n",
" 26.3 | \n",
" 74.0 | \n",
" 102.0 | \n",
" 56.0 | \n",
" 0.0 | \n",
" 24.0 | \n",
" 31.0 | \n",
" 9.0 | \n",
" 0.0 | \n",
" 424.0 | \n",
" 19.0 | \n",
" 36.0 | \n",
" 48.0 | \n",
" 12.0 | \n",
" 2.0 | \n",
" 290.0 | \n",
" 12.0 | \n",
" 9.0 | \n",
" 25.0 | \n",
" 353.0 | \n",
" 259.0 | \n",
" 73.4 | \n",
" 41.0 | \n",
" 80 | \n",
" 32.7 | \n",
" NaN | \n",
" 6.0 | \n",
" 1 | \n",
" NaN | \n",
" 0 | \n",
" 1.43 | \n",
" 17.0 | \n",
" 15.0 | \n",
" 2.0 | \n",
" 0.16 | \n",
" 0.36 | \n",
" 13.8 | \n",
" 15.4 | \n",
" -1.5 | \n",
" -0.12 | \n",
" 0.49 | \n",
" 0.0 | \n",
" 12 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 80.0 | \n",
" 7.0 | \n",
" 15.0 | \n",
" 31.8 | \n",
" Big-5-European-Leagues | \n",
" Big5 | \n",
" 2017-2018 | \n",
" Burnley | \n",
" England | \n",
" aaron lennon | \n",
" aaron | \n",
" lennon | \n",
" a | \n",
" england | \n",
" ENG | \n",
" England | \n",
" MF | \n",
" Midfielder | \n",
" Outfielder | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
"
\n",
" \n",
" 3 | \n",
" Aaron Lennon | \n",
" eng ENG | \n",
" FW,MF | \n",
" Everton | \n",
" Premier League | \n",
" 30 | \n",
" 1987.0 | \n",
" 15 | \n",
" 9 | \n",
" 793.0 | \n",
" 8.8 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0.00 | \n",
" 0.00 | \n",
" 0.00 | \n",
" 0.00 | \n",
" 0.00 | \n",
" 0.3 | \n",
" 0.3 | \n",
" 0.5 | \n",
" 0.8 | \n",
" 0.04 | \n",
" 0.05 | \n",
" 0.09 | \n",
" 0.04 | \n",
" 0.09 | \n",
" Matches | \n",
" 4.0 | \n",
" 1.0 | \n",
" 25.0 | \n",
" 0.45 | \n",
" 0.11 | \n",
" 0.00 | \n",
" 0.00 | \n",
" 14.8 | \n",
" 0.0 | \n",
" 0.08 | \n",
" -0.3 | \n",
" -0.3 | \n",
" 152.0 | \n",
" 214.0 | \n",
" 71.0 | \n",
" 2286.0 | \n",
" 672.0 | \n",
" 92.0 | \n",
" 115.0 | \n",
" 80.0 | \n",
" 53.0 | \n",
" 69.0 | \n",
" 76.8 | \n",
" 5.0 | \n",
" 13.0 | \n",
" 38.5 | \n",
" -0.5 | \n",
" 5.0 | \n",
" 9.0 | \n",
" 3.0 | \n",
" 2.0 | \n",
" 17.0 | \n",
" 199.0 | \n",
" 15.0 | \n",
" 0.0 | \n",
" 49.0 | \n",
" 2.0 | \n",
" 8.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 129.0 | \n",
" 47.0 | \n",
" 38.0 | \n",
" 29.0 | \n",
" 159.0 | \n",
" 10.0 | \n",
" 14.0 | \n",
" 0.0 | \n",
" 1.0 | \n",
" 3.0 | \n",
" 7.0 | \n",
" 15.0 | \n",
" 16.0 | \n",
" 1.82 | \n",
" 11.0 | \n",
" 0.0 | \n",
" 1.0 | \n",
" 2.0 | \n",
" 0.0 | \n",
" 4.0 | \n",
" 0.45 | \n",
" 2.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 1.0 | \n",
" 1.0 | \n",
" 0.0 | \n",
" 18.0 | \n",
" 10.0 | \n",
" 9.0 | \n",
" 7.0 | \n",
" 2.0 | \n",
" 5.0 | \n",
" 25.0 | \n",
" 15.0 | \n",
" 38.0 | \n",
" 19.3 | \n",
" 49.0 | \n",
" 102.0 | \n",
" 46.0 | \n",
" 0.0 | \n",
" 18.0 | \n",
" 25.0 | \n",
" 9.0 | \n",
" 0.0 | \n",
" 322.0 | \n",
" 7.0 | \n",
" 22.0 | \n",
" 35.0 | \n",
" 8.0 | \n",
" 1.0 | \n",
" 186.0 | \n",
" 8.0 | \n",
" 9.0 | \n",
" 17.0 | \n",
" 288.0 | \n",
" 195.0 | \n",
" 67.7 | \n",
" 33.0 | \n",
" 53 | \n",
" 23.2 | \n",
" NaN | \n",
" 2.0 | \n",
" 6 | \n",
" NaN | \n",
" 0 | \n",
" 1.27 | \n",
" 15.0 | \n",
" 14.0 | \n",
" 1.0 | \n",
" 0.11 | \n",
" 0.63 | \n",
" 12.0 | \n",
" 13.7 | \n",
" -1.6 | \n",
" -0.19 | \n",
" 0.13 | \n",
" 0.0 | \n",
" 9 | \n",
" 2.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 50.0 | \n",
" 6.0 | \n",
" 12.0 | \n",
" 33.3 | \n",
" Big-5-European-Leagues | \n",
" Big5 | \n",
" 2017-2018 | \n",
" Everton | \n",
" England | \n",
" aaron lennon | \n",
" aaron | \n",
" lennon | \n",
" a | \n",
" england | \n",
" ENG | \n",
" England | \n",
" FW | \n",
" Forward | \n",
" Outfielder | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
"
\n",
" \n",
" 4 | \n",
" Aaron Mooy | \n",
" au AUS | \n",
" MF | \n",
" Huddersfield | \n",
" Premier League | \n",
" 26 | \n",
" 1990.0 | \n",
" 36 | \n",
" 34 | \n",
" 3067.0 | \n",
" 34.1 | \n",
" 4 | \n",
" 3 | \n",
" 3 | \n",
" 1 | \n",
" 1 | \n",
" 4 | \n",
" 0 | \n",
" 0.12 | \n",
" 0.09 | \n",
" 0.21 | \n",
" 0.09 | \n",
" 0.18 | \n",
" 2.6 | \n",
" 1.8 | \n",
" 3.1 | \n",
" 4.9 | \n",
" 0.08 | \n",
" 0.09 | \n",
" 0.17 | \n",
" 0.05 | \n",
" 0.14 | \n",
" Matches | \n",
" 28.0 | \n",
" 6.0 | \n",
" 21.4 | \n",
" 0.82 | \n",
" 0.18 | \n",
" 0.11 | \n",
" 0.50 | \n",
" 22.0 | \n",
" 3.0 | \n",
" 0.06 | \n",
" 1.4 | \n",
" 1.2 | \n",
" 1561.0 | \n",
" 2067.0 | \n",
" 75.5 | \n",
" 27911.0 | \n",
" 7921.0 | \n",
" 783.0 | \n",
" 876.0 | \n",
" 89.4 | \n",
" 540.0 | \n",
" 678.0 | \n",
" 79.6 | \n",
" 196.0 | \n",
" 397.0 | \n",
" 49.4 | \n",
" -0.1 | \n",
" 48.0 | \n",
" 167.0 | \n",
" 27.0 | \n",
" 9.0 | \n",
" 163.0 | \n",
" 1897.0 | \n",
" 170.0 | \n",
" 1.0 | \n",
" 422.0 | \n",
" 100.0 | \n",
" 85.0 | \n",
" 77.0 | \n",
" 35.0 | \n",
" 21.0 | \n",
" 5.0 | \n",
" 1293.0 | \n",
" 283.0 | \n",
" 491.0 | \n",
" 507.0 | \n",
" 1444.0 | \n",
" 77.0 | \n",
" 5.0 | \n",
" 4.0 | \n",
" 6.0 | \n",
" 38.0 | \n",
" 60.0 | \n",
" 60.0 | \n",
" 73.0 | \n",
" 2.14 | \n",
" 54.0 | \n",
" 16.0 | \n",
" 0.0 | \n",
" 1.0 | \n",
" 2.0 | \n",
" 5.0 | \n",
" 0.15 | \n",
" 4.0 | \n",
" 1.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 105.0 | \n",
" 55.0 | \n",
" 38.0 | \n",
" 54.0 | \n",
" 13.0 | \n",
" 32.0 | \n",
" 44.4 | \n",
" 40.0 | \n",
" 193.0 | \n",
" 29.5 | \n",
" 192.0 | \n",
" 355.0 | \n",
" 107.0 | \n",
" 2.0 | \n",
" 52.0 | \n",
" 151.0 | \n",
" 70.0 | \n",
" 0.0 | \n",
" 2496.0 | \n",
" 65.0 | \n",
" 32.0 | \n",
" 53.2 | \n",
" 26.0 | \n",
" 0.0 | \n",
" 1543.0 | \n",
" 6.0 | \n",
" 33.0 | \n",
" 60.0 | \n",
" 1710.0 | \n",
" 1540.0 | \n",
" 90.1 | \n",
" 85.0 | \n",
" 85 | \n",
" 89.7 | \n",
" NaN | \n",
" 29.0 | \n",
" 2 | \n",
" NaN | \n",
" 0 | \n",
" 0.94 | \n",
" 25.0 | \n",
" 52.0 | \n",
" -27.0 | \n",
" -0.79 | \n",
" -0.03 | \n",
" 28.7 | \n",
" 49.8 | \n",
" -21.1 | \n",
" -0.62 | \n",
" -0.01 | \n",
" 0.0 | \n",
" 26 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 455.0 | \n",
" 35.0 | \n",
" 42.0 | \n",
" 45.5 | \n",
" Big-5-European-Leagues | \n",
" Big5 | \n",
" 2017-2018 | \n",
" Huddersfield | \n",
" England | \n",
" aaron mooy | \n",
" aaron | \n",
" mooy | \n",
" a | \n",
" england | \n",
" AUS | \n",
" Australia | \n",
" MF | \n",
" Midfielder | \n",
" Outfielder | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" Player Nation Pos Squad Comp Age Born \\\n",
"0 Aaron Cresswell eng ENG DF West Ham Premier League 27 1989.0 \n",
"1 Aaron Hunt de GER MF,FW Hamburger SV Bundeliga 30 1986.0 \n",
"2 Aaron Lennon eng ENG MF Burnley Premier League 30 1987.0 \n",
"3 Aaron Lennon eng ENG FW,MF Everton Premier League 30 1987.0 \n",
"4 Aaron Mooy au AUS MF Huddersfield Premier League 26 1990.0 \n",
"\n",
" MP Starts Min 90s Gls Ast G-PK PK PKatt CrdY CrdR Gls.1 \\\n",
"0 36 35 3069.0 34.1 1 3 1 0 0 7 0 0.03 \n",
"1 28 26 2081.0 23.1 3 2 2 1 1 1 0 0.13 \n",
"2 14 13 1118.0 12.4 0 2 0 0 0 2 0 0.00 \n",
"3 15 9 793.0 8.8 0 0 0 0 0 0 0 0.00 \n",
"4 36 34 3067.0 34.1 4 3 3 1 1 4 0 0.12 \n",
"\n",
" Ast.1 G+A G-PK.1 G+A-PK xG npxG xA npxG+xA xG.1 xA.1 xG+xA \\\n",
"0 0.09 0.12 0.03 0.12 0.8 0.8 2.8 3.6 0.02 0.08 0.10 \n",
"1 0.09 0.22 0.09 0.17 2.8 2.1 5.6 7.6 0.12 0.23 0.35 \n",
"2 0.16 0.16 0.00 0.16 0.6 0.6 1.4 2.0 0.05 0.11 0.16 \n",
"3 0.00 0.00 0.00 0.00 0.3 0.3 0.5 0.8 0.04 0.05 0.09 \n",
"4 0.09 0.21 0.09 0.18 2.6 1.8 3.1 4.9 0.08 0.09 0.17 \n",
"\n",
" npxG.1 npxG+xA.1 Matches Sh SoT SoT% Sh/90 SoT/90 G/Sh G/SoT \\\n",
"0 0.02 0.10 Matches 21.0 6.0 28.6 0.62 0.18 0.05 0.17 \n",
"1 0.09 0.32 Matches 27.0 6.0 22.2 1.17 0.26 0.07 0.33 \n",
"2 0.05 0.16 Matches 10.0 4.0 40.0 0.81 0.32 0.00 0.00 \n",
"3 0.04 0.09 Matches 4.0 1.0 25.0 0.45 0.11 0.00 0.00 \n",
"4 0.05 0.14 Matches 28.0 6.0 21.4 0.82 0.18 0.11 0.50 \n",
"\n",
" Dist FK npxG/Sh G-xG np:G-xG Cmp Att Cmp% TotDist PrgDist \\\n",
"0 28.1 8.0 0.04 0.2 0.2 1224.0 1708.0 71.7 23519.0 10212.0 \n",
"1 23.4 10.0 0.08 0.2 -0.1 883.0 1229.0 71.8 16889.0 5315.0 \n",
"2 16.6 0.0 0.06 -0.6 -0.6 204.0 294.0 69.4 3223.0 887.0 \n",
"3 14.8 0.0 0.08 -0.3 -0.3 152.0 214.0 71.0 2286.0 672.0 \n",
"4 22.0 3.0 0.06 1.4 1.2 1561.0 2067.0 75.5 27911.0 7921.0 \n",
"\n",
" Cmp.1 Att.1 Cmp%.1 Cmp.2 Att.2 Cmp%.2 Cmp.3 Att.3 Cmp%.3 A-xA \\\n",
"0 560.0 623.0 89.9 472.0 587.0 80.4 183.0 449.0 40.8 0.2 \n",
"1 406.0 480.0 84.6 292.0 376.0 77.7 165.0 303.0 54.5 -3.6 \n",
"2 116.0 142.0 81.7 68.0 92.0 73.9 17.0 34.0 50.0 0.6 \n",
"3 92.0 115.0 80.0 53.0 69.0 76.8 5.0 13.0 38.5 -0.5 \n",
"4 783.0 876.0 89.4 540.0 678.0 79.6 196.0 397.0 49.4 -0.1 \n",
"\n",
" KP 1/3 PPA CrsPA Prog Live Dead TB Press Sw Crs \\\n",
"0 35.0 117.0 21.0 14.0 96.0 1343.0 365.0 1.0 222.0 83.0 93.0 \n",
"1 65.0 83.0 31.0 5.0 97.0 977.0 252.0 11.0 245.0 67.0 66.0 \n",
"2 8.0 11.0 13.0 5.0 22.0 289.0 5.0 0.0 61.0 5.0 19.0 \n",
"3 5.0 9.0 3.0 2.0 17.0 199.0 15.0 0.0 49.0 2.0 8.0 \n",
"4 48.0 167.0 27.0 9.0 163.0 1897.0 170.0 1.0 422.0 100.0 85.0 \n",
"\n",
" CK In Out Str Ground Low High Left Right Head TI \\\n",
"0 67.0 35.0 15.0 9.0 893.0 293.0 522.0 1329.0 78.0 59.0 210.0 \n",
"1 123.0 35.0 41.0 14.0 672.0 236.0 321.0 999.0 137.0 42.0 23.0 \n",
"2 0.0 0.0 0.0 0.0 193.0 51.0 50.0 27.0 250.0 7.0 4.0 \n",
"3 0.0 0.0 0.0 0.0 129.0 47.0 38.0 29.0 159.0 10.0 14.0 \n",
"4 77.0 35.0 21.0 5.0 1293.0 283.0 491.0 507.0 1444.0 77.0 5.0 \n",
"\n",
" Other Off Out.1 Int Blocks SCA SCA90 PassLive PassDead Drib \\\n",
"0 5.0 15.0 44.0 39.0 52.0 62.0 1.82 35.0 21.0 1.0 \n",
"1 9.0 5.0 29.0 29.0 49.0 102.0 4.25 54.0 43.0 1.0 \n",
"2 3.0 0.0 9.0 8.0 30.0 18.0 1.45 12.0 0.0 1.0 \n",
"3 0.0 1.0 3.0 7.0 15.0 16.0 1.82 11.0 0.0 1.0 \n",
"4 4.0 6.0 38.0 60.0 60.0 73.0 2.14 54.0 16.0 0.0 \n",
"\n",
" Fld Def GCA GCA90 PassLive.1 PassDead.1 Drib.1 Sh.1 Fld.1 Def.1 \\\n",
"0 3.0 0.0 9.0 0.26 6.0 3.0 0.0 0.0 0.0 0.0 \n",
"1 2.0 1.0 6.0 0.25 5.0 1.0 0.0 0.0 0.0 0.0 \n",
"2 1.0 0.0 3.0 0.24 2.0 0.0 0.0 1.0 0.0 0.0 \n",
"3 2.0 0.0 4.0 0.45 2.0 0.0 0.0 1.0 1.0 0.0 \n",
"4 1.0 2.0 5.0 0.15 4.0 1.0 0.0 0.0 0.0 0.0 \n",
"\n",
" Tkl TklW Def 3rd Mid 3rd Att 3rd Tkl.1 Tkl% Past Succ % \\\n",
"0 38.0 18.0 15.0 18.0 5.0 17.0 53.1 15.0 115.0 32.1 \n",
"1 30.0 22.0 12.0 16.0 2.0 5.0 13.5 32.0 135.0 27.9 \n",
"2 18.0 10.0 6.0 11.0 1.0 4.0 19.0 17.0 61.0 26.3 \n",
"3 18.0 10.0 9.0 7.0 2.0 5.0 25.0 15.0 38.0 19.3 \n",
"4 105.0 55.0 38.0 54.0 13.0 32.0 44.4 40.0 193.0 29.5 \n",
"\n",
" Def 3rd.1 Mid 3rd.1 Att 3rd.1 ShSv Pass Tkl+Int Clr Err Touches \\\n",
"0 181.0 123.0 54.0 0.0 38.0 90.0 133.0 0.0 2050.0 \n",
"1 102.0 261.0 121.0 0.0 28.0 44.0 21.0 0.0 1475.0 \n",
"2 74.0 102.0 56.0 0.0 24.0 31.0 9.0 0.0 424.0 \n",
"3 49.0 102.0 46.0 0.0 18.0 25.0 9.0 0.0 322.0 \n",
"4 192.0 355.0 107.0 2.0 52.0 151.0 70.0 0.0 2496.0 \n",
"\n",
" Def Pen Att Pen Succ% #Pl Megs Carries CPA Mis Dis Targ \\\n",
"0 125.0 17.0 33.3 7.0 0.0 1071.0 2.0 18.0 19.0 1171.0 \n",
"1 28.0 68.0 58.3 23.0 4.0 892.0 7.0 45.0 42.0 1176.0 \n",
"2 19.0 36.0 48.0 12.0 2.0 290.0 12.0 9.0 25.0 353.0 \n",
"3 7.0 22.0 35.0 8.0 1.0 186.0 8.0 9.0 17.0 288.0 \n",
"4 65.0 32.0 53.2 26.0 0.0 1543.0 6.0 33.0 60.0 1710.0 \n",
"\n",
" Rec Rec% Prog.1 Mn/MP Min% Mn/Start Compl Subs Mn/Sub unSub \\\n",
"0 1094.0 93.4 31.0 85 89.7 NaN 30.0 1 NaN 1 \n",
"1 893.0 75.9 178.0 74 68.0 NaN 14.0 2 NaN 0 \n",
"2 259.0 73.4 41.0 80 32.7 NaN 6.0 1 NaN 0 \n",
"3 195.0 67.7 33.0 53 23.2 NaN 2.0 6 NaN 0 \n",
"4 1540.0 90.1 85.0 85 89.7 NaN 29.0 2 NaN 0 \n",
"\n",
" PPM onG onGA +/- +/-90 On-Off onxG onxGA xG+/- xG+/-90 \\\n",
"0 1.14 45.0 60.0 -15.0 -0.44 0.84 38.0 51.5 -13.5 -0.40 \n",
"1 1.07 22.0 34.0 -12.0 -0.52 0.58 27.0 31.3 -4.3 -0.18 \n",
"2 1.43 17.0 15.0 2.0 0.16 0.36 13.8 15.4 -1.5 -0.12 \n",
"3 1.27 15.0 14.0 1.0 0.11 0.63 12.0 13.7 -1.6 -0.19 \n",
"4 0.94 25.0 52.0 -27.0 -0.79 -0.03 28.7 49.8 -21.1 -0.62 \n",
"\n",
" On-Off.1 2CrdY Fls PKwon PKcon OG Recov Won Lost Won% \\\n",
"0 1.09 0.0 20 0.0 0.0 0.0 277.0 70.0 57.0 55.1 \n",
"1 0.94 0.0 27 0.0 0.0 0.0 213.0 22.0 37.0 37.3 \n",
"2 0.49 0.0 12 0.0 0.0 0.0 80.0 7.0 15.0 31.8 \n",
"3 0.13 0.0 9 2.0 0.0 0.0 50.0 6.0 12.0 33.3 \n",
"4 -0.01 0.0 26 0.0 0.0 0.0 455.0 35.0 42.0 45.5 \n",
"\n",
" League Name League ID Season Team Name Team Country \\\n",
"0 Big-5-European-Leagues Big5 2017-2018 West Ham England \n",
"1 Big-5-European-Leagues Big5 2017-2018 Hamburger SV Germany \n",
"2 Big-5-European-Leagues Big5 2017-2018 Burnley England \n",
"3 Big-5-European-Leagues Big5 2017-2018 Everton England \n",
"4 Big-5-European-Leagues Big5 2017-2018 Huddersfield England \n",
"\n",
" Player Lower First Name Lower Last Name Lower First Initial Lower \\\n",
"0 aaron cresswell aaron cresswell a \n",
"1 aaron hunt aaron hunt a \n",
"2 aaron lennon aaron lennon a \n",
"3 aaron lennon aaron lennon a \n",
"4 aaron mooy aaron mooy a \n",
"\n",
" Team Country Lower Nationality Code Nationality Cleaned Primary Pos \\\n",
"0 england ENG England DF \n",
"1 germany GER Germany MF \n",
"2 england ENG England MF \n",
"3 england ENG England FW \n",
"4 england AUS Australia MF \n",
"\n",
" Position Grouped Outfielder Goalkeeper GA GA90 SoTA Saves Save% W \\\n",
"0 Defender Outfielder NaN NaN NaN NaN NaN NaN \n",
"1 Midfielder Outfielder NaN NaN NaN NaN NaN NaN \n",
"2 Midfielder Outfielder NaN NaN NaN NaN NaN NaN \n",
"3 Forward Outfielder NaN NaN NaN NaN NaN NaN \n",
"4 Midfielder Outfielder NaN NaN NaN NaN NaN NaN \n",
"\n",
" D L CS CS% PKA PKsv PKm Save%.1 PSxG PSxG/SoT PSxG+/- /90 \\\n",
"0 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN \n",
"1 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN \n",
"2 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN \n",
"3 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN \n",
"4 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN \n",
"\n",
" Thr Launch% AvgLen Launch%.1 AvgLen.1 Opp Stp Stp% #OPA #OPA/90 \\\n",
"0 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN \n",
"1 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN \n",
"2 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN \n",
"3 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN \n",
"4 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN \n",
"\n",
" AvgDist \n",
"0 NaN \n",
"1 NaN \n",
"2 NaN \n",
"3 NaN \n",
"4 NaN "
]
},
"execution_count": 10,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"df_fbref_players.head()"
]
},
{
"cell_type": "code",
"execution_count": 11,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"(13680, 205)"
]
},
"execution_count": 11,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"df_fbref_players.shape"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"#### TransferMarkt Bio and Status\n",
"Player bio and status data"
]
},
{
"cell_type": "code",
"execution_count": 12,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" tm_id | \n",
" player_name | \n",
" birth_day | \n",
" birth_month | \n",
" birth_year | \n",
" pob | \n",
" cob | \n",
" dob | \n",
" position | \n",
" height | \n",
" foot | \n",
" citizenship | \n",
" second_citizenship | \n",
" league_code | \n",
" season | \n",
" current_club | \n",
" current_club_country | \n",
" market_value_euros | \n",
" joined | \n",
" contract_expires | \n",
" contract_option | \n",
" on_loan_from | \n",
" on_loan_from_country | \n",
" loan_contract_expiry | \n",
" player_agent | \n",
" name_lower | \n",
" firstname_lower | \n",
" lastname_lower | \n",
" firstinitial_lower | \n",
" league_country_lower | \n",
" position_code | \n",
" position_grouped | \n",
" outfielder_goalkeeper | \n",
" age | \n",
" age_when_joining | \n",
" years_since_joining | \n",
" years_until_contract_expiry | \n",
" market_value_pounds | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" 2857 | \n",
" eldin jakupovic | \n",
" 2.0 | \n",
" 10.0 | \n",
" 1984.0 | \n",
" Kozarac | \n",
" Jugoslawien (SFR) | \n",
" 1984-10-02 | \n",
" Goalkeeper | \n",
" 191.0 | \n",
" right | \n",
" NaN | \n",
" Bosnia-Herzegovina | \n",
" GB1 | \n",
" 2021 | \n",
" leicester city | \n",
" england | \n",
" 300000.0 | \n",
" 2017-07-19 | \n",
" 2021-06-30 | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" HSD | \n",
" eldin jakupovic | \n",
" eldin | \n",
" jakupovic | \n",
" e | \n",
" england | \n",
" GK | \n",
" Goalkeeper | \n",
" Goalkeeper | \n",
" 36.0 | \n",
" 32.0 | \n",
" 4.0 | \n",
" -1.0 | \n",
" 270000.0 | \n",
"
\n",
" \n",
" 1 | \n",
" 3333 | \n",
" james milner | \n",
" 4.0 | \n",
" 1.0 | \n",
" 1986.0 | \n",
" Leeds | \n",
" England | \n",
" 1986-01-04 | \n",
" midfield - Central Midfield | \n",
" 175.0 | \n",
" right | \n",
" England | \n",
" NaN | \n",
" GB1 | \n",
" 2021 | \n",
" liverpool fc | \n",
" england | \n",
" 3000000.0 | \n",
" 2015-07-01 | \n",
" 2022-06-30 | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" Samii Sport-Marketing Agentur | \n",
" james milner | \n",
" james | \n",
" milner | \n",
" j | \n",
" england | \n",
" CM | \n",
" Midfielder | \n",
" Outfielder | \n",
" 35.0 | \n",
" 29.0 | \n",
" 6.0 | \n",
" 0.0 | \n",
" 2700000.0 | \n",
"
\n",
" \n",
" 2 | \n",
" 3455 | \n",
" zlatan ibrahimovic | \n",
" 3.0 | \n",
" 10.0 | \n",
" 1981.0 | \n",
" Malmö | \n",
" Sweden | \n",
" 1981-10-03 | \n",
" attack - Centre-Forward | \n",
" 195.0 | \n",
" both | \n",
" NaN | \n",
" Bosnia-Herzegovina | \n",
" IT1 | \n",
" 2021 | \n",
" ac milan | \n",
" italy | \n",
" 4000000.0 | \n",
" 2020-01-02 | \n",
" 2022-06-30 | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" Mino Raiola | \n",
" zlatan ibrahimovic | \n",
" zlatan | \n",
" ibrahimovic | \n",
" z | \n",
" italy | \n",
" ST | \n",
" Forward | \n",
" Outfielder | \n",
" 39.0 | \n",
" 38.0 | \n",
" 1.0 | \n",
" 0.0 | \n",
" 3600000.0 | \n",
"
\n",
" \n",
" 3 | \n",
" 5578 | \n",
" nicolas penneteau | \n",
" 28.0 | \n",
" 2.0 | \n",
" 1981.0 | \n",
" Marseille | \n",
" France | \n",
" 1981-02-28 | \n",
" Goalkeeper | \n",
" 185.0 | \n",
" left | \n",
" France | \n",
" NaN | \n",
" FR1 | \n",
" 2021 | \n",
" stade reims | \n",
" france | \n",
" 200000.0 | \n",
" 2021-07-01 | \n",
" 2023-06-30 | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" USM GROUP | \n",
" nicolas penneteau | \n",
" nicolas | \n",
" penneteau | \n",
" n | \n",
" france | \n",
" GK | \n",
" Goalkeeper | \n",
" Goalkeeper | \n",
" 40.0 | \n",
" 40.0 | \n",
" 0.0 | \n",
" 1.0 | \n",
" 180000.0 | \n",
"
\n",
" \n",
" 4 | \n",
" 6442 | \n",
" antonio rosati | \n",
" 26.0 | \n",
" 6.0 | \n",
" 1983.0 | \n",
" Tivoli | \n",
" Italy | \n",
" 1983-06-26 | \n",
" Goalkeeper | \n",
" 195.0 | \n",
" right | \n",
" Italy | \n",
" NaN | \n",
" IT1 | \n",
" 2021 | \n",
" acf fiorentina | \n",
" italy | \n",
" 100000.0 | \n",
" 2021-02-01 | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" Alessandro Lucci - WSA | \n",
" antonio rosati | \n",
" antonio | \n",
" rosati | \n",
" a | \n",
" italy | \n",
" GK | \n",
" Goalkeeper | \n",
" Goalkeeper | \n",
" 38.0 | \n",
" 37.0 | \n",
" 0.0 | \n",
" NaN | \n",
" 90000.0 | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" tm_id player_name birth_day birth_month birth_year pob \\\n",
"0 2857 eldin jakupovic 2.0 10.0 1984.0 Kozarac \n",
"1 3333 james milner 4.0 1.0 1986.0 Leeds \n",
"2 3455 zlatan ibrahimovic 3.0 10.0 1981.0 Malmö \n",
"3 5578 nicolas penneteau 28.0 2.0 1981.0 Marseille \n",
"4 6442 antonio rosati 26.0 6.0 1983.0 Tivoli \n",
"\n",
" cob dob position height foot \\\n",
"0 Jugoslawien (SFR) 1984-10-02 Goalkeeper 191.0 right \n",
"1 England 1986-01-04 midfield - Central Midfield 175.0 right \n",
"2 Sweden 1981-10-03 attack - Centre-Forward 195.0 both \n",
"3 France 1981-02-28 Goalkeeper 185.0 left \n",
"4 Italy 1983-06-26 Goalkeeper 195.0 right \n",
"\n",
" citizenship second_citizenship league_code season current_club \\\n",
"0 NaN Bosnia-Herzegovina GB1 2021 leicester city \n",
"1 England NaN GB1 2021 liverpool fc \n",
"2 NaN Bosnia-Herzegovina IT1 2021 ac milan \n",
"3 France NaN FR1 2021 stade reims \n",
"4 Italy NaN IT1 2021 acf fiorentina \n",
"\n",
" current_club_country market_value_euros joined contract_expires \\\n",
"0 england 300000.0 2017-07-19 2021-06-30 \n",
"1 england 3000000.0 2015-07-01 2022-06-30 \n",
"2 italy 4000000.0 2020-01-02 2022-06-30 \n",
"3 france 200000.0 2021-07-01 2023-06-30 \n",
"4 italy 100000.0 2021-02-01 NaN \n",
"\n",
" contract_option on_loan_from on_loan_from_country loan_contract_expiry \\\n",
"0 NaN NaN NaN NaN \n",
"1 NaN NaN NaN NaN \n",
"2 NaN NaN NaN NaN \n",
"3 NaN NaN NaN NaN \n",
"4 NaN NaN NaN NaN \n",
"\n",
" player_agent name_lower firstname_lower \\\n",
"0 HSD eldin jakupovic eldin \n",
"1 Samii Sport-Marketing Agentur james milner james \n",
"2 Mino Raiola zlatan ibrahimovic zlatan \n",
"3 USM GROUP nicolas penneteau nicolas \n",
"4 Alessandro Lucci - WSA antonio rosati antonio \n",
"\n",
" lastname_lower firstinitial_lower league_country_lower position_code \\\n",
"0 jakupovic e england GK \n",
"1 milner j england CM \n",
"2 ibrahimovic z italy ST \n",
"3 penneteau n france GK \n",
"4 rosati a italy GK \n",
"\n",
" position_grouped outfielder_goalkeeper age age_when_joining \\\n",
"0 Goalkeeper Goalkeeper 36.0 32.0 \n",
"1 Midfielder Outfielder 35.0 29.0 \n",
"2 Forward Outfielder 39.0 38.0 \n",
"3 Goalkeeper Goalkeeper 40.0 40.0 \n",
"4 Goalkeeper Goalkeeper 38.0 37.0 \n",
"\n",
" years_since_joining years_until_contract_expiry market_value_pounds \n",
"0 4.0 -1.0 270000.0 \n",
"1 6.0 0.0 2700000.0 \n",
"2 1.0 0.0 3600000.0 \n",
"3 0.0 1.0 180000.0 \n",
"4 0.0 NaN 90000.0 "
]
},
"execution_count": 12,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"df_tm_bio_status.head()"
]
},
{
"cell_type": "code",
"execution_count": 13,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"(9429, 38)"
]
},
"execution_count": 13,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"df_tm_bio_status.shape"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"#### TransferMarkt Historical Player Valuations\n",
"Historical player valuation data"
]
},
{
"cell_type": "code",
"execution_count": 14,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" tm_id | \n",
" season | \n",
" player_name | \n",
" club | \n",
" current_club | \n",
" league_code | \n",
" current_age | \n",
" market_value_gbp | \n",
" market_value_eur | \n",
" dob | \n",
" pob | \n",
" birth_year | \n",
" position | \n",
" position_code | \n",
" position_grouped | \n",
" outfielder_goalkeeper | \n",
" height | \n",
" foot | \n",
" citizenship | \n",
" second_citizenship | \n",
" player_agent | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" 26 | \n",
" 2004/2005 | \n",
" roman weidenfeller | \n",
" Borussia Dortmund | \n",
" retired | \n",
" L1 | \n",
" 41.0 | \n",
" 1800000.0 | \n",
" 2000000 | \n",
" 1980-08-06 | \n",
" Diez | \n",
" 1980.0 | \n",
" Goalkeeper | \n",
" GK | \n",
" Goalkeeper | \n",
" Goalkeeper | \n",
" 188.0 | \n",
" left | \n",
" Germany | \n",
" NaN | \n",
" Jörg Neubauer | \n",
"
\n",
" \n",
" 1 | \n",
" 26 | \n",
" 2005/2006 | \n",
" roman weidenfeller | \n",
" Borussia Dortmund | \n",
" retired | \n",
" L1 | \n",
" 41.0 | \n",
" 6075000.0 | \n",
" 6750000 | \n",
" 1980-08-06 | \n",
" Diez | \n",
" 1980.0 | \n",
" Goalkeeper | \n",
" GK | \n",
" Goalkeeper | \n",
" Goalkeeper | \n",
" 188.0 | \n",
" left | \n",
" Germany | \n",
" NaN | \n",
" Jörg Neubauer | \n",
"
\n",
" \n",
" 2 | \n",
" 26 | \n",
" 2006/2007 | \n",
" roman weidenfeller | \n",
" Borussia Dortmund | \n",
" retired | \n",
" L1 | \n",
" 41.0 | \n",
" 6750000.0 | \n",
" 7500000 | \n",
" 1980-08-06 | \n",
" Diez | \n",
" 1980.0 | \n",
" Goalkeeper | \n",
" GK | \n",
" Goalkeeper | \n",
" Goalkeeper | \n",
" 188.0 | \n",
" left | \n",
" Germany | \n",
" NaN | \n",
" Jörg Neubauer | \n",
"
\n",
" \n",
" 3 | \n",
" 26 | \n",
" 2007/2008 | \n",
" roman weidenfeller | \n",
" Borussia Dortmund | \n",
" retired | \n",
" L1 | \n",
" 41.0 | \n",
" 7200000.0 | \n",
" 8000000 | \n",
" 1980-08-06 | \n",
" Diez | \n",
" 1980.0 | \n",
" Goalkeeper | \n",
" GK | \n",
" Goalkeeper | \n",
" Goalkeeper | \n",
" 188.0 | \n",
" left | \n",
" Germany | \n",
" NaN | \n",
" Jörg Neubauer | \n",
"
\n",
" \n",
" 4 | \n",
" 26 | \n",
" 2008/2009 | \n",
" roman weidenfeller | \n",
" Borussia Dortmund | \n",
" retired | \n",
" L1 | \n",
" 41.0 | \n",
" 4500000.0 | \n",
" 5000000 | \n",
" 1980-08-06 | \n",
" Diez | \n",
" 1980.0 | \n",
" Goalkeeper | \n",
" GK | \n",
" Goalkeeper | \n",
" Goalkeeper | \n",
" 188.0 | \n",
" left | \n",
" Germany | \n",
" NaN | \n",
" Jörg Neubauer | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" tm_id season player_name club current_club \\\n",
"0 26 2004/2005 roman weidenfeller Borussia Dortmund retired \n",
"1 26 2005/2006 roman weidenfeller Borussia Dortmund retired \n",
"2 26 2006/2007 roman weidenfeller Borussia Dortmund retired \n",
"3 26 2007/2008 roman weidenfeller Borussia Dortmund retired \n",
"4 26 2008/2009 roman weidenfeller Borussia Dortmund retired \n",
"\n",
" league_code current_age market_value_gbp market_value_eur dob \\\n",
"0 L1 41.0 1800000.0 2000000 1980-08-06 \n",
"1 L1 41.0 6075000.0 6750000 1980-08-06 \n",
"2 L1 41.0 6750000.0 7500000 1980-08-06 \n",
"3 L1 41.0 7200000.0 8000000 1980-08-06 \n",
"4 L1 41.0 4500000.0 5000000 1980-08-06 \n",
"\n",
" pob birth_year position position_code position_grouped \\\n",
"0 Diez 1980.0 Goalkeeper GK Goalkeeper \n",
"1 Diez 1980.0 Goalkeeper GK Goalkeeper \n",
"2 Diez 1980.0 Goalkeeper GK Goalkeeper \n",
"3 Diez 1980.0 Goalkeeper GK Goalkeeper \n",
"4 Diez 1980.0 Goalkeeper GK Goalkeeper \n",
"\n",
" outfielder_goalkeeper height foot citizenship second_citizenship \\\n",
"0 Goalkeeper 188.0 left Germany NaN \n",
"1 Goalkeeper 188.0 left Germany NaN \n",
"2 Goalkeeper 188.0 left Germany NaN \n",
"3 Goalkeeper 188.0 left Germany NaN \n",
"4 Goalkeeper 188.0 left Germany NaN \n",
"\n",
" player_agent \n",
"0 Jörg Neubauer \n",
"1 Jörg Neubauer \n",
"2 Jörg Neubauer \n",
"3 Jörg Neubauer \n",
"4 Jörg Neubauer "
]
},
"execution_count": 14,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"df_tm_valuations.head()"
]
},
{
"cell_type": "code",
"execution_count": 15,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"(67236, 21)"
]
},
"execution_count": 15,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"df_tm_valuations.shape"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"#### TransferMarkt Recorded Transfers\n",
"Player recorded transfer data"
]
},
{
"cell_type": "code",
"execution_count": 16,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" club_name | \n",
" player_name | \n",
" age | \n",
" position | \n",
" club_involved_name | \n",
" fee | \n",
" transfer_movement | \n",
" transfer_period | \n",
" fee_cleaned | \n",
" league_name | \n",
" year | \n",
" season | \n",
" league_code | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" VfB Stuttgart | \n",
" Adrian Knup | \n",
" 23.0 | \n",
" Centre-Forward | \n",
" FC Luzern | \n",
" ? | \n",
" in | \n",
" Summer | \n",
" NaN | \n",
" 1 Bundesliga | \n",
" 1992 | \n",
" 1992/1993 | \n",
" L1 | \n",
"
\n",
" \n",
" 1 | \n",
" 1. FC Köln | \n",
" Adrian Spyrka | \n",
" 24.0 | \n",
" Central Midfield | \n",
" Stuttg. Kickers | \n",
" End of loanJun 30, 1992 | \n",
" in | \n",
" Summer | \n",
" 0.0 | \n",
" 1 Bundesliga | \n",
" 1992 | \n",
" 1992/1993 | \n",
" L1 | \n",
"
\n",
" \n",
" 2 | \n",
" Karlsruher SC | \n",
" Alexander Famulla | \n",
" 31.0 | \n",
" Goalkeeper | \n",
" FC 08 Homburg | \n",
" ? | \n",
" out | \n",
" Summer | \n",
" NaN | \n",
" 1 Bundesliga | \n",
" 1992 | \n",
" 1992/1993 | \n",
" L1 | \n",
"
\n",
" \n",
" 3 | \n",
" SV Werder Bremen | \n",
" Alexander Malchow | \n",
" 22.0 | \n",
" Centre-Back | \n",
" VfB Oldenburg | \n",
" Free transfer | \n",
" out | \n",
" Summer | \n",
" 0.0 | \n",
" 1 Bundesliga | \n",
" 1992 | \n",
" 1992/1993 | \n",
" L1 | \n",
"
\n",
" \n",
" 4 | \n",
" SG Dynamo Dresden | \n",
" Alexander Zickler | \n",
" 18.0 | \n",
" Centre-Forward | \n",
" D. Dresden U19 | \n",
" - | \n",
" in | \n",
" Summer | \n",
" 0.0 | \n",
" 1 Bundesliga | \n",
" 1992 | \n",
" 1992/1993 | \n",
" L1 | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" club_name player_name age position \\\n",
"0 VfB Stuttgart Adrian Knup 23.0 Centre-Forward \n",
"1 1. FC Köln Adrian Spyrka 24.0 Central Midfield \n",
"2 Karlsruher SC Alexander Famulla 31.0 Goalkeeper \n",
"3 SV Werder Bremen Alexander Malchow 22.0 Centre-Back \n",
"4 SG Dynamo Dresden Alexander Zickler 18.0 Centre-Forward \n",
"\n",
" club_involved_name fee transfer_movement \\\n",
"0 FC Luzern ? in \n",
"1 Stuttg. Kickers End of loanJun 30, 1992 in \n",
"2 FC 08 Homburg ? out \n",
"3 VfB Oldenburg Free transfer out \n",
"4 D. Dresden U19 - in \n",
"\n",
" transfer_period fee_cleaned league_name year season league_code \n",
"0 Summer NaN 1 Bundesliga 1992 1992/1993 L1 \n",
"1 Summer 0.0 1 Bundesliga 1992 1992/1993 L1 \n",
"2 Summer NaN 1 Bundesliga 1992 1992/1993 L1 \n",
"3 Summer 0.0 1 Bundesliga 1992 1992/1993 L1 \n",
"4 Summer 0.0 1 Bundesliga 1992 1992/1993 L1 "
]
},
"execution_count": 16,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"df_tm_transfers.head()"
]
},
{
"cell_type": "code",
"execution_count": 17,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"(169208, 13)"
]
},
"execution_count": 17,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"df_tm_transfers.shape"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"#### Capology Player Salaries\n",
"Player salaries"
]
},
{
"cell_type": "code",
"execution_count": 18,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" player | \n",
" season | \n",
" league | \n",
" team | \n",
" position | \n",
" outfielder_goalkeeper | \n",
" age | \n",
" country | \n",
" weekly_gross_base_salary_gbp | \n",
" annual_gross_base_salary_gbp | \n",
" adj_current_gross_base_salary_gbp | \n",
" estimated_gross_total_gbp | \n",
" current_contract_status | \n",
" current_contract_expiration | \n",
" current_contract_length | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" Albian Ajeti | \n",
" 2016-2017 | \n",
" Bundesliga | \n",
" Augsburg | \n",
" Forward | \n",
" Outfielder | \n",
" 19 | \n",
" Switzerland | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
"
\n",
" \n",
" 1 | \n",
" Alexander Esswein | \n",
" 2016-2017 | \n",
" Bundesliga | \n",
" Augsburg | \n",
" Forward | \n",
" Outfielder | \n",
" 26 | \n",
" Germany | \n",
" 12919.0 | \n",
" 671795.0 | \n",
" 696824.0 | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
"
\n",
" \n",
" 2 | \n",
" Alfred Finnbogason | \n",
" 2016-2017 | \n",
" Bundesliga | \n",
" Augsburg | \n",
" Forward | \n",
" Outfielder | \n",
" 27 | \n",
" Iceland | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
"
\n",
" \n",
" 3 | \n",
" Andreas Luthe | \n",
" 2016-2017 | \n",
" Bundesliga | \n",
" Augsburg | \n",
" Goalkeeper | \n",
" Goalkeeper | \n",
" 29 | \n",
" Germany | \n",
" 5939.0 | \n",
" 308881.0 | \n",
" 320389.0 | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
"
\n",
" \n",
" 4 | \n",
" Caiuby | \n",
" 2016-2017 | \n",
" Bundesliga | \n",
" Augsburg | \n",
" Forward | \n",
" Outfielder | \n",
" 27 | \n",
" Brazil | \n",
" 12919.0 | \n",
" 671795.0 | \n",
" 696824.0 | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" player season league team position \\\n",
"0 Albian Ajeti 2016-2017 Bundesliga Augsburg Forward \n",
"1 Alexander Esswein 2016-2017 Bundesliga Augsburg Forward \n",
"2 Alfred Finnbogason 2016-2017 Bundesliga Augsburg Forward \n",
"3 Andreas Luthe 2016-2017 Bundesliga Augsburg Goalkeeper \n",
"4 Caiuby 2016-2017 Bundesliga Augsburg Forward \n",
"\n",
" outfielder_goalkeeper age country weekly_gross_base_salary_gbp \\\n",
"0 Outfielder 19 Switzerland 0.0 \n",
"1 Outfielder 26 Germany 12919.0 \n",
"2 Outfielder 27 Iceland 0.0 \n",
"3 Goalkeeper 29 Germany 5939.0 \n",
"4 Outfielder 27 Brazil 12919.0 \n",
"\n",
" annual_gross_base_salary_gbp adj_current_gross_base_salary_gbp \\\n",
"0 0.0 0.0 \n",
"1 671795.0 696824.0 \n",
"2 0.0 0.0 \n",
"3 308881.0 320389.0 \n",
"4 671795.0 696824.0 \n",
"\n",
" estimated_gross_total_gbp current_contract_status \\\n",
"0 NaN NaN \n",
"1 NaN NaN \n",
"2 NaN NaN \n",
"3 NaN NaN \n",
"4 NaN NaN \n",
"\n",
" current_contract_expiration current_contract_length \n",
"0 NaN NaN \n",
"1 NaN NaN \n",
"2 NaN NaN \n",
"3 NaN NaN \n",
"4 NaN NaN "
]
},
"execution_count": 18,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"df_capology.head()"
]
},
{
"cell_type": "code",
"execution_count": 19,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"(21281, 15)"
]
},
"execution_count": 19,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"df_capology.shape"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"---\n",
"\n",
"\n",
"\n",
"## 4. Data Engineering"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"\n",
"\n",
"### 4.1. FBref-TransferMarkt Mapping (URLs)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"##### Extract TransferMarkt ID\n",
"Last six digits of TransferMarkt URL: https://www.transfermarkt.com/jack-grealish/profil/spieler/203460."
]
},
{
"cell_type": "code",
"execution_count": 20,
"metadata": {},
"outputs": [],
"source": [
"df_fbref_tm_urls['tm_id'] = df_fbref_tm_urls['UrlTmarkt'].str.rsplit('/', n=1).str.get(-1)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"##### Extract FBref ID\n",
"Penultimate eight digits of FBref URL: https://fbref.com/en/players/b0b4fd3e/Jack-Grealish"
]
},
{
"cell_type": "code",
"execution_count": 21,
"metadata": {},
"outputs": [],
"source": [
"df_fbref_tm_urls['fbref_id'] = df_fbref_tm_urls['UrlFBref'].str.rsplit('/', n=1).str.get(-2)\n",
"df_fbref_tm_urls['fbref_id'] = df_fbref_tm_urls['fbref_id'].str.rsplit('/', n=1).str.get(-1)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"##### Rename columns"
]
},
{
"cell_type": "code",
"execution_count": 22,
"metadata": {},
"outputs": [],
"source": [
"## Rename columns\n",
"df_fbref_tm_urls = (df_fbref_tm_urls\n",
" .rename(columns={'PlayerFBref': 'player_name_fbref',\n",
" 'UrlFBref': 'url_fbref',\n",
" 'UrlTmarkt': 'url_tm'\n",
" }\n",
" )\n",
" )"
]
},
{
"cell_type": "code",
"execution_count": 23,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" player_name_fbref | \n",
" url_fbref | \n",
" url_tm | \n",
" TmPos | \n",
" tm_id | \n",
" fbref_id | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" Aaron Connolly | \n",
" https://fbref.com/en/players/27c01749/Aaron-Co... | \n",
" https://www.transfermarkt.com/aaron-connolly/p... | \n",
" Centre-Forward | \n",
" 434207 | \n",
" 27c01749 | \n",
"
\n",
" \n",
" 1 | \n",
" Aaron Cresswell | \n",
" https://fbref.com/en/players/4f974391/Aaron-Cr... | \n",
" https://www.transfermarkt.com/aaron-cresswell/... | \n",
" Left-Back | \n",
" 92571 | \n",
" 4f974391 | \n",
"
\n",
" \n",
" 2 | \n",
" Aarón Escandell | \n",
" https://fbref.com/en/players/67669ce7/Aaron-Es... | \n",
" https://www.transfermarkt.com/aaron-escandell/... | \n",
" Goalkeeper | \n",
" 284430 | \n",
" 67669ce7 | \n",
"
\n",
" \n",
" 3 | \n",
" Aaron Herzog | \n",
" https://fbref.com/en/players/565c3fe4/Aaron-He... | \n",
" https://www.transfermarkt.com/aaron-herzog/pro... | \n",
" Attacking Midfield | \n",
" 276566 | \n",
" 565c3fe4 | \n",
"
\n",
" \n",
" 4 | \n",
" Aaron Hickey | \n",
" https://fbref.com/en/players/1780bb4a/Aaron-Hi... | \n",
" https://www.transfermarkt.com/aaron-hickey/pro... | \n",
" Left-Back | \n",
" 591949 | \n",
" 1780bb4a | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" player_name_fbref url_fbref \\\n",
"0 Aaron Connolly https://fbref.com/en/players/27c01749/Aaron-Co... \n",
"1 Aaron Cresswell https://fbref.com/en/players/4f974391/Aaron-Cr... \n",
"2 Aarón Escandell https://fbref.com/en/players/67669ce7/Aaron-Es... \n",
"3 Aaron Herzog https://fbref.com/en/players/565c3fe4/Aaron-He... \n",
"4 Aaron Hickey https://fbref.com/en/players/1780bb4a/Aaron-Hi... \n",
"\n",
" url_tm TmPos \\\n",
"0 https://www.transfermarkt.com/aaron-connolly/p... Centre-Forward \n",
"1 https://www.transfermarkt.com/aaron-cresswell/... Left-Back \n",
"2 https://www.transfermarkt.com/aaron-escandell/... Goalkeeper \n",
"3 https://www.transfermarkt.com/aaron-herzog/pro... Attacking Midfield \n",
"4 https://www.transfermarkt.com/aaron-hickey/pro... Left-Back \n",
"\n",
" tm_id fbref_id \n",
"0 434207 27c01749 \n",
"1 92571 4f974391 \n",
"2 284430 67669ce7 \n",
"3 276566 565c3fe4 \n",
"4 591949 1780bb4a "
]
},
"execution_count": 23,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"df_fbref_tm_urls.head()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"\n",
"\n",
"### 4.2. FBref Players"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"##### Filter for 'Big 5' European Leagues"
]
},
{
"cell_type": "code",
"execution_count": 24,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"['England', 'Germany', 'Spain', 'France', 'Italy']"
]
},
"execution_count": 24,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"lst_leagues_fbref_players = list(df_fbref_players['Team Country'].unique())\n",
"lst_leagues_fbref_players"
]
},
{
"cell_type": "code",
"execution_count": 25,
"metadata": {},
"outputs": [],
"source": [
"lst_leagues_fbref_players_big5 = ['England', 'Germany', 'Spain', 'France', 'Italy']"
]
},
{
"cell_type": "code",
"execution_count": 26,
"metadata": {},
"outputs": [],
"source": [
"df_fbref_players = df_fbref_players[df_fbref_players['Team Country'].isin(lst_leagues_fbref_players_big5)]"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"##### Filter for Seasons"
]
},
{
"cell_type": "code",
"execution_count": 27,
"metadata": {},
"outputs": [],
"source": [
"# Map season to DataFrame\n",
"df_fbref_players['Season'] = df_fbref_players['Season'].map(dict_seasons)"
]
},
{
"cell_type": "code",
"execution_count": 28,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"['2017/2018', '2018/2019', '2019/2020', '2020/2021', '2021/2022']"
]
},
"execution_count": 28,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"lst_seasons_fbref_players = list(df_fbref_players['Season'].unique())\n",
"lst_seasons_fbref_players"
]
},
{
"cell_type": "code",
"execution_count": 29,
"metadata": {},
"outputs": [],
"source": [
"lst_seasons_fbref_players = ['2017/2018', '2018/2019', '2019/2020', '2020/2021', '2021/2022']"
]
},
{
"cell_type": "code",
"execution_count": 30,
"metadata": {},
"outputs": [],
"source": [
"df_fbref_players = df_fbref_players[df_fbref_players['Season'].isin(lst_seasons_fbref_players)]"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"##### Lower names"
]
},
{
"cell_type": "code",
"execution_count": 31,
"metadata": {},
"outputs": [],
"source": [
"# Remove accents and create lowercase name\n",
"df_fbref_players['player_name_lower'] = (df_fbref_players['Player']\n",
" .str.normalize('NFKD')\n",
" .str.encode('ascii', errors='ignore')\n",
" .str.decode('utf-8')\n",
" .str.lower()\n",
" )"
]
},
{
"cell_type": "code",
"execution_count": 32,
"metadata": {},
"outputs": [],
"source": [
"# First Name Lower\n",
"df_fbref_players['first_name_lower'] = df_fbref_players['player_name_lower'].str.rsplit(' ', 0).str[0]\n",
"\n",
"# Last Name Lower\n",
"df_fbref_players['last_name_lower'] = df_fbref_players['player_name_lower'].str.rsplit(' ', 1).str[-1]\n",
"\n",
"# First Initial Lower\n",
"df_fbref_players['first_initial_lower'] = df_fbref_players['player_name_lower'].astype(str).str[0]"
]
},
{
"cell_type": "code",
"execution_count": 33,
"metadata": {},
"outputs": [],
"source": [
"# Remove accents and create lowercase name\n",
"df_fbref_players['country_lower'] = (df_fbref_players['Nationality Cleaned']\n",
" .str.normalize('NFKD')\n",
" .str.encode('ascii', errors='ignore')\n",
" .str.decode('utf-8')\n",
" .str.lower()\n",
" )"
]
},
{
"cell_type": "code",
"execution_count": 34,
"metadata": {
"scrolled": false
},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" Player | \n",
" Nation | \n",
" Pos | \n",
" Squad | \n",
" Comp | \n",
" Age | \n",
" Born | \n",
" MP | \n",
" Starts | \n",
" Min | \n",
" 90s | \n",
" Gls | \n",
" Ast | \n",
" G-PK | \n",
" PK | \n",
" PKatt | \n",
" CrdY | \n",
" CrdR | \n",
" Gls.1 | \n",
" Ast.1 | \n",
" G+A | \n",
" G-PK.1 | \n",
" G+A-PK | \n",
" xG | \n",
" npxG | \n",
" xA | \n",
" npxG+xA | \n",
" xG.1 | \n",
" xA.1 | \n",
" xG+xA | \n",
" npxG.1 | \n",
" npxG+xA.1 | \n",
" Matches | \n",
" Sh | \n",
" SoT | \n",
" SoT% | \n",
" Sh/90 | \n",
" SoT/90 | \n",
" G/Sh | \n",
" G/SoT | \n",
" Dist | \n",
" FK | \n",
" npxG/Sh | \n",
" G-xG | \n",
" np:G-xG | \n",
" Cmp | \n",
" Att | \n",
" Cmp% | \n",
" TotDist | \n",
" PrgDist | \n",
" Cmp.1 | \n",
" Att.1 | \n",
" Cmp%.1 | \n",
" Cmp.2 | \n",
" Att.2 | \n",
" Cmp%.2 | \n",
" Cmp.3 | \n",
" Att.3 | \n",
" Cmp%.3 | \n",
" A-xA | \n",
" KP | \n",
" 1/3 | \n",
" PPA | \n",
" CrsPA | \n",
" Prog | \n",
" Live | \n",
" Dead | \n",
" TB | \n",
" Press | \n",
" Sw | \n",
" Crs | \n",
" CK | \n",
" In | \n",
" Out | \n",
" Str | \n",
" Ground | \n",
" Low | \n",
" High | \n",
" Left | \n",
" Right | \n",
" Head | \n",
" TI | \n",
" Other | \n",
" Off | \n",
" Out.1 | \n",
" Int | \n",
" Blocks | \n",
" SCA | \n",
" SCA90 | \n",
" PassLive | \n",
" PassDead | \n",
" Drib | \n",
" Fld | \n",
" Def | \n",
" GCA | \n",
" GCA90 | \n",
" PassLive.1 | \n",
" PassDead.1 | \n",
" Drib.1 | \n",
" Sh.1 | \n",
" Fld.1 | \n",
" Def.1 | \n",
" Tkl | \n",
" TklW | \n",
" Def 3rd | \n",
" Mid 3rd | \n",
" Att 3rd | \n",
" Tkl.1 | \n",
" Tkl% | \n",
" Past | \n",
" Succ | \n",
" % | \n",
" Def 3rd.1 | \n",
" Mid 3rd.1 | \n",
" Att 3rd.1 | \n",
" ShSv | \n",
" Pass | \n",
" Tkl+Int | \n",
" Clr | \n",
" Err | \n",
" Touches | \n",
" Def Pen | \n",
" Att Pen | \n",
" Succ% | \n",
" #Pl | \n",
" Megs | \n",
" Carries | \n",
" CPA | \n",
" Mis | \n",
" Dis | \n",
" Targ | \n",
" Rec | \n",
" Rec% | \n",
" Prog.1 | \n",
" Mn/MP | \n",
" Min% | \n",
" Mn/Start | \n",
" Compl | \n",
" Subs | \n",
" Mn/Sub | \n",
" unSub | \n",
" PPM | \n",
" onG | \n",
" onGA | \n",
" +/- | \n",
" +/-90 | \n",
" On-Off | \n",
" onxG | \n",
" onxGA | \n",
" xG+/- | \n",
" xG+/-90 | \n",
" On-Off.1 | \n",
" 2CrdY | \n",
" Fls | \n",
" PKwon | \n",
" PKcon | \n",
" OG | \n",
" Recov | \n",
" Won | \n",
" Lost | \n",
" Won% | \n",
" League Name | \n",
" League ID | \n",
" Season | \n",
" Team Name | \n",
" Team Country | \n",
" Player Lower | \n",
" First Name Lower | \n",
" Last Name Lower | \n",
" First Initial Lower | \n",
" Team Country Lower | \n",
" Nationality Code | \n",
" Nationality Cleaned | \n",
" Primary Pos | \n",
" Position Grouped | \n",
" Outfielder Goalkeeper | \n",
" GA | \n",
" GA90 | \n",
" SoTA | \n",
" Saves | \n",
" Save% | \n",
" W | \n",
" D | \n",
" L | \n",
" CS | \n",
" CS% | \n",
" PKA | \n",
" PKsv | \n",
" PKm | \n",
" Save%.1 | \n",
" PSxG | \n",
" PSxG/SoT | \n",
" PSxG+/- | \n",
" /90 | \n",
" Thr | \n",
" Launch% | \n",
" AvgLen | \n",
" Launch%.1 | \n",
" AvgLen.1 | \n",
" Opp | \n",
" Stp | \n",
" Stp% | \n",
" #OPA | \n",
" #OPA/90 | \n",
" AvgDist | \n",
" player_name_lower | \n",
" first_name_lower | \n",
" last_name_lower | \n",
" first_initial_lower | \n",
" country_lower | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" Aaron Cresswell | \n",
" eng ENG | \n",
" DF | \n",
" West Ham | \n",
" Premier League | \n",
" 27 | \n",
" 1989.0 | \n",
" 36 | \n",
" 35 | \n",
" 3069.0 | \n",
" 34.1 | \n",
" 1 | \n",
" 3 | \n",
" 1 | \n",
" 0 | \n",
" 0 | \n",
" 7 | \n",
" 0 | \n",
" 0.03 | \n",
" 0.09 | \n",
" 0.12 | \n",
" 0.03 | \n",
" 0.12 | \n",
" 0.8 | \n",
" 0.8 | \n",
" 2.8 | \n",
" 3.6 | \n",
" 0.02 | \n",
" 0.08 | \n",
" 0.10 | \n",
" 0.02 | \n",
" 0.10 | \n",
" Matches | \n",
" 21.0 | \n",
" 6.0 | \n",
" 28.6 | \n",
" 0.62 | \n",
" 0.18 | \n",
" 0.05 | \n",
" 0.17 | \n",
" 28.1 | \n",
" 8.0 | \n",
" 0.04 | \n",
" 0.2 | \n",
" 0.2 | \n",
" 1224.0 | \n",
" 1708.0 | \n",
" 71.7 | \n",
" 23519.0 | \n",
" 10212.0 | \n",
" 560.0 | \n",
" 623.0 | \n",
" 89.9 | \n",
" 472.0 | \n",
" 587.0 | \n",
" 80.4 | \n",
" 183.0 | \n",
" 449.0 | \n",
" 40.8 | \n",
" 0.2 | \n",
" 35.0 | \n",
" 117.0 | \n",
" 21.0 | \n",
" 14.0 | \n",
" 96.0 | \n",
" 1343.0 | \n",
" 365.0 | \n",
" 1.0 | \n",
" 222.0 | \n",
" 83.0 | \n",
" 93.0 | \n",
" 67.0 | \n",
" 35.0 | \n",
" 15.0 | \n",
" 9.0 | \n",
" 893.0 | \n",
" 293.0 | \n",
" 522.0 | \n",
" 1329.0 | \n",
" 78.0 | \n",
" 59.0 | \n",
" 210.0 | \n",
" 5.0 | \n",
" 15.0 | \n",
" 44.0 | \n",
" 39.0 | \n",
" 52.0 | \n",
" 62.0 | \n",
" 1.82 | \n",
" 35.0 | \n",
" 21.0 | \n",
" 1.0 | \n",
" 3.0 | \n",
" 0.0 | \n",
" 9.0 | \n",
" 0.26 | \n",
" 6.0 | \n",
" 3.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 38.0 | \n",
" 18.0 | \n",
" 15.0 | \n",
" 18.0 | \n",
" 5.0 | \n",
" 17.0 | \n",
" 53.1 | \n",
" 15.0 | \n",
" 115.0 | \n",
" 32.1 | \n",
" 181.0 | \n",
" 123.0 | \n",
" 54.0 | \n",
" 0.0 | \n",
" 38.0 | \n",
" 90.0 | \n",
" 133.0 | \n",
" 0.0 | \n",
" 2050.0 | \n",
" 125.0 | \n",
" 17.0 | \n",
" 33.3 | \n",
" 7.0 | \n",
" 0.0 | \n",
" 1071.0 | \n",
" 2.0 | \n",
" 18.0 | \n",
" 19.0 | \n",
" 1171.0 | \n",
" 1094.0 | \n",
" 93.4 | \n",
" 31.0 | \n",
" 85 | \n",
" 89.7 | \n",
" NaN | \n",
" 30.0 | \n",
" 1 | \n",
" NaN | \n",
" 1 | \n",
" 1.14 | \n",
" 45.0 | \n",
" 60.0 | \n",
" -15.0 | \n",
" -0.44 | \n",
" 0.84 | \n",
" 38.0 | \n",
" 51.5 | \n",
" -13.5 | \n",
" -0.40 | \n",
" 1.09 | \n",
" 0.0 | \n",
" 20 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 277.0 | \n",
" 70.0 | \n",
" 57.0 | \n",
" 55.1 | \n",
" Big-5-European-Leagues | \n",
" Big5 | \n",
" 2017/2018 | \n",
" West Ham | \n",
" England | \n",
" aaron cresswell | \n",
" aaron | \n",
" cresswell | \n",
" a | \n",
" england | \n",
" ENG | \n",
" England | \n",
" DF | \n",
" Defender | \n",
" Outfielder | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" aaron cresswell | \n",
" aaron | \n",
" cresswell | \n",
" a | \n",
" england | \n",
"
\n",
" \n",
" 1 | \n",
" Aaron Hunt | \n",
" de GER | \n",
" MF,FW | \n",
" Hamburger SV | \n",
" Bundeliga | \n",
" 30 | \n",
" 1986.0 | \n",
" 28 | \n",
" 26 | \n",
" 2081.0 | \n",
" 23.1 | \n",
" 3 | \n",
" 2 | \n",
" 2 | \n",
" 1 | \n",
" 1 | \n",
" 1 | \n",
" 0 | \n",
" 0.13 | \n",
" 0.09 | \n",
" 0.22 | \n",
" 0.09 | \n",
" 0.17 | \n",
" 2.8 | \n",
" 2.1 | \n",
" 5.6 | \n",
" 7.6 | \n",
" 0.12 | \n",
" 0.23 | \n",
" 0.35 | \n",
" 0.09 | \n",
" 0.32 | \n",
" Matches | \n",
" 27.0 | \n",
" 6.0 | \n",
" 22.2 | \n",
" 1.17 | \n",
" 0.26 | \n",
" 0.07 | \n",
" 0.33 | \n",
" 23.4 | \n",
" 10.0 | \n",
" 0.08 | \n",
" 0.2 | \n",
" -0.1 | \n",
" 883.0 | \n",
" 1229.0 | \n",
" 71.8 | \n",
" 16889.0 | \n",
" 5315.0 | \n",
" 406.0 | \n",
" 480.0 | \n",
" 84.6 | \n",
" 292.0 | \n",
" 376.0 | \n",
" 77.7 | \n",
" 165.0 | \n",
" 303.0 | \n",
" 54.5 | \n",
" -3.6 | \n",
" 65.0 | \n",
" 83.0 | \n",
" 31.0 | \n",
" 5.0 | \n",
" 97.0 | \n",
" 977.0 | \n",
" 252.0 | \n",
" 11.0 | \n",
" 245.0 | \n",
" 67.0 | \n",
" 66.0 | \n",
" 123.0 | \n",
" 35.0 | \n",
" 41.0 | \n",
" 14.0 | \n",
" 672.0 | \n",
" 236.0 | \n",
" 321.0 | \n",
" 999.0 | \n",
" 137.0 | \n",
" 42.0 | \n",
" 23.0 | \n",
" 9.0 | \n",
" 5.0 | \n",
" 29.0 | \n",
" 29.0 | \n",
" 49.0 | \n",
" 102.0 | \n",
" 4.25 | \n",
" 54.0 | \n",
" 43.0 | \n",
" 1.0 | \n",
" 2.0 | \n",
" 1.0 | \n",
" 6.0 | \n",
" 0.25 | \n",
" 5.0 | \n",
" 1.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 30.0 | \n",
" 22.0 | \n",
" 12.0 | \n",
" 16.0 | \n",
" 2.0 | \n",
" 5.0 | \n",
" 13.5 | \n",
" 32.0 | \n",
" 135.0 | \n",
" 27.9 | \n",
" 102.0 | \n",
" 261.0 | \n",
" 121.0 | \n",
" 0.0 | \n",
" 28.0 | \n",
" 44.0 | \n",
" 21.0 | \n",
" 0.0 | \n",
" 1475.0 | \n",
" 28.0 | \n",
" 68.0 | \n",
" 58.3 | \n",
" 23.0 | \n",
" 4.0 | \n",
" 892.0 | \n",
" 7.0 | \n",
" 45.0 | \n",
" 42.0 | \n",
" 1176.0 | \n",
" 893.0 | \n",
" 75.9 | \n",
" 178.0 | \n",
" 74 | \n",
" 68.0 | \n",
" NaN | \n",
" 14.0 | \n",
" 2 | \n",
" NaN | \n",
" 0 | \n",
" 1.07 | \n",
" 22.0 | \n",
" 34.0 | \n",
" -12.0 | \n",
" -0.52 | \n",
" 0.58 | \n",
" 27.0 | \n",
" 31.3 | \n",
" -4.3 | \n",
" -0.18 | \n",
" 0.94 | \n",
" 0.0 | \n",
" 27 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 213.0 | \n",
" 22.0 | \n",
" 37.0 | \n",
" 37.3 | \n",
" Big-5-European-Leagues | \n",
" Big5 | \n",
" 2017/2018 | \n",
" Hamburger SV | \n",
" Germany | \n",
" aaron hunt | \n",
" aaron | \n",
" hunt | \n",
" a | \n",
" germany | \n",
" GER | \n",
" Germany | \n",
" MF | \n",
" Midfielder | \n",
" Outfielder | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" aaron hunt | \n",
" aaron | \n",
" hunt | \n",
" a | \n",
" germany | \n",
"
\n",
" \n",
" 2 | \n",
" Aaron Lennon | \n",
" eng ENG | \n",
" MF | \n",
" Burnley | \n",
" Premier League | \n",
" 30 | \n",
" 1987.0 | \n",
" 14 | \n",
" 13 | \n",
" 1118.0 | \n",
" 12.4 | \n",
" 0 | \n",
" 2 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 2 | \n",
" 0 | \n",
" 0.00 | \n",
" 0.16 | \n",
" 0.16 | \n",
" 0.00 | \n",
" 0.16 | \n",
" 0.6 | \n",
" 0.6 | \n",
" 1.4 | \n",
" 2.0 | \n",
" 0.05 | \n",
" 0.11 | \n",
" 0.16 | \n",
" 0.05 | \n",
" 0.16 | \n",
" Matches | \n",
" 10.0 | \n",
" 4.0 | \n",
" 40.0 | \n",
" 0.81 | \n",
" 0.32 | \n",
" 0.00 | \n",
" 0.00 | \n",
" 16.6 | \n",
" 0.0 | \n",
" 0.06 | \n",
" -0.6 | \n",
" -0.6 | \n",
" 204.0 | \n",
" 294.0 | \n",
" 69.4 | \n",
" 3223.0 | \n",
" 887.0 | \n",
" 116.0 | \n",
" 142.0 | \n",
" 81.7 | \n",
" 68.0 | \n",
" 92.0 | \n",
" 73.9 | \n",
" 17.0 | \n",
" 34.0 | \n",
" 50.0 | \n",
" 0.6 | \n",
" 8.0 | \n",
" 11.0 | \n",
" 13.0 | \n",
" 5.0 | \n",
" 22.0 | \n",
" 289.0 | \n",
" 5.0 | \n",
" 0.0 | \n",
" 61.0 | \n",
" 5.0 | \n",
" 19.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 193.0 | \n",
" 51.0 | \n",
" 50.0 | \n",
" 27.0 | \n",
" 250.0 | \n",
" 7.0 | \n",
" 4.0 | \n",
" 3.0 | \n",
" 0.0 | \n",
" 9.0 | \n",
" 8.0 | \n",
" 30.0 | \n",
" 18.0 | \n",
" 1.45 | \n",
" 12.0 | \n",
" 0.0 | \n",
" 1.0 | \n",
" 1.0 | \n",
" 0.0 | \n",
" 3.0 | \n",
" 0.24 | \n",
" 2.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 1.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 18.0 | \n",
" 10.0 | \n",
" 6.0 | \n",
" 11.0 | \n",
" 1.0 | \n",
" 4.0 | \n",
" 19.0 | \n",
" 17.0 | \n",
" 61.0 | \n",
" 26.3 | \n",
" 74.0 | \n",
" 102.0 | \n",
" 56.0 | \n",
" 0.0 | \n",
" 24.0 | \n",
" 31.0 | \n",
" 9.0 | \n",
" 0.0 | \n",
" 424.0 | \n",
" 19.0 | \n",
" 36.0 | \n",
" 48.0 | \n",
" 12.0 | \n",
" 2.0 | \n",
" 290.0 | \n",
" 12.0 | \n",
" 9.0 | \n",
" 25.0 | \n",
" 353.0 | \n",
" 259.0 | \n",
" 73.4 | \n",
" 41.0 | \n",
" 80 | \n",
" 32.7 | \n",
" NaN | \n",
" 6.0 | \n",
" 1 | \n",
" NaN | \n",
" 0 | \n",
" 1.43 | \n",
" 17.0 | \n",
" 15.0 | \n",
" 2.0 | \n",
" 0.16 | \n",
" 0.36 | \n",
" 13.8 | \n",
" 15.4 | \n",
" -1.5 | \n",
" -0.12 | \n",
" 0.49 | \n",
" 0.0 | \n",
" 12 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 80.0 | \n",
" 7.0 | \n",
" 15.0 | \n",
" 31.8 | \n",
" Big-5-European-Leagues | \n",
" Big5 | \n",
" 2017/2018 | \n",
" Burnley | \n",
" England | \n",
" aaron lennon | \n",
" aaron | \n",
" lennon | \n",
" a | \n",
" england | \n",
" ENG | \n",
" England | \n",
" MF | \n",
" Midfielder | \n",
" Outfielder | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" aaron lennon | \n",
" aaron | \n",
" lennon | \n",
" a | \n",
" england | \n",
"
\n",
" \n",
" 3 | \n",
" Aaron Lennon | \n",
" eng ENG | \n",
" FW,MF | \n",
" Everton | \n",
" Premier League | \n",
" 30 | \n",
" 1987.0 | \n",
" 15 | \n",
" 9 | \n",
" 793.0 | \n",
" 8.8 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0.00 | \n",
" 0.00 | \n",
" 0.00 | \n",
" 0.00 | \n",
" 0.00 | \n",
" 0.3 | \n",
" 0.3 | \n",
" 0.5 | \n",
" 0.8 | \n",
" 0.04 | \n",
" 0.05 | \n",
" 0.09 | \n",
" 0.04 | \n",
" 0.09 | \n",
" Matches | \n",
" 4.0 | \n",
" 1.0 | \n",
" 25.0 | \n",
" 0.45 | \n",
" 0.11 | \n",
" 0.00 | \n",
" 0.00 | \n",
" 14.8 | \n",
" 0.0 | \n",
" 0.08 | \n",
" -0.3 | \n",
" -0.3 | \n",
" 152.0 | \n",
" 214.0 | \n",
" 71.0 | \n",
" 2286.0 | \n",
" 672.0 | \n",
" 92.0 | \n",
" 115.0 | \n",
" 80.0 | \n",
" 53.0 | \n",
" 69.0 | \n",
" 76.8 | \n",
" 5.0 | \n",
" 13.0 | \n",
" 38.5 | \n",
" -0.5 | \n",
" 5.0 | \n",
" 9.0 | \n",
" 3.0 | \n",
" 2.0 | \n",
" 17.0 | \n",
" 199.0 | \n",
" 15.0 | \n",
" 0.0 | \n",
" 49.0 | \n",
" 2.0 | \n",
" 8.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 129.0 | \n",
" 47.0 | \n",
" 38.0 | \n",
" 29.0 | \n",
" 159.0 | \n",
" 10.0 | \n",
" 14.0 | \n",
" 0.0 | \n",
" 1.0 | \n",
" 3.0 | \n",
" 7.0 | \n",
" 15.0 | \n",
" 16.0 | \n",
" 1.82 | \n",
" 11.0 | \n",
" 0.0 | \n",
" 1.0 | \n",
" 2.0 | \n",
" 0.0 | \n",
" 4.0 | \n",
" 0.45 | \n",
" 2.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 1.0 | \n",
" 1.0 | \n",
" 0.0 | \n",
" 18.0 | \n",
" 10.0 | \n",
" 9.0 | \n",
" 7.0 | \n",
" 2.0 | \n",
" 5.0 | \n",
" 25.0 | \n",
" 15.0 | \n",
" 38.0 | \n",
" 19.3 | \n",
" 49.0 | \n",
" 102.0 | \n",
" 46.0 | \n",
" 0.0 | \n",
" 18.0 | \n",
" 25.0 | \n",
" 9.0 | \n",
" 0.0 | \n",
" 322.0 | \n",
" 7.0 | \n",
" 22.0 | \n",
" 35.0 | \n",
" 8.0 | \n",
" 1.0 | \n",
" 186.0 | \n",
" 8.0 | \n",
" 9.0 | \n",
" 17.0 | \n",
" 288.0 | \n",
" 195.0 | \n",
" 67.7 | \n",
" 33.0 | \n",
" 53 | \n",
" 23.2 | \n",
" NaN | \n",
" 2.0 | \n",
" 6 | \n",
" NaN | \n",
" 0 | \n",
" 1.27 | \n",
" 15.0 | \n",
" 14.0 | \n",
" 1.0 | \n",
" 0.11 | \n",
" 0.63 | \n",
" 12.0 | \n",
" 13.7 | \n",
" -1.6 | \n",
" -0.19 | \n",
" 0.13 | \n",
" 0.0 | \n",
" 9 | \n",
" 2.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 50.0 | \n",
" 6.0 | \n",
" 12.0 | \n",
" 33.3 | \n",
" Big-5-European-Leagues | \n",
" Big5 | \n",
" 2017/2018 | \n",
" Everton | \n",
" England | \n",
" aaron lennon | \n",
" aaron | \n",
" lennon | \n",
" a | \n",
" england | \n",
" ENG | \n",
" England | \n",
" FW | \n",
" Forward | \n",
" Outfielder | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" aaron lennon | \n",
" aaron | \n",
" lennon | \n",
" a | \n",
" england | \n",
"
\n",
" \n",
" 4 | \n",
" Aaron Mooy | \n",
" au AUS | \n",
" MF | \n",
" Huddersfield | \n",
" Premier League | \n",
" 26 | \n",
" 1990.0 | \n",
" 36 | \n",
" 34 | \n",
" 3067.0 | \n",
" 34.1 | \n",
" 4 | \n",
" 3 | \n",
" 3 | \n",
" 1 | \n",
" 1 | \n",
" 4 | \n",
" 0 | \n",
" 0.12 | \n",
" 0.09 | \n",
" 0.21 | \n",
" 0.09 | \n",
" 0.18 | \n",
" 2.6 | \n",
" 1.8 | \n",
" 3.1 | \n",
" 4.9 | \n",
" 0.08 | \n",
" 0.09 | \n",
" 0.17 | \n",
" 0.05 | \n",
" 0.14 | \n",
" Matches | \n",
" 28.0 | \n",
" 6.0 | \n",
" 21.4 | \n",
" 0.82 | \n",
" 0.18 | \n",
" 0.11 | \n",
" 0.50 | \n",
" 22.0 | \n",
" 3.0 | \n",
" 0.06 | \n",
" 1.4 | \n",
" 1.2 | \n",
" 1561.0 | \n",
" 2067.0 | \n",
" 75.5 | \n",
" 27911.0 | \n",
" 7921.0 | \n",
" 783.0 | \n",
" 876.0 | \n",
" 89.4 | \n",
" 540.0 | \n",
" 678.0 | \n",
" 79.6 | \n",
" 196.0 | \n",
" 397.0 | \n",
" 49.4 | \n",
" -0.1 | \n",
" 48.0 | \n",
" 167.0 | \n",
" 27.0 | \n",
" 9.0 | \n",
" 163.0 | \n",
" 1897.0 | \n",
" 170.0 | \n",
" 1.0 | \n",
" 422.0 | \n",
" 100.0 | \n",
" 85.0 | \n",
" 77.0 | \n",
" 35.0 | \n",
" 21.0 | \n",
" 5.0 | \n",
" 1293.0 | \n",
" 283.0 | \n",
" 491.0 | \n",
" 507.0 | \n",
" 1444.0 | \n",
" 77.0 | \n",
" 5.0 | \n",
" 4.0 | \n",
" 6.0 | \n",
" 38.0 | \n",
" 60.0 | \n",
" 60.0 | \n",
" 73.0 | \n",
" 2.14 | \n",
" 54.0 | \n",
" 16.0 | \n",
" 0.0 | \n",
" 1.0 | \n",
" 2.0 | \n",
" 5.0 | \n",
" 0.15 | \n",
" 4.0 | \n",
" 1.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 105.0 | \n",
" 55.0 | \n",
" 38.0 | \n",
" 54.0 | \n",
" 13.0 | \n",
" 32.0 | \n",
" 44.4 | \n",
" 40.0 | \n",
" 193.0 | \n",
" 29.5 | \n",
" 192.0 | \n",
" 355.0 | \n",
" 107.0 | \n",
" 2.0 | \n",
" 52.0 | \n",
" 151.0 | \n",
" 70.0 | \n",
" 0.0 | \n",
" 2496.0 | \n",
" 65.0 | \n",
" 32.0 | \n",
" 53.2 | \n",
" 26.0 | \n",
" 0.0 | \n",
" 1543.0 | \n",
" 6.0 | \n",
" 33.0 | \n",
" 60.0 | \n",
" 1710.0 | \n",
" 1540.0 | \n",
" 90.1 | \n",
" 85.0 | \n",
" 85 | \n",
" 89.7 | \n",
" NaN | \n",
" 29.0 | \n",
" 2 | \n",
" NaN | \n",
" 0 | \n",
" 0.94 | \n",
" 25.0 | \n",
" 52.0 | \n",
" -27.0 | \n",
" -0.79 | \n",
" -0.03 | \n",
" 28.7 | \n",
" 49.8 | \n",
" -21.1 | \n",
" -0.62 | \n",
" -0.01 | \n",
" 0.0 | \n",
" 26 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 455.0 | \n",
" 35.0 | \n",
" 42.0 | \n",
" 45.5 | \n",
" Big-5-European-Leagues | \n",
" Big5 | \n",
" 2017/2018 | \n",
" Huddersfield | \n",
" England | \n",
" aaron mooy | \n",
" aaron | \n",
" mooy | \n",
" a | \n",
" england | \n",
" AUS | \n",
" Australia | \n",
" MF | \n",
" Midfielder | \n",
" Outfielder | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" aaron mooy | \n",
" aaron | \n",
" mooy | \n",
" a | \n",
" australia | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" Player Nation Pos Squad Comp Age Born \\\n",
"0 Aaron Cresswell eng ENG DF West Ham Premier League 27 1989.0 \n",
"1 Aaron Hunt de GER MF,FW Hamburger SV Bundeliga 30 1986.0 \n",
"2 Aaron Lennon eng ENG MF Burnley Premier League 30 1987.0 \n",
"3 Aaron Lennon eng ENG FW,MF Everton Premier League 30 1987.0 \n",
"4 Aaron Mooy au AUS MF Huddersfield Premier League 26 1990.0 \n",
"\n",
" MP Starts Min 90s Gls Ast G-PK PK PKatt CrdY CrdR Gls.1 \\\n",
"0 36 35 3069.0 34.1 1 3 1 0 0 7 0 0.03 \n",
"1 28 26 2081.0 23.1 3 2 2 1 1 1 0 0.13 \n",
"2 14 13 1118.0 12.4 0 2 0 0 0 2 0 0.00 \n",
"3 15 9 793.0 8.8 0 0 0 0 0 0 0 0.00 \n",
"4 36 34 3067.0 34.1 4 3 3 1 1 4 0 0.12 \n",
"\n",
" Ast.1 G+A G-PK.1 G+A-PK xG npxG xA npxG+xA xG.1 xA.1 xG+xA \\\n",
"0 0.09 0.12 0.03 0.12 0.8 0.8 2.8 3.6 0.02 0.08 0.10 \n",
"1 0.09 0.22 0.09 0.17 2.8 2.1 5.6 7.6 0.12 0.23 0.35 \n",
"2 0.16 0.16 0.00 0.16 0.6 0.6 1.4 2.0 0.05 0.11 0.16 \n",
"3 0.00 0.00 0.00 0.00 0.3 0.3 0.5 0.8 0.04 0.05 0.09 \n",
"4 0.09 0.21 0.09 0.18 2.6 1.8 3.1 4.9 0.08 0.09 0.17 \n",
"\n",
" npxG.1 npxG+xA.1 Matches Sh SoT SoT% Sh/90 SoT/90 G/Sh G/SoT \\\n",
"0 0.02 0.10 Matches 21.0 6.0 28.6 0.62 0.18 0.05 0.17 \n",
"1 0.09 0.32 Matches 27.0 6.0 22.2 1.17 0.26 0.07 0.33 \n",
"2 0.05 0.16 Matches 10.0 4.0 40.0 0.81 0.32 0.00 0.00 \n",
"3 0.04 0.09 Matches 4.0 1.0 25.0 0.45 0.11 0.00 0.00 \n",
"4 0.05 0.14 Matches 28.0 6.0 21.4 0.82 0.18 0.11 0.50 \n",
"\n",
" Dist FK npxG/Sh G-xG np:G-xG Cmp Att Cmp% TotDist PrgDist \\\n",
"0 28.1 8.0 0.04 0.2 0.2 1224.0 1708.0 71.7 23519.0 10212.0 \n",
"1 23.4 10.0 0.08 0.2 -0.1 883.0 1229.0 71.8 16889.0 5315.0 \n",
"2 16.6 0.0 0.06 -0.6 -0.6 204.0 294.0 69.4 3223.0 887.0 \n",
"3 14.8 0.0 0.08 -0.3 -0.3 152.0 214.0 71.0 2286.0 672.0 \n",
"4 22.0 3.0 0.06 1.4 1.2 1561.0 2067.0 75.5 27911.0 7921.0 \n",
"\n",
" Cmp.1 Att.1 Cmp%.1 Cmp.2 Att.2 Cmp%.2 Cmp.3 Att.3 Cmp%.3 A-xA \\\n",
"0 560.0 623.0 89.9 472.0 587.0 80.4 183.0 449.0 40.8 0.2 \n",
"1 406.0 480.0 84.6 292.0 376.0 77.7 165.0 303.0 54.5 -3.6 \n",
"2 116.0 142.0 81.7 68.0 92.0 73.9 17.0 34.0 50.0 0.6 \n",
"3 92.0 115.0 80.0 53.0 69.0 76.8 5.0 13.0 38.5 -0.5 \n",
"4 783.0 876.0 89.4 540.0 678.0 79.6 196.0 397.0 49.4 -0.1 \n",
"\n",
" KP 1/3 PPA CrsPA Prog Live Dead TB Press Sw Crs \\\n",
"0 35.0 117.0 21.0 14.0 96.0 1343.0 365.0 1.0 222.0 83.0 93.0 \n",
"1 65.0 83.0 31.0 5.0 97.0 977.0 252.0 11.0 245.0 67.0 66.0 \n",
"2 8.0 11.0 13.0 5.0 22.0 289.0 5.0 0.0 61.0 5.0 19.0 \n",
"3 5.0 9.0 3.0 2.0 17.0 199.0 15.0 0.0 49.0 2.0 8.0 \n",
"4 48.0 167.0 27.0 9.0 163.0 1897.0 170.0 1.0 422.0 100.0 85.0 \n",
"\n",
" CK In Out Str Ground Low High Left Right Head TI \\\n",
"0 67.0 35.0 15.0 9.0 893.0 293.0 522.0 1329.0 78.0 59.0 210.0 \n",
"1 123.0 35.0 41.0 14.0 672.0 236.0 321.0 999.0 137.0 42.0 23.0 \n",
"2 0.0 0.0 0.0 0.0 193.0 51.0 50.0 27.0 250.0 7.0 4.0 \n",
"3 0.0 0.0 0.0 0.0 129.0 47.0 38.0 29.0 159.0 10.0 14.0 \n",
"4 77.0 35.0 21.0 5.0 1293.0 283.0 491.0 507.0 1444.0 77.0 5.0 \n",
"\n",
" Other Off Out.1 Int Blocks SCA SCA90 PassLive PassDead Drib \\\n",
"0 5.0 15.0 44.0 39.0 52.0 62.0 1.82 35.0 21.0 1.0 \n",
"1 9.0 5.0 29.0 29.0 49.0 102.0 4.25 54.0 43.0 1.0 \n",
"2 3.0 0.0 9.0 8.0 30.0 18.0 1.45 12.0 0.0 1.0 \n",
"3 0.0 1.0 3.0 7.0 15.0 16.0 1.82 11.0 0.0 1.0 \n",
"4 4.0 6.0 38.0 60.0 60.0 73.0 2.14 54.0 16.0 0.0 \n",
"\n",
" Fld Def GCA GCA90 PassLive.1 PassDead.1 Drib.1 Sh.1 Fld.1 Def.1 \\\n",
"0 3.0 0.0 9.0 0.26 6.0 3.0 0.0 0.0 0.0 0.0 \n",
"1 2.0 1.0 6.0 0.25 5.0 1.0 0.0 0.0 0.0 0.0 \n",
"2 1.0 0.0 3.0 0.24 2.0 0.0 0.0 1.0 0.0 0.0 \n",
"3 2.0 0.0 4.0 0.45 2.0 0.0 0.0 1.0 1.0 0.0 \n",
"4 1.0 2.0 5.0 0.15 4.0 1.0 0.0 0.0 0.0 0.0 \n",
"\n",
" Tkl TklW Def 3rd Mid 3rd Att 3rd Tkl.1 Tkl% Past Succ % \\\n",
"0 38.0 18.0 15.0 18.0 5.0 17.0 53.1 15.0 115.0 32.1 \n",
"1 30.0 22.0 12.0 16.0 2.0 5.0 13.5 32.0 135.0 27.9 \n",
"2 18.0 10.0 6.0 11.0 1.0 4.0 19.0 17.0 61.0 26.3 \n",
"3 18.0 10.0 9.0 7.0 2.0 5.0 25.0 15.0 38.0 19.3 \n",
"4 105.0 55.0 38.0 54.0 13.0 32.0 44.4 40.0 193.0 29.5 \n",
"\n",
" Def 3rd.1 Mid 3rd.1 Att 3rd.1 ShSv Pass Tkl+Int Clr Err Touches \\\n",
"0 181.0 123.0 54.0 0.0 38.0 90.0 133.0 0.0 2050.0 \n",
"1 102.0 261.0 121.0 0.0 28.0 44.0 21.0 0.0 1475.0 \n",
"2 74.0 102.0 56.0 0.0 24.0 31.0 9.0 0.0 424.0 \n",
"3 49.0 102.0 46.0 0.0 18.0 25.0 9.0 0.0 322.0 \n",
"4 192.0 355.0 107.0 2.0 52.0 151.0 70.0 0.0 2496.0 \n",
"\n",
" Def Pen Att Pen Succ% #Pl Megs Carries CPA Mis Dis Targ \\\n",
"0 125.0 17.0 33.3 7.0 0.0 1071.0 2.0 18.0 19.0 1171.0 \n",
"1 28.0 68.0 58.3 23.0 4.0 892.0 7.0 45.0 42.0 1176.0 \n",
"2 19.0 36.0 48.0 12.0 2.0 290.0 12.0 9.0 25.0 353.0 \n",
"3 7.0 22.0 35.0 8.0 1.0 186.0 8.0 9.0 17.0 288.0 \n",
"4 65.0 32.0 53.2 26.0 0.0 1543.0 6.0 33.0 60.0 1710.0 \n",
"\n",
" Rec Rec% Prog.1 Mn/MP Min% Mn/Start Compl Subs Mn/Sub unSub \\\n",
"0 1094.0 93.4 31.0 85 89.7 NaN 30.0 1 NaN 1 \n",
"1 893.0 75.9 178.0 74 68.0 NaN 14.0 2 NaN 0 \n",
"2 259.0 73.4 41.0 80 32.7 NaN 6.0 1 NaN 0 \n",
"3 195.0 67.7 33.0 53 23.2 NaN 2.0 6 NaN 0 \n",
"4 1540.0 90.1 85.0 85 89.7 NaN 29.0 2 NaN 0 \n",
"\n",
" PPM onG onGA +/- +/-90 On-Off onxG onxGA xG+/- xG+/-90 \\\n",
"0 1.14 45.0 60.0 -15.0 -0.44 0.84 38.0 51.5 -13.5 -0.40 \n",
"1 1.07 22.0 34.0 -12.0 -0.52 0.58 27.0 31.3 -4.3 -0.18 \n",
"2 1.43 17.0 15.0 2.0 0.16 0.36 13.8 15.4 -1.5 -0.12 \n",
"3 1.27 15.0 14.0 1.0 0.11 0.63 12.0 13.7 -1.6 -0.19 \n",
"4 0.94 25.0 52.0 -27.0 -0.79 -0.03 28.7 49.8 -21.1 -0.62 \n",
"\n",
" On-Off.1 2CrdY Fls PKwon PKcon OG Recov Won Lost Won% \\\n",
"0 1.09 0.0 20 0.0 0.0 0.0 277.0 70.0 57.0 55.1 \n",
"1 0.94 0.0 27 0.0 0.0 0.0 213.0 22.0 37.0 37.3 \n",
"2 0.49 0.0 12 0.0 0.0 0.0 80.0 7.0 15.0 31.8 \n",
"3 0.13 0.0 9 2.0 0.0 0.0 50.0 6.0 12.0 33.3 \n",
"4 -0.01 0.0 26 0.0 0.0 0.0 455.0 35.0 42.0 45.5 \n",
"\n",
" League Name League ID Season Team Name Team Country \\\n",
"0 Big-5-European-Leagues Big5 2017/2018 West Ham England \n",
"1 Big-5-European-Leagues Big5 2017/2018 Hamburger SV Germany \n",
"2 Big-5-European-Leagues Big5 2017/2018 Burnley England \n",
"3 Big-5-European-Leagues Big5 2017/2018 Everton England \n",
"4 Big-5-European-Leagues Big5 2017/2018 Huddersfield England \n",
"\n",
" Player Lower First Name Lower Last Name Lower First Initial Lower \\\n",
"0 aaron cresswell aaron cresswell a \n",
"1 aaron hunt aaron hunt a \n",
"2 aaron lennon aaron lennon a \n",
"3 aaron lennon aaron lennon a \n",
"4 aaron mooy aaron mooy a \n",
"\n",
" Team Country Lower Nationality Code Nationality Cleaned Primary Pos \\\n",
"0 england ENG England DF \n",
"1 germany GER Germany MF \n",
"2 england ENG England MF \n",
"3 england ENG England FW \n",
"4 england AUS Australia MF \n",
"\n",
" Position Grouped Outfielder Goalkeeper GA GA90 SoTA Saves Save% W \\\n",
"0 Defender Outfielder NaN NaN NaN NaN NaN NaN \n",
"1 Midfielder Outfielder NaN NaN NaN NaN NaN NaN \n",
"2 Midfielder Outfielder NaN NaN NaN NaN NaN NaN \n",
"3 Forward Outfielder NaN NaN NaN NaN NaN NaN \n",
"4 Midfielder Outfielder NaN NaN NaN NaN NaN NaN \n",
"\n",
" D L CS CS% PKA PKsv PKm Save%.1 PSxG PSxG/SoT PSxG+/- /90 \\\n",
"0 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN \n",
"1 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN \n",
"2 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN \n",
"3 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN \n",
"4 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN \n",
"\n",
" Thr Launch% AvgLen Launch%.1 AvgLen.1 Opp Stp Stp% #OPA #OPA/90 \\\n",
"0 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN \n",
"1 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN \n",
"2 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN \n",
"3 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN \n",
"4 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN \n",
"\n",
" AvgDist player_name_lower first_name_lower last_name_lower \\\n",
"0 NaN aaron cresswell aaron cresswell \n",
"1 NaN aaron hunt aaron hunt \n",
"2 NaN aaron lennon aaron lennon \n",
"3 NaN aaron lennon aaron lennon \n",
"4 NaN aaron mooy aaron mooy \n",
"\n",
" first_initial_lower country_lower \n",
"0 a england \n",
"1 a germany \n",
"2 a england \n",
"3 a england \n",
"4 a australia "
]
},
"execution_count": 34,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# Display DataFrame\n",
"df_fbref_players.head()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"##### Rename columns"
]
},
{
"cell_type": "code",
"execution_count": 35,
"metadata": {},
"outputs": [],
"source": [
"## Rename columns\n",
"df_fbref_players = (df_fbref_players\n",
" .rename(columns={'Born': 'birth_year',\n",
" 'Outfielder Goalkeeper': 'outfielder_goalkeeper',\n",
" 'Season': 'season',\n",
" }\n",
" )\n",
" )"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"##### Select columns of interest"
]
},
{
"cell_type": "code",
"execution_count": 36,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" Player | \n",
" first_initial_lower | \n",
" first_name_lower | \n",
" last_name_lower | \n",
" birth_year | \n",
" country_lower | \n",
" outfielder_goalkeeper | \n",
" season | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" Aaron Cresswell | \n",
" a | \n",
" aaron | \n",
" cresswell | \n",
" 1989.0 | \n",
" england | \n",
" Outfielder | \n",
" 2017/2018 | \n",
"
\n",
" \n",
" 1 | \n",
" Aaron Hunt | \n",
" a | \n",
" aaron | \n",
" hunt | \n",
" 1986.0 | \n",
" germany | \n",
" Outfielder | \n",
" 2017/2018 | \n",
"
\n",
" \n",
" 2 | \n",
" Aaron Lennon | \n",
" a | \n",
" aaron | \n",
" lennon | \n",
" 1987.0 | \n",
" england | \n",
" Outfielder | \n",
" 2017/2018 | \n",
"
\n",
" \n",
" 4 | \n",
" Aaron Mooy | \n",
" a | \n",
" aaron | \n",
" mooy | \n",
" 1990.0 | \n",
" australia | \n",
" Outfielder | \n",
" 2017/2018 | \n",
"
\n",
" \n",
" 5 | \n",
" Aaron Ramsey | \n",
" a | \n",
" aaron | \n",
" ramsey | \n",
" 1990.0 | \n",
" wales | \n",
" Outfielder | \n",
" 2017/2018 | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" Player first_initial_lower first_name_lower last_name_lower \\\n",
"0 Aaron Cresswell a aaron cresswell \n",
"1 Aaron Hunt a aaron hunt \n",
"2 Aaron Lennon a aaron lennon \n",
"4 Aaron Mooy a aaron mooy \n",
"5 Aaron Ramsey a aaron ramsey \n",
"\n",
" birth_year country_lower outfielder_goalkeeper season \n",
"0 1989.0 england Outfielder 2017/2018 \n",
"1 1986.0 germany Outfielder 2017/2018 \n",
"2 1987.0 england Outfielder 2017/2018 \n",
"4 1990.0 australia Outfielder 2017/2018 \n",
"5 1990.0 wales Outfielder 2017/2018 "
]
},
"execution_count": 36,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"## Define columns\n",
"cols_fbref_players = ['Player',\n",
" 'first_initial_lower',\n",
" 'first_name_lower',\n",
" 'last_name_lower',\n",
" #'age',\n",
" 'birth_year',\n",
" 'country_lower',\n",
" 'outfielder_goalkeeper',\n",
" 'season'\n",
" ]\n",
"\n",
"## Select columns of interest\n",
"df_fbref_players_select = df_fbref_players[cols_fbref_players]\n",
"\n",
"# Drop duplicates\n",
"df_fbref_players_select = df_fbref_players_select.drop_duplicates()\n",
"\n",
"# Display DataFrame\n",
"df_fbref_players_select.head()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"\n",
"\n",
"### 4.3. TransferMarkt Bio and Status"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"##### Filter for 'Big 5' European Leagues"
]
},
{
"cell_type": "code",
"execution_count": 37,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"['GB1', 'IT1', 'FR1', 'L1', 'ES1', 'MLS1']"
]
},
"execution_count": 37,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"lst_leagues_tm_bio_status = list(df_tm_bio_status['league_code'].unique())\n",
"lst_leagues_tm_bio_status"
]
},
{
"cell_type": "code",
"execution_count": 38,
"metadata": {},
"outputs": [],
"source": [
"lst_leagues_tm_bio_status_big5 = ['GB1', 'IT1', 'FR1', 'L1', 'ES1']"
]
},
{
"cell_type": "code",
"execution_count": 39,
"metadata": {},
"outputs": [],
"source": [
"df_tm_bio_status = df_tm_bio_status[df_tm_bio_status['league_code'].isin(lst_leagues_tm_bio_status_big5)]"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"##### Lower names"
]
},
{
"cell_type": "code",
"execution_count": 40,
"metadata": {},
"outputs": [],
"source": [
"# Remove accents and create lowercase name\n",
"df_tm_bio_status['player_name_lower'] = (df_tm_bio_status['player_name']\n",
" .str.normalize('NFKD')\n",
" .str.encode('ascii', errors='ignore')\n",
" .str.decode('utf-8')\n",
" .str.lower()\n",
" )"
]
},
{
"cell_type": "code",
"execution_count": 41,
"metadata": {},
"outputs": [],
"source": [
"# First Name Lower\n",
"df_tm_bio_status['first_name_lower'] = df_tm_bio_status['player_name_lower'].str.rsplit(' ', 0).str[0]\n",
"\n",
"# Last Name Lower\n",
"df_tm_bio_status['last_name_lower'] = df_tm_bio_status['player_name_lower'].str.rsplit(' ', 1).str[-1]\n",
"\n",
"# First Initial Lower\n",
"df_tm_bio_status['first_initial_lower'] = df_tm_bio_status['player_name_lower'].astype(str).str[0]"
]
},
{
"cell_type": "code",
"execution_count": 42,
"metadata": {},
"outputs": [],
"source": [
"# Remove accents and create lowercase name\n",
"df_tm_bio_status['country_lower'] = (df_tm_bio_status['cob']\n",
" .str.normalize('NFKD')\n",
" .str.encode('ascii', errors='ignore')\n",
" .str.decode('utf-8')\n",
" .str.lower()\n",
" )"
]
},
{
"cell_type": "code",
"execution_count": 43,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" tm_id | \n",
" player_name | \n",
" birth_day | \n",
" birth_month | \n",
" birth_year | \n",
" pob | \n",
" cob | \n",
" dob | \n",
" position | \n",
" height | \n",
" foot | \n",
" citizenship | \n",
" second_citizenship | \n",
" league_code | \n",
" season | \n",
" current_club | \n",
" current_club_country | \n",
" market_value_euros | \n",
" joined | \n",
" contract_expires | \n",
" contract_option | \n",
" on_loan_from | \n",
" on_loan_from_country | \n",
" loan_contract_expiry | \n",
" player_agent | \n",
" name_lower | \n",
" firstname_lower | \n",
" lastname_lower | \n",
" firstinitial_lower | \n",
" league_country_lower | \n",
" position_code | \n",
" position_grouped | \n",
" outfielder_goalkeeper | \n",
" age | \n",
" age_when_joining | \n",
" years_since_joining | \n",
" years_until_contract_expiry | \n",
" market_value_pounds | \n",
" player_name_lower | \n",
" first_name_lower | \n",
" last_name_lower | \n",
" first_initial_lower | \n",
" country_lower | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" 2857 | \n",
" eldin jakupovic | \n",
" 2.0 | \n",
" 10.0 | \n",
" 1984.0 | \n",
" Kozarac | \n",
" Jugoslawien (SFR) | \n",
" 1984-10-02 | \n",
" Goalkeeper | \n",
" 191.0 | \n",
" right | \n",
" NaN | \n",
" Bosnia-Herzegovina | \n",
" GB1 | \n",
" 2021 | \n",
" leicester city | \n",
" england | \n",
" 300000.0 | \n",
" 2017-07-19 | \n",
" 2021-06-30 | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" HSD | \n",
" eldin jakupovic | \n",
" eldin | \n",
" jakupovic | \n",
" e | \n",
" england | \n",
" GK | \n",
" Goalkeeper | \n",
" Goalkeeper | \n",
" 36.0 | \n",
" 32.0 | \n",
" 4.0 | \n",
" -1.0 | \n",
" 270000.0 | \n",
" eldin jakupovic | \n",
" eldin | \n",
" jakupovic | \n",
" e | \n",
" jugoslawien (sfr) | \n",
"
\n",
" \n",
" 1 | \n",
" 3333 | \n",
" james milner | \n",
" 4.0 | \n",
" 1.0 | \n",
" 1986.0 | \n",
" Leeds | \n",
" England | \n",
" 1986-01-04 | \n",
" midfield - Central Midfield | \n",
" 175.0 | \n",
" right | \n",
" England | \n",
" NaN | \n",
" GB1 | \n",
" 2021 | \n",
" liverpool fc | \n",
" england | \n",
" 3000000.0 | \n",
" 2015-07-01 | \n",
" 2022-06-30 | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" Samii Sport-Marketing Agentur | \n",
" james milner | \n",
" james | \n",
" milner | \n",
" j | \n",
" england | \n",
" CM | \n",
" Midfielder | \n",
" Outfielder | \n",
" 35.0 | \n",
" 29.0 | \n",
" 6.0 | \n",
" 0.0 | \n",
" 2700000.0 | \n",
" james milner | \n",
" james | \n",
" milner | \n",
" j | \n",
" england | \n",
"
\n",
" \n",
" 2 | \n",
" 3455 | \n",
" zlatan ibrahimovic | \n",
" 3.0 | \n",
" 10.0 | \n",
" 1981.0 | \n",
" Malmö | \n",
" Sweden | \n",
" 1981-10-03 | \n",
" attack - Centre-Forward | \n",
" 195.0 | \n",
" both | \n",
" NaN | \n",
" Bosnia-Herzegovina | \n",
" IT1 | \n",
" 2021 | \n",
" ac milan | \n",
" italy | \n",
" 4000000.0 | \n",
" 2020-01-02 | \n",
" 2022-06-30 | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" Mino Raiola | \n",
" zlatan ibrahimovic | \n",
" zlatan | \n",
" ibrahimovic | \n",
" z | \n",
" italy | \n",
" ST | \n",
" Forward | \n",
" Outfielder | \n",
" 39.0 | \n",
" 38.0 | \n",
" 1.0 | \n",
" 0.0 | \n",
" 3600000.0 | \n",
" zlatan ibrahimovic | \n",
" zlatan | \n",
" ibrahimovic | \n",
" z | \n",
" sweden | \n",
"
\n",
" \n",
" 3 | \n",
" 5578 | \n",
" nicolas penneteau | \n",
" 28.0 | \n",
" 2.0 | \n",
" 1981.0 | \n",
" Marseille | \n",
" France | \n",
" 1981-02-28 | \n",
" Goalkeeper | \n",
" 185.0 | \n",
" left | \n",
" France | \n",
" NaN | \n",
" FR1 | \n",
" 2021 | \n",
" stade reims | \n",
" france | \n",
" 200000.0 | \n",
" 2021-07-01 | \n",
" 2023-06-30 | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" USM GROUP | \n",
" nicolas penneteau | \n",
" nicolas | \n",
" penneteau | \n",
" n | \n",
" france | \n",
" GK | \n",
" Goalkeeper | \n",
" Goalkeeper | \n",
" 40.0 | \n",
" 40.0 | \n",
" 0.0 | \n",
" 1.0 | \n",
" 180000.0 | \n",
" nicolas penneteau | \n",
" nicolas | \n",
" penneteau | \n",
" n | \n",
" france | \n",
"
\n",
" \n",
" 4 | \n",
" 6442 | \n",
" antonio rosati | \n",
" 26.0 | \n",
" 6.0 | \n",
" 1983.0 | \n",
" Tivoli | \n",
" Italy | \n",
" 1983-06-26 | \n",
" Goalkeeper | \n",
" 195.0 | \n",
" right | \n",
" Italy | \n",
" NaN | \n",
" IT1 | \n",
" 2021 | \n",
" acf fiorentina | \n",
" italy | \n",
" 100000.0 | \n",
" 2021-02-01 | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" Alessandro Lucci - WSA | \n",
" antonio rosati | \n",
" antonio | \n",
" rosati | \n",
" a | \n",
" italy | \n",
" GK | \n",
" Goalkeeper | \n",
" Goalkeeper | \n",
" 38.0 | \n",
" 37.0 | \n",
" 0.0 | \n",
" NaN | \n",
" 90000.0 | \n",
" antonio rosati | \n",
" antonio | \n",
" rosati | \n",
" a | \n",
" italy | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" tm_id player_name birth_day birth_month birth_year pob \\\n",
"0 2857 eldin jakupovic 2.0 10.0 1984.0 Kozarac \n",
"1 3333 james milner 4.0 1.0 1986.0 Leeds \n",
"2 3455 zlatan ibrahimovic 3.0 10.0 1981.0 Malmö \n",
"3 5578 nicolas penneteau 28.0 2.0 1981.0 Marseille \n",
"4 6442 antonio rosati 26.0 6.0 1983.0 Tivoli \n",
"\n",
" cob dob position height foot \\\n",
"0 Jugoslawien (SFR) 1984-10-02 Goalkeeper 191.0 right \n",
"1 England 1986-01-04 midfield - Central Midfield 175.0 right \n",
"2 Sweden 1981-10-03 attack - Centre-Forward 195.0 both \n",
"3 France 1981-02-28 Goalkeeper 185.0 left \n",
"4 Italy 1983-06-26 Goalkeeper 195.0 right \n",
"\n",
" citizenship second_citizenship league_code season current_club \\\n",
"0 NaN Bosnia-Herzegovina GB1 2021 leicester city \n",
"1 England NaN GB1 2021 liverpool fc \n",
"2 NaN Bosnia-Herzegovina IT1 2021 ac milan \n",
"3 France NaN FR1 2021 stade reims \n",
"4 Italy NaN IT1 2021 acf fiorentina \n",
"\n",
" current_club_country market_value_euros joined contract_expires \\\n",
"0 england 300000.0 2017-07-19 2021-06-30 \n",
"1 england 3000000.0 2015-07-01 2022-06-30 \n",
"2 italy 4000000.0 2020-01-02 2022-06-30 \n",
"3 france 200000.0 2021-07-01 2023-06-30 \n",
"4 italy 100000.0 2021-02-01 NaN \n",
"\n",
" contract_option on_loan_from on_loan_from_country loan_contract_expiry \\\n",
"0 NaN NaN NaN NaN \n",
"1 NaN NaN NaN NaN \n",
"2 NaN NaN NaN NaN \n",
"3 NaN NaN NaN NaN \n",
"4 NaN NaN NaN NaN \n",
"\n",
" player_agent name_lower firstname_lower \\\n",
"0 HSD eldin jakupovic eldin \n",
"1 Samii Sport-Marketing Agentur james milner james \n",
"2 Mino Raiola zlatan ibrahimovic zlatan \n",
"3 USM GROUP nicolas penneteau nicolas \n",
"4 Alessandro Lucci - WSA antonio rosati antonio \n",
"\n",
" lastname_lower firstinitial_lower league_country_lower position_code \\\n",
"0 jakupovic e england GK \n",
"1 milner j england CM \n",
"2 ibrahimovic z italy ST \n",
"3 penneteau n france GK \n",
"4 rosati a italy GK \n",
"\n",
" position_grouped outfielder_goalkeeper age age_when_joining \\\n",
"0 Goalkeeper Goalkeeper 36.0 32.0 \n",
"1 Midfielder Outfielder 35.0 29.0 \n",
"2 Forward Outfielder 39.0 38.0 \n",
"3 Goalkeeper Goalkeeper 40.0 40.0 \n",
"4 Goalkeeper Goalkeeper 38.0 37.0 \n",
"\n",
" years_since_joining years_until_contract_expiry market_value_pounds \\\n",
"0 4.0 -1.0 270000.0 \n",
"1 6.0 0.0 2700000.0 \n",
"2 1.0 0.0 3600000.0 \n",
"3 0.0 1.0 180000.0 \n",
"4 0.0 NaN 90000.0 \n",
"\n",
" player_name_lower first_name_lower last_name_lower first_initial_lower \\\n",
"0 eldin jakupovic eldin jakupovic e \n",
"1 james milner james milner j \n",
"2 zlatan ibrahimovic zlatan ibrahimovic z \n",
"3 nicolas penneteau nicolas penneteau n \n",
"4 antonio rosati antonio rosati a \n",
"\n",
" country_lower \n",
"0 jugoslawien (sfr) \n",
"1 england \n",
"2 sweden \n",
"3 france \n",
"4 italy "
]
},
"execution_count": 43,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# Display DataFrame\n",
"df_tm_bio_status.head()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"##### Select columns of interest"
]
},
{
"cell_type": "code",
"execution_count": 44,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" player_name | \n",
" first_initial_lower | \n",
" first_name_lower | \n",
" last_name_lower | \n",
" birth_year | \n",
" country_lower | \n",
" outfielder_goalkeeper | \n",
" tm_id | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" eldin jakupovic | \n",
" e | \n",
" eldin | \n",
" jakupovic | \n",
" 1984.0 | \n",
" jugoslawien (sfr) | \n",
" Goalkeeper | \n",
" 2857 | \n",
"
\n",
" \n",
" 1 | \n",
" james milner | \n",
" j | \n",
" james | \n",
" milner | \n",
" 1986.0 | \n",
" england | \n",
" Outfielder | \n",
" 3333 | \n",
"
\n",
" \n",
" 2 | \n",
" zlatan ibrahimovic | \n",
" z | \n",
" zlatan | \n",
" ibrahimovic | \n",
" 1981.0 | \n",
" sweden | \n",
" Outfielder | \n",
" 3455 | \n",
"
\n",
" \n",
" 3 | \n",
" nicolas penneteau | \n",
" n | \n",
" nicolas | \n",
" penneteau | \n",
" 1981.0 | \n",
" france | \n",
" Goalkeeper | \n",
" 5578 | \n",
"
\n",
" \n",
" 4 | \n",
" antonio rosati | \n",
" a | \n",
" antonio | \n",
" rosati | \n",
" 1983.0 | \n",
" italy | \n",
" Goalkeeper | \n",
" 6442 | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" player_name first_initial_lower first_name_lower last_name_lower \\\n",
"0 eldin jakupovic e eldin jakupovic \n",
"1 james milner j james milner \n",
"2 zlatan ibrahimovic z zlatan ibrahimovic \n",
"3 nicolas penneteau n nicolas penneteau \n",
"4 antonio rosati a antonio rosati \n",
"\n",
" birth_year country_lower outfielder_goalkeeper tm_id \n",
"0 1984.0 jugoslawien (sfr) Goalkeeper 2857 \n",
"1 1986.0 england Outfielder 3333 \n",
"2 1981.0 sweden Outfielder 3455 \n",
"3 1981.0 france Goalkeeper 5578 \n",
"4 1983.0 italy Goalkeeper 6442 "
]
},
"execution_count": 44,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# Define columns\n",
"cols_tm_bio_status = ['player_name',\n",
" 'first_initial_lower',\n",
" 'first_name_lower',\n",
" 'last_name_lower',\n",
" #'age',\n",
" 'birth_year',\n",
" 'country_lower',\n",
" 'outfielder_goalkeeper',\n",
" 'tm_id'\n",
" ]\n",
"\n",
"# Select columns of interest\n",
"df_tm_bio_status_select = df_tm_bio_status[cols_tm_bio_status]\n",
"\n",
"# Drop duplicates\n",
"df_tm_bio_status_select = df_tm_bio_status_select.drop_duplicates()\n",
"\n",
"# Display DataFrame\n",
"df_tm_bio_status_select.head()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"\n",
"\n",
"### 4.4. TransferMarkt Historical Player Valuations"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"##### Filter for 'Big 5' European Leagues"
]
},
{
"cell_type": "code",
"execution_count": 45,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"['L1', 'GB1', 'MLS1', 'FR1', 'ES1', 'IT1']"
]
},
"execution_count": 45,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"lst_leagues_tm_valuations = list(df_tm_valuations['league_code'].unique())\n",
"lst_leagues_tm_valuations"
]
},
{
"cell_type": "code",
"execution_count": 46,
"metadata": {},
"outputs": [],
"source": [
"lst_leagues_tm_bio_status_big5 = ['GB1', 'IT1', 'FR1', 'L1', 'ES1']"
]
},
{
"cell_type": "code",
"execution_count": 47,
"metadata": {},
"outputs": [],
"source": [
"df_tm_valuations = df_tm_valuations[df_tm_valuations['league_code'].isin(lst_leagues_tm_bio_status_big5)]"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"##### Filter for Seasons"
]
},
{
"cell_type": "code",
"execution_count": 48,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"['2004/2005',\n",
" '2005/2006',\n",
" '2006/2007',\n",
" '2007/2008',\n",
" '2008/2009',\n",
" '2010/2011',\n",
" '2011/2012',\n",
" '2012/2013',\n",
" '2013/2014',\n",
" '2014/2015',\n",
" '2015/2016',\n",
" '2016/2017',\n",
" '2017/2018',\n",
" '2018/2019',\n",
" '2009/2010',\n",
" '2019/2020',\n",
" '2020/2021',\n",
" '2021/2022']"
]
},
"execution_count": 48,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"lst_seasons_tm_valuations = list(df_tm_valuations['season'].unique())\n",
"lst_seasons_tm_valuations"
]
},
{
"cell_type": "code",
"execution_count": 49,
"metadata": {},
"outputs": [],
"source": [
"lst_seasons_tm_valuations = ['2017/2018', '2018/2019', '2019/2020', '2020/2021', '2021/2022']"
]
},
{
"cell_type": "code",
"execution_count": 50,
"metadata": {},
"outputs": [],
"source": [
"df_tm_valuations = df_tm_valuations[df_tm_valuations['season'].isin(lst_seasons_tm_valuations)]"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"##### Lower names"
]
},
{
"cell_type": "code",
"execution_count": 51,
"metadata": {},
"outputs": [],
"source": [
"# Remove accents and create lowercase name\n",
"df_tm_valuations['player_name_lower'] = (df_tm_valuations['player_name']\n",
" .str.normalize('NFKD')\n",
" .str.encode('ascii', errors='ignore')\n",
" .str.decode('utf-8')\n",
" .str.lower()\n",
" )"
]
},
{
"cell_type": "code",
"execution_count": 52,
"metadata": {},
"outputs": [],
"source": [
"# First Name Lower\n",
"df_tm_valuations['first_name_lower'] = df_tm_valuations['player_name_lower'].str.rsplit(' ', 0).str[0]\n",
"\n",
"# Last Name Lower\n",
"df_tm_valuations['last_name_lower'] = df_tm_valuations['player_name_lower'].str.rsplit(' ', 1).str[-1]\n",
"\n",
"# First Initial Lower\n",
"df_tm_valuations['first_initial_lower'] = df_tm_valuations['player_name_lower'].astype(str).str[0]"
]
},
{
"cell_type": "code",
"execution_count": 53,
"metadata": {},
"outputs": [],
"source": [
"# Remove accents and create lowercase name\n",
"df_tm_valuations['country_lower'] = (df_tm_valuations['citizenship']\n",
" .str.normalize('NFKD')\n",
" .str.encode('ascii', errors='ignore')\n",
" .str.decode('utf-8')\n",
" .str.lower()\n",
" )"
]
},
{
"cell_type": "code",
"execution_count": 54,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" tm_id | \n",
" season | \n",
" player_name | \n",
" club | \n",
" current_club | \n",
" league_code | \n",
" current_age | \n",
" market_value_gbp | \n",
" market_value_eur | \n",
" dob | \n",
" pob | \n",
" birth_year | \n",
" position | \n",
" position_code | \n",
" position_grouped | \n",
" outfielder_goalkeeper | \n",
" height | \n",
" foot | \n",
" citizenship | \n",
" second_citizenship | \n",
" player_agent | \n",
" player_name_lower | \n",
" first_name_lower | \n",
" last_name_lower | \n",
" first_initial_lower | \n",
" country_lower | \n",
"
\n",
" \n",
" \n",
" \n",
" 12 | \n",
" 26 | \n",
" 2017/2018 | \n",
" roman weidenfeller | \n",
" Borussia Dortmund | \n",
" retired | \n",
" L1 | \n",
" 41.0 | \n",
" 675000.0 | \n",
" 750000 | \n",
" 1980-08-06 | \n",
" Diez | \n",
" 1980.0 | \n",
" Goalkeeper | \n",
" GK | \n",
" Goalkeeper | \n",
" Goalkeeper | \n",
" 188.0 | \n",
" left | \n",
" Germany | \n",
" NaN | \n",
" Jörg Neubauer | \n",
" roman weidenfeller | \n",
" roman | \n",
" weidenfeller | \n",
" r | \n",
" germany | \n",
"
\n",
" \n",
" 13 | \n",
" 26 | \n",
" 2018/2019 | \n",
" roman weidenfeller | \n",
" Borussia Dortmund | \n",
" retired | \n",
" L1 | \n",
" 41.0 | \n",
" 0.0 | \n",
" 0 | \n",
" 1980-08-06 | \n",
" Diez | \n",
" 1980.0 | \n",
" Goalkeeper | \n",
" GK | \n",
" Goalkeeper | \n",
" Goalkeeper | \n",
" 188.0 | \n",
" left | \n",
" Germany | \n",
" NaN | \n",
" Jörg Neubauer | \n",
" roman weidenfeller | \n",
" roman | \n",
" weidenfeller | \n",
" r | \n",
" germany | \n",
"
\n",
" \n",
" 27 | \n",
" 80 | \n",
" 2017/2018 | \n",
" tom starke | \n",
" Bayern Munich | \n",
" retired | \n",
" L1 | \n",
" 40.0 | \n",
" 90000.0 | \n",
" 100000 | \n",
" 1981-03-18 | \n",
" Freital | \n",
" 1981.0 | \n",
" Goalkeeper | \n",
" GK | \n",
" Goalkeeper | \n",
" Goalkeeper | \n",
" 194.0 | \n",
" right | \n",
" Germany | \n",
" NaN | \n",
" IFM | \n",
" tom starke | \n",
" tom | \n",
" starke | \n",
" t | \n",
" germany | \n",
"
\n",
" \n",
" 28 | \n",
" 80 | \n",
" 2018/2019 | \n",
" tom starke | \n",
" Bayern Munich | \n",
" retired | \n",
" L1 | \n",
" 40.0 | \n",
" 90000.0 | \n",
" 100000 | \n",
" 1981-03-18 | \n",
" Freital | \n",
" 1981.0 | \n",
" Goalkeeper | \n",
" GK | \n",
" Goalkeeper | \n",
" Goalkeeper | \n",
" 194.0 | \n",
" right | \n",
" Germany | \n",
" NaN | \n",
" IFM | \n",
" tom starke | \n",
" tom | \n",
" starke | \n",
" t | \n",
" germany | \n",
"
\n",
" \n",
" 41 | \n",
" 488 | \n",
" 2017/2018 | \n",
" gerhard tremmel | \n",
" Swansea City | \n",
" retired | \n",
" GB1 | \n",
" 42.0 | \n",
" 225000.0 | \n",
" 250000 | \n",
" 1978-11-16 | \n",
" München | \n",
" 1978.0 | \n",
" Goalkeeper | \n",
" GK | \n",
" Goalkeeper | \n",
" Goalkeeper | \n",
" NaN | \n",
" NaN | \n",
" Germany | \n",
" NaN | \n",
" NaN | \n",
" gerhard tremmel | \n",
" gerhard | \n",
" tremmel | \n",
" g | \n",
" germany | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" tm_id season player_name club current_club \\\n",
"12 26 2017/2018 roman weidenfeller Borussia Dortmund retired \n",
"13 26 2018/2019 roman weidenfeller Borussia Dortmund retired \n",
"27 80 2017/2018 tom starke Bayern Munich retired \n",
"28 80 2018/2019 tom starke Bayern Munich retired \n",
"41 488 2017/2018 gerhard tremmel Swansea City retired \n",
"\n",
" league_code current_age market_value_gbp market_value_eur dob \\\n",
"12 L1 41.0 675000.0 750000 1980-08-06 \n",
"13 L1 41.0 0.0 0 1980-08-06 \n",
"27 L1 40.0 90000.0 100000 1981-03-18 \n",
"28 L1 40.0 90000.0 100000 1981-03-18 \n",
"41 GB1 42.0 225000.0 250000 1978-11-16 \n",
"\n",
" pob birth_year position position_code position_grouped \\\n",
"12 Diez 1980.0 Goalkeeper GK Goalkeeper \n",
"13 Diez 1980.0 Goalkeeper GK Goalkeeper \n",
"27 Freital 1981.0 Goalkeeper GK Goalkeeper \n",
"28 Freital 1981.0 Goalkeeper GK Goalkeeper \n",
"41 München 1978.0 Goalkeeper GK Goalkeeper \n",
"\n",
" outfielder_goalkeeper height foot citizenship second_citizenship \\\n",
"12 Goalkeeper 188.0 left Germany NaN \n",
"13 Goalkeeper 188.0 left Germany NaN \n",
"27 Goalkeeper 194.0 right Germany NaN \n",
"28 Goalkeeper 194.0 right Germany NaN \n",
"41 Goalkeeper NaN NaN Germany NaN \n",
"\n",
" player_agent player_name_lower first_name_lower last_name_lower \\\n",
"12 Jörg Neubauer roman weidenfeller roman weidenfeller \n",
"13 Jörg Neubauer roman weidenfeller roman weidenfeller \n",
"27 IFM tom starke tom starke \n",
"28 IFM tom starke tom starke \n",
"41 NaN gerhard tremmel gerhard tremmel \n",
"\n",
" first_initial_lower country_lower \n",
"12 r germany \n",
"13 r germany \n",
"27 t germany \n",
"28 t germany \n",
"41 g germany "
]
},
"execution_count": 54,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# Display DataFrame\n",
"df_tm_valuations.head()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"##### Select columns of interest"
]
},
{
"cell_type": "code",
"execution_count": 55,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" player_name | \n",
" first_initial_lower | \n",
" first_name_lower | \n",
" last_name_lower | \n",
" birth_year | \n",
" country_lower | \n",
" outfielder_goalkeeper | \n",
" season | \n",
" tm_id | \n",
"
\n",
" \n",
" \n",
" \n",
" 12 | \n",
" roman weidenfeller | \n",
" r | \n",
" roman | \n",
" weidenfeller | \n",
" 1980.0 | \n",
" germany | \n",
" Goalkeeper | \n",
" 2017/2018 | \n",
" 26 | \n",
"
\n",
" \n",
" 13 | \n",
" roman weidenfeller | \n",
" r | \n",
" roman | \n",
" weidenfeller | \n",
" 1980.0 | \n",
" germany | \n",
" Goalkeeper | \n",
" 2018/2019 | \n",
" 26 | \n",
"
\n",
" \n",
" 27 | \n",
" tom starke | \n",
" t | \n",
" tom | \n",
" starke | \n",
" 1981.0 | \n",
" germany | \n",
" Goalkeeper | \n",
" 2017/2018 | \n",
" 80 | \n",
"
\n",
" \n",
" 28 | \n",
" tom starke | \n",
" t | \n",
" tom | \n",
" starke | \n",
" 1981.0 | \n",
" germany | \n",
" Goalkeeper | \n",
" 2018/2019 | \n",
" 80 | \n",
"
\n",
" \n",
" 41 | \n",
" gerhard tremmel | \n",
" g | \n",
" gerhard | \n",
" tremmel | \n",
" 1978.0 | \n",
" germany | \n",
" Goalkeeper | \n",
" 2017/2018 | \n",
" 488 | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" player_name first_initial_lower first_name_lower last_name_lower \\\n",
"12 roman weidenfeller r roman weidenfeller \n",
"13 roman weidenfeller r roman weidenfeller \n",
"27 tom starke t tom starke \n",
"28 tom starke t tom starke \n",
"41 gerhard tremmel g gerhard tremmel \n",
"\n",
" birth_year country_lower outfielder_goalkeeper season tm_id \n",
"12 1980.0 germany Goalkeeper 2017/2018 26 \n",
"13 1980.0 germany Goalkeeper 2018/2019 26 \n",
"27 1981.0 germany Goalkeeper 2017/2018 80 \n",
"28 1981.0 germany Goalkeeper 2018/2019 80 \n",
"41 1978.0 germany Goalkeeper 2017/2018 488 "
]
},
"execution_count": 55,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# Define columns\n",
"cols_tm_valuations = ['player_name',\n",
" 'first_initial_lower',\n",
" 'first_name_lower',\n",
" 'last_name_lower',\n",
" #'age',\n",
" 'birth_year',\n",
" 'country_lower',\n",
" 'outfielder_goalkeeper',\n",
" 'season',\n",
" 'tm_id'\n",
" ]\n",
"\n",
"# Select columns of interest\n",
"df_tm_valuations_select = df_tm_valuations[cols_tm_valuations]\n",
"\n",
"# Drop duplicates\n",
"df_tm_valuations_select = df_tm_valuations_select.drop_duplicates()\n",
"\n",
"# Display DataFrame\n",
"df_tm_valuations_select.head()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"\n",
"\n",
"### 4.5. TransferMarkt Recorded Transfers"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"##### Filter for 'Big 5' European Leagues"
]
},
{
"cell_type": "code",
"execution_count": 56,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"['L1', 'GB2', 'NL1', 'PO1', 'FR1', 'GB1', 'RU1', 'ES1', 'IT1']"
]
},
"execution_count": 56,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"lst_leagues_tm_transfers = list(df_tm_transfers['league_code'].unique())\n",
"lst_leagues_tm_transfers"
]
},
{
"cell_type": "code",
"execution_count": 57,
"metadata": {},
"outputs": [],
"source": [
"lst_leagues_tm_transfers_big5 = ['GB1', 'IT1', 'FR1', 'L1', 'ES1']"
]
},
{
"cell_type": "code",
"execution_count": 58,
"metadata": {},
"outputs": [],
"source": [
"df_tm_valuations = df_tm_valuations[df_tm_valuations['league_code'].isin(lst_leagues_tm_transfers_big5)]"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"##### Filter for Seasons"
]
},
{
"cell_type": "code",
"execution_count": 59,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"['1992/1993',\n",
" '1993/1994',\n",
" '1994/1995',\n",
" '1995/1996',\n",
" '1996/1997',\n",
" '1997/1998',\n",
" '1998/1999',\n",
" '1999/2000',\n",
" '2000/2001',\n",
" '2001/2002',\n",
" '2002/2003',\n",
" '2003/2004',\n",
" '2004/2005',\n",
" '2005/2006',\n",
" '2006/2007',\n",
" '2007/2008',\n",
" '2008/2009',\n",
" '2009/2010',\n",
" '2010/2011',\n",
" '2011/2012',\n",
" '2012/2013',\n",
" '2013/2014',\n",
" '2014/2015',\n",
" '2015/2016',\n",
" '2016/2017',\n",
" '2017/2018',\n",
" '2018/2019',\n",
" '2019/2020',\n",
" '2020/2021']"
]
},
"execution_count": 59,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"lst_seasons_tm_transfers = list(df_tm_transfers['season'].unique())\n",
"lst_seasons_tm_transfers"
]
},
{
"cell_type": "code",
"execution_count": 60,
"metadata": {},
"outputs": [],
"source": [
"lst_leagues_tm_transfers_big5 = ['2017/2018', '2018/2019', '2019/2020', '2020/2021', '2021/2022']"
]
},
{
"cell_type": "code",
"execution_count": 61,
"metadata": {},
"outputs": [],
"source": [
"df_tm_valuations = df_tm_valuations[df_tm_valuations['season'].isin(lst_leagues_tm_transfers_big5)]"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"##### Lower names"
]
},
{
"cell_type": "code",
"execution_count": 62,
"metadata": {},
"outputs": [],
"source": [
"# Remove accents and create lowercase name\n",
"df_tm_transfers['player_name_lower'] = (df_tm_transfers['player_name']\n",
" .str.normalize('NFKD')\n",
" .str.encode('ascii', errors='ignore')\n",
" .str.decode('utf-8')\n",
" .str.lower()\n",
" )"
]
},
{
"cell_type": "code",
"execution_count": 63,
"metadata": {},
"outputs": [],
"source": [
"# First Name Lower\n",
"df_tm_transfers['first_name_lower'] = df_tm_transfers['player_name_lower'].str.rsplit(' ', 0).str[0]\n",
"\n",
"# Last Name Lower\n",
"df_tm_transfers['last_name_lower'] = df_tm_transfers['player_name_lower'].str.rsplit(' ', 1).str[-1]\n",
"\n",
"# First Initial Lower\n",
"df_tm_transfers['first_initial_lower'] = df_tm_transfers['player_name_lower'].astype(str).str[0]"
]
},
{
"cell_type": "code",
"execution_count": 64,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" club_name | \n",
" player_name | \n",
" age | \n",
" position | \n",
" club_involved_name | \n",
" fee | \n",
" transfer_movement | \n",
" transfer_period | \n",
" fee_cleaned | \n",
" league_name | \n",
" year | \n",
" season | \n",
" league_code | \n",
" player_name_lower | \n",
" first_name_lower | \n",
" last_name_lower | \n",
" first_initial_lower | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" VfB Stuttgart | \n",
" Adrian Knup | \n",
" 23.0 | \n",
" Centre-Forward | \n",
" FC Luzern | \n",
" ? | \n",
" in | \n",
" Summer | \n",
" NaN | \n",
" 1 Bundesliga | \n",
" 1992 | \n",
" 1992/1993 | \n",
" L1 | \n",
" adrian knup | \n",
" adrian | \n",
" knup | \n",
" a | \n",
"
\n",
" \n",
" 1 | \n",
" 1. FC Köln | \n",
" Adrian Spyrka | \n",
" 24.0 | \n",
" Central Midfield | \n",
" Stuttg. Kickers | \n",
" End of loanJun 30, 1992 | \n",
" in | \n",
" Summer | \n",
" 0.0 | \n",
" 1 Bundesliga | \n",
" 1992 | \n",
" 1992/1993 | \n",
" L1 | \n",
" adrian spyrka | \n",
" adrian | \n",
" spyrka | \n",
" a | \n",
"
\n",
" \n",
" 2 | \n",
" Karlsruher SC | \n",
" Alexander Famulla | \n",
" 31.0 | \n",
" Goalkeeper | \n",
" FC 08 Homburg | \n",
" ? | \n",
" out | \n",
" Summer | \n",
" NaN | \n",
" 1 Bundesliga | \n",
" 1992 | \n",
" 1992/1993 | \n",
" L1 | \n",
" alexander famulla | \n",
" alexander | \n",
" famulla | \n",
" a | \n",
"
\n",
" \n",
" 3 | \n",
" SV Werder Bremen | \n",
" Alexander Malchow | \n",
" 22.0 | \n",
" Centre-Back | \n",
" VfB Oldenburg | \n",
" Free transfer | \n",
" out | \n",
" Summer | \n",
" 0.0 | \n",
" 1 Bundesliga | \n",
" 1992 | \n",
" 1992/1993 | \n",
" L1 | \n",
" alexander malchow | \n",
" alexander | \n",
" malchow | \n",
" a | \n",
"
\n",
" \n",
" 4 | \n",
" SG Dynamo Dresden | \n",
" Alexander Zickler | \n",
" 18.0 | \n",
" Centre-Forward | \n",
" D. Dresden U19 | \n",
" - | \n",
" in | \n",
" Summer | \n",
" 0.0 | \n",
" 1 Bundesliga | \n",
" 1992 | \n",
" 1992/1993 | \n",
" L1 | \n",
" alexander zickler | \n",
" alexander | \n",
" zickler | \n",
" a | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" club_name player_name age position \\\n",
"0 VfB Stuttgart Adrian Knup 23.0 Centre-Forward \n",
"1 1. FC Köln Adrian Spyrka 24.0 Central Midfield \n",
"2 Karlsruher SC Alexander Famulla 31.0 Goalkeeper \n",
"3 SV Werder Bremen Alexander Malchow 22.0 Centre-Back \n",
"4 SG Dynamo Dresden Alexander Zickler 18.0 Centre-Forward \n",
"\n",
" club_involved_name fee transfer_movement \\\n",
"0 FC Luzern ? in \n",
"1 Stuttg. Kickers End of loanJun 30, 1992 in \n",
"2 FC 08 Homburg ? out \n",
"3 VfB Oldenburg Free transfer out \n",
"4 D. Dresden U19 - in \n",
"\n",
" transfer_period fee_cleaned league_name year season league_code \\\n",
"0 Summer NaN 1 Bundesliga 1992 1992/1993 L1 \n",
"1 Summer 0.0 1 Bundesliga 1992 1992/1993 L1 \n",
"2 Summer NaN 1 Bundesliga 1992 1992/1993 L1 \n",
"3 Summer 0.0 1 Bundesliga 1992 1992/1993 L1 \n",
"4 Summer 0.0 1 Bundesliga 1992 1992/1993 L1 \n",
"\n",
" player_name_lower first_name_lower last_name_lower first_initial_lower \n",
"0 adrian knup adrian knup a \n",
"1 adrian spyrka adrian spyrka a \n",
"2 alexander famulla alexander famulla a \n",
"3 alexander malchow alexander malchow a \n",
"4 alexander zickler alexander zickler a "
]
},
"execution_count": 64,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# Display DataFrame\n",
"df_tm_transfers.head()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"##### Select columns of interest"
]
},
{
"cell_type": "code",
"execution_count": 65,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" club_name | \n",
" player_name | \n",
" age | \n",
" position | \n",
" club_involved_name | \n",
" fee | \n",
" transfer_movement | \n",
" transfer_period | \n",
" fee_cleaned | \n",
" league_name | \n",
" year | \n",
" season | \n",
" league_code | \n",
" player_name_lower | \n",
" first_name_lower | \n",
" last_name_lower | \n",
" first_initial_lower | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" VfB Stuttgart | \n",
" Adrian Knup | \n",
" 23.0 | \n",
" Centre-Forward | \n",
" FC Luzern | \n",
" ? | \n",
" in | \n",
" Summer | \n",
" NaN | \n",
" 1 Bundesliga | \n",
" 1992 | \n",
" 1992/1993 | \n",
" L1 | \n",
" adrian knup | \n",
" adrian | \n",
" knup | \n",
" a | \n",
"
\n",
" \n",
" 1 | \n",
" 1. FC Köln | \n",
" Adrian Spyrka | \n",
" 24.0 | \n",
" Central Midfield | \n",
" Stuttg. Kickers | \n",
" End of loanJun 30, 1992 | \n",
" in | \n",
" Summer | \n",
" 0.0 | \n",
" 1 Bundesliga | \n",
" 1992 | \n",
" 1992/1993 | \n",
" L1 | \n",
" adrian spyrka | \n",
" adrian | \n",
" spyrka | \n",
" a | \n",
"
\n",
" \n",
" 2 | \n",
" Karlsruher SC | \n",
" Alexander Famulla | \n",
" 31.0 | \n",
" Goalkeeper | \n",
" FC 08 Homburg | \n",
" ? | \n",
" out | \n",
" Summer | \n",
" NaN | \n",
" 1 Bundesliga | \n",
" 1992 | \n",
" 1992/1993 | \n",
" L1 | \n",
" alexander famulla | \n",
" alexander | \n",
" famulla | \n",
" a | \n",
"
\n",
" \n",
" 3 | \n",
" SV Werder Bremen | \n",
" Alexander Malchow | \n",
" 22.0 | \n",
" Centre-Back | \n",
" VfB Oldenburg | \n",
" Free transfer | \n",
" out | \n",
" Summer | \n",
" 0.0 | \n",
" 1 Bundesliga | \n",
" 1992 | \n",
" 1992/1993 | \n",
" L1 | \n",
" alexander malchow | \n",
" alexander | \n",
" malchow | \n",
" a | \n",
"
\n",
" \n",
" 4 | \n",
" SG Dynamo Dresden | \n",
" Alexander Zickler | \n",
" 18.0 | \n",
" Centre-Forward | \n",
" D. Dresden U19 | \n",
" - | \n",
" in | \n",
" Summer | \n",
" 0.0 | \n",
" 1 Bundesliga | \n",
" 1992 | \n",
" 1992/1993 | \n",
" L1 | \n",
" alexander zickler | \n",
" alexander | \n",
" zickler | \n",
" a | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" club_name player_name age position \\\n",
"0 VfB Stuttgart Adrian Knup 23.0 Centre-Forward \n",
"1 1. FC Köln Adrian Spyrka 24.0 Central Midfield \n",
"2 Karlsruher SC Alexander Famulla 31.0 Goalkeeper \n",
"3 SV Werder Bremen Alexander Malchow 22.0 Centre-Back \n",
"4 SG Dynamo Dresden Alexander Zickler 18.0 Centre-Forward \n",
"\n",
" club_involved_name fee transfer_movement \\\n",
"0 FC Luzern ? in \n",
"1 Stuttg. Kickers End of loanJun 30, 1992 in \n",
"2 FC 08 Homburg ? out \n",
"3 VfB Oldenburg Free transfer out \n",
"4 D. Dresden U19 - in \n",
"\n",
" transfer_period fee_cleaned league_name year season league_code \\\n",
"0 Summer NaN 1 Bundesliga 1992 1992/1993 L1 \n",
"1 Summer 0.0 1 Bundesliga 1992 1992/1993 L1 \n",
"2 Summer NaN 1 Bundesliga 1992 1992/1993 L1 \n",
"3 Summer 0.0 1 Bundesliga 1992 1992/1993 L1 \n",
"4 Summer 0.0 1 Bundesliga 1992 1992/1993 L1 \n",
"\n",
" player_name_lower first_name_lower last_name_lower first_initial_lower \n",
"0 adrian knup adrian knup a \n",
"1 adrian spyrka adrian spyrka a \n",
"2 alexander famulla alexander famulla a \n",
"3 alexander malchow alexander malchow a \n",
"4 alexander zickler alexander zickler a "
]
},
"execution_count": 65,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# Define columns\n",
"cols_tm_transfers = ['player_name',\n",
" 'first_initial_lower',\n",
" 'first_name_lower',\n",
" 'last_name_lower',\n",
" 'season'\n",
" ]\n",
"\n",
"# Select columns of interest\n",
"df_tm_transfers_select = df_tm_transfers[cols_tm_transfers]\n",
"\n",
"# Drop duplicates\n",
"df_tm_transfers_select = df_tm_transfers.drop_duplicates()\n",
"\n",
"# Display DataFrame\n",
"df_tm_transfers_select.head()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"\n",
"\n",
"### 4.6. Capology Player Salaries"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"##### Filter for 'Big 5' European Leagues"
]
},
{
"cell_type": "code",
"execution_count": 66,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"['Switzerland',\n",
" 'Germany',\n",
" 'Iceland',\n",
" 'Brazil',\n",
" 'Ghana',\n",
" 'South Korea',\n",
" 'Austria',\n",
" 'Serbia',\n",
" 'Turkey',\n",
" 'Greece',\n",
" 'Czech Republic',\n",
" 'Netherlands',\n",
" 'France',\n",
" 'Paraguay',\n",
" 'Japan',\n",
" 'Slovenia',\n",
" 'Latvia',\n",
" 'Chile',\n",
" 'Mexico',\n",
" 'Finland',\n",
" 'Jamaica',\n",
" 'Croatia',\n",
" 'Australia',\n",
" 'Ukraine',\n",
" 'Spain',\n",
" 'United States',\n",
" 'Morocco',\n",
" 'Portugal',\n",
" 'Poland',\n",
" 'Colombia',\n",
" 'Sweden',\n",
" 'Denmark',\n",
" 'Gabon',\n",
" 'Costa Rica',\n",
" 'Hungary',\n",
" 'Bosnia-Herzegovina',\n",
" 'Nigeria',\n",
" 'Democratic Republic of Congo',\n",
" 'Tunisia',\n",
" 'Ecuador',\n",
" 'Argentina',\n",
" 'Kosovo',\n",
" 'Uruguay',\n",
" 'Israel',\n",
" 'Albania',\n",
" 'Palästina',\n",
" 'Norway',\n",
" 'Slovakia',\n",
" 'Georgia',\n",
" 'Italy',\n",
" 'The Gambia',\n",
" \"Cote d'Ivoire\",\n",
" 'Cameroon',\n",
" 'Russia',\n",
" 'Philippines',\n",
" 'Belgium',\n",
" 'Guinea',\n",
" 'Scotland',\n",
" 'Bulgaria',\n",
" 'Algeria',\n",
" 'Peru',\n",
" 'Senegal',\n",
" 'Uganda',\n",
" 'Mali',\n",
" 'Iran',\n",
" 'Venezuela',\n",
" 'England',\n",
" 'Azerbaijan',\n",
" 'Curacao',\n",
" 'Togo',\n",
" 'Montenegro',\n",
" 'Romania',\n",
" 'China',\n",
" 'Canada',\n",
" 'Luxembourg',\n",
" 'Wales',\n",
" 'Burkina Faso',\n",
" 'New Zealand',\n",
" 'Armenia',\n",
" 'North Macedonia',\n",
" 'Guadeloupe',\n",
" 'Angola',\n",
" 'Dominican Republic',\n",
" 'Qatar',\n",
" 'Martinique',\n",
" 'Saudi Arabia',\n",
" 'Congo',\n",
" 'Honduras',\n",
" 'Kenya',\n",
" 'Mauritania',\n",
" 'Central African Republic',\n",
" 'Guinea-Bissau',\n",
" 'Equatorial Guinea',\n",
" 'Cape Verde',\n",
" 'Mauritius',\n",
" 'Comoros',\n",
" 'Benin',\n",
" 'Haiti',\n",
" 'Monaco',\n",
" 'French Guiana',\n",
" 'South Africa',\n",
" 'Zambia',\n",
" 'Madagascar',\n",
" 'Chad',\n",
" 'Belarus',\n",
" 'Lithuania',\n",
" 'Mozambique',\n",
" 'Niger',\n",
" 'Neukaledonien',\n",
" 'Trinidad and Tobago',\n",
" 'Zimbabwe',\n",
" 'Democratic Republic of the Congo',\n",
" 'Panama',\n",
" 'Ireland',\n",
" 'Iraq',\n",
" 'Sierra Leone',\n",
" 'St. Kitts & Nevis',\n",
" 'Guatemala',\n",
" 'Guam',\n",
" 'El Salvador',\n",
" 'Puerto Rico',\n",
" 'Guyana',\n",
" 'Cuba',\n",
" 'Belize',\n",
" 'Eritrea',\n",
" 'St. Vincent & Grenadinen',\n",
" 'Bolivia',\n",
" 'Bermuda',\n",
" 'Afghanistan',\n",
" 'Lebanon',\n",
" 'Liechtenstein',\n",
" 'Egypt',\n",
" 'Syria',\n",
" 'Libya',\n",
" 'Rwanda',\n",
" 'Tanzania',\n",
" 'Somalia',\n",
" 'Liberia',\n",
" 'Northern Ireland',\n",
" 'Suriname',\n",
" 'Malaysia',\n",
" nan,\n",
" 'Estonia',\n",
" 'Burundi',\n",
" 'Cyprus',\n",
" 'Moldova',\n",
" 'North Korea',\n",
" 'San Marino',\n",
" 'Uzbekistan']"
]
},
"execution_count": 66,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"lst_leagues_capology = list(df_capology['country'].unique())\n",
"lst_leagues_capology"
]
},
{
"cell_type": "code",
"execution_count": 67,
"metadata": {},
"outputs": [],
"source": [
"lst_leagues_capology_big5 = ['England', 'Germany', 'Spain', 'France', 'Italy']"
]
},
{
"cell_type": "code",
"execution_count": 68,
"metadata": {},
"outputs": [],
"source": [
"df_capology = df_capology[df_capology['country'].isin(lst_leagues_capology_big5)]"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"##### Filter for Seasons"
]
},
{
"cell_type": "code",
"execution_count": 69,
"metadata": {},
"outputs": [],
"source": [
"# Map season to DataFrame\n",
"df_capology['season'] = df_capology['season'].map(dict_seasons)"
]
},
{
"cell_type": "code",
"execution_count": 70,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"['2016/2017', '2017/2018', '2018/2019', '2019/2020', nan, '2020/2021']"
]
},
"execution_count": 70,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"lst_seasons_capology = list(df_capology['season'].unique())\n",
"lst_seasons_capology"
]
},
{
"cell_type": "code",
"execution_count": 71,
"metadata": {},
"outputs": [],
"source": [
"lst_seasons_capology = ['2017/2018', '2018/2019', '2019/2020', '2020/2021', '2021/2022']"
]
},
{
"cell_type": "code",
"execution_count": 72,
"metadata": {},
"outputs": [],
"source": [
"df_capology = df_capology[df_capology['season'].isin(lst_seasons_capology)]"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"##### Lower names"
]
},
{
"cell_type": "code",
"execution_count": 73,
"metadata": {},
"outputs": [],
"source": [
"# Remove accents and create lowercase name\n",
"df_capology['player_name_lower'] = (df_capology['player']\n",
" .str.normalize('NFKD')\n",
" .str.encode('ascii', errors='ignore')\n",
" .str.decode('utf-8')\n",
" .str.lower()\n",
" )"
]
},
{
"cell_type": "code",
"execution_count": 74,
"metadata": {},
"outputs": [],
"source": [
"# First Name Lower\n",
"df_capology['first_name_lower'] = df_capology['player_name_lower'].str.rsplit(' ', 0).str[0]\n",
"\n",
"# Last Name Lower\n",
"df_capology['last_name_lower'] = df_capology['player_name_lower'].str.rsplit(' ', 1).str[-1]\n",
"\n",
"# First Initial Lower\n",
"df_capology['first_initial_lower'] = df_capology['player_name_lower'].astype(str).str[0]"
]
},
{
"cell_type": "code",
"execution_count": 75,
"metadata": {},
"outputs": [],
"source": [
"# Remove accents and create lowercase name\n",
"df_capology['country_lower'] = (df_capology['country']\n",
" .str.normalize('NFKD')\n",
" .str.encode('ascii', errors='ignore')\n",
" .str.decode('utf-8')\n",
" .str.lower()\n",
" )"
]
},
{
"cell_type": "code",
"execution_count": 76,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" player | \n",
" season | \n",
" league | \n",
" team | \n",
" position | \n",
" outfielder_goalkeeper | \n",
" age | \n",
" country | \n",
" weekly_gross_base_salary_gbp | \n",
" annual_gross_base_salary_gbp | \n",
" adj_current_gross_base_salary_gbp | \n",
" estimated_gross_total_gbp | \n",
" current_contract_status | \n",
" current_contract_expiration | \n",
" current_contract_length | \n",
" player_name_lower | \n",
" first_name_lower | \n",
" last_name_lower | \n",
" first_initial_lower | \n",
" country_lower | \n",
"
\n",
" \n",
" \n",
" \n",
" 645 | \n",
" Andreas Luthe | \n",
" 2017/2018 | \n",
" Bundesliga | \n",
" Augsburg | \n",
" Goalkeeper | \n",
" Goalkeeper | \n",
" 30 | \n",
" Germany | \n",
" 6147.0 | \n",
" 319688.0 | \n",
" 325953.0 | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" andreas luthe | \n",
" andreas | \n",
" luthe | \n",
" a | \n",
" germany | \n",
"
\n",
" \n",
" 647 | \n",
" Christoph Janker | \n",
" 2017/2018 | \n",
" Bundesliga | \n",
" Augsburg | \n",
" Defender | \n",
" Outfielder | \n",
" 32 | \n",
" Germany | \n",
" 7585.0 | \n",
" 394432.0 | \n",
" 402161.0 | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" christoph janker | \n",
" christoph | \n",
" janker | \n",
" c | \n",
" germany | \n",
"
\n",
" \n",
" 648 | \n",
" Daniel Baier | \n",
" 2017/2018 | \n",
" Bundesliga | \n",
" Augsburg | \n",
" Midfielder | \n",
" Outfielder | \n",
" 33 | \n",
" Germany | \n",
" 34185.0 | \n",
" 1777646.0 | \n",
" 1812482.0 | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" daniel baier | \n",
" daniel | \n",
" baier | \n",
" d | \n",
" germany | \n",
"
\n",
" \n",
" 651 | \n",
" Efkan Bekiroglu | \n",
" 2017/2018 | \n",
" Bundesliga | \n",
" Augsburg | \n",
" Midfielder | \n",
" Outfielder | \n",
" 21 | \n",
" Germany | \n",
" 761.0 | \n",
" 39623.0 | \n",
" 40399.0 | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" efkan bekiroglu | \n",
" efkan | \n",
" bekiroglu | \n",
" e | \n",
" germany | \n",
"
\n",
" \n",
" 652 | \n",
" Erik Thommy | \n",
" 2017/2018 | \n",
" Bundesliga | \n",
" Augsburg | \n",
" Midfielder | \n",
" Outfielder | \n",
" 22 | \n",
" Germany | \n",
" 7585.0 | \n",
" 394432.0 | \n",
" 402161.0 | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" erik thommy | \n",
" erik | \n",
" thommy | \n",
" e | \n",
" germany | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" player season league team position \\\n",
"645 Andreas Luthe 2017/2018 Bundesliga Augsburg Goalkeeper \n",
"647 Christoph Janker 2017/2018 Bundesliga Augsburg Defender \n",
"648 Daniel Baier 2017/2018 Bundesliga Augsburg Midfielder \n",
"651 Efkan Bekiroglu 2017/2018 Bundesliga Augsburg Midfielder \n",
"652 Erik Thommy 2017/2018 Bundesliga Augsburg Midfielder \n",
"\n",
" outfielder_goalkeeper age country weekly_gross_base_salary_gbp \\\n",
"645 Goalkeeper 30 Germany 6147.0 \n",
"647 Outfielder 32 Germany 7585.0 \n",
"648 Outfielder 33 Germany 34185.0 \n",
"651 Outfielder 21 Germany 761.0 \n",
"652 Outfielder 22 Germany 7585.0 \n",
"\n",
" annual_gross_base_salary_gbp adj_current_gross_base_salary_gbp \\\n",
"645 319688.0 325953.0 \n",
"647 394432.0 402161.0 \n",
"648 1777646.0 1812482.0 \n",
"651 39623.0 40399.0 \n",
"652 394432.0 402161.0 \n",
"\n",
" estimated_gross_total_gbp current_contract_status \\\n",
"645 NaN NaN \n",
"647 NaN NaN \n",
"648 NaN NaN \n",
"651 NaN NaN \n",
"652 NaN NaN \n",
"\n",
" current_contract_expiration current_contract_length player_name_lower \\\n",
"645 NaN NaN andreas luthe \n",
"647 NaN NaN christoph janker \n",
"648 NaN NaN daniel baier \n",
"651 NaN NaN efkan bekiroglu \n",
"652 NaN NaN erik thommy \n",
"\n",
" first_name_lower last_name_lower first_initial_lower country_lower \n",
"645 andreas luthe a germany \n",
"647 christoph janker c germany \n",
"648 daniel baier d germany \n",
"651 efkan bekiroglu e germany \n",
"652 erik thommy e germany "
]
},
"execution_count": 76,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# Display DataFrame\n",
"df_capology.head()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"##### Select columns of interest"
]
},
{
"cell_type": "code",
"execution_count": 77,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" player | \n",
" season | \n",
" league | \n",
" team | \n",
" position | \n",
" outfielder_goalkeeper | \n",
" age | \n",
" country | \n",
" weekly_gross_base_salary_gbp | \n",
" annual_gross_base_salary_gbp | \n",
" adj_current_gross_base_salary_gbp | \n",
" estimated_gross_total_gbp | \n",
" current_contract_status | \n",
" current_contract_expiration | \n",
" current_contract_length | \n",
" player_name_lower | \n",
" first_name_lower | \n",
" last_name_lower | \n",
" first_initial_lower | \n",
" country_lower | \n",
"
\n",
" \n",
" \n",
" \n",
" 645 | \n",
" Andreas Luthe | \n",
" 2017/2018 | \n",
" Bundesliga | \n",
" Augsburg | \n",
" Goalkeeper | \n",
" Goalkeeper | \n",
" 30 | \n",
" Germany | \n",
" 6147.0 | \n",
" 319688.0 | \n",
" 325953.0 | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" andreas luthe | \n",
" andreas | \n",
" luthe | \n",
" a | \n",
" germany | \n",
"
\n",
" \n",
" 647 | \n",
" Christoph Janker | \n",
" 2017/2018 | \n",
" Bundesliga | \n",
" Augsburg | \n",
" Defender | \n",
" Outfielder | \n",
" 32 | \n",
" Germany | \n",
" 7585.0 | \n",
" 394432.0 | \n",
" 402161.0 | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" christoph janker | \n",
" christoph | \n",
" janker | \n",
" c | \n",
" germany | \n",
"
\n",
" \n",
" 648 | \n",
" Daniel Baier | \n",
" 2017/2018 | \n",
" Bundesliga | \n",
" Augsburg | \n",
" Midfielder | \n",
" Outfielder | \n",
" 33 | \n",
" Germany | \n",
" 34185.0 | \n",
" 1777646.0 | \n",
" 1812482.0 | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" daniel baier | \n",
" daniel | \n",
" baier | \n",
" d | \n",
" germany | \n",
"
\n",
" \n",
" 651 | \n",
" Efkan Bekiroglu | \n",
" 2017/2018 | \n",
" Bundesliga | \n",
" Augsburg | \n",
" Midfielder | \n",
" Outfielder | \n",
" 21 | \n",
" Germany | \n",
" 761.0 | \n",
" 39623.0 | \n",
" 40399.0 | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" efkan bekiroglu | \n",
" efkan | \n",
" bekiroglu | \n",
" e | \n",
" germany | \n",
"
\n",
" \n",
" 652 | \n",
" Erik Thommy | \n",
" 2017/2018 | \n",
" Bundesliga | \n",
" Augsburg | \n",
" Midfielder | \n",
" Outfielder | \n",
" 22 | \n",
" Germany | \n",
" 7585.0 | \n",
" 394432.0 | \n",
" 402161.0 | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" erik thommy | \n",
" erik | \n",
" thommy | \n",
" e | \n",
" germany | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" player season league team position \\\n",
"645 Andreas Luthe 2017/2018 Bundesliga Augsburg Goalkeeper \n",
"647 Christoph Janker 2017/2018 Bundesliga Augsburg Defender \n",
"648 Daniel Baier 2017/2018 Bundesliga Augsburg Midfielder \n",
"651 Efkan Bekiroglu 2017/2018 Bundesliga Augsburg Midfielder \n",
"652 Erik Thommy 2017/2018 Bundesliga Augsburg Midfielder \n",
"\n",
" outfielder_goalkeeper age country weekly_gross_base_salary_gbp \\\n",
"645 Goalkeeper 30 Germany 6147.0 \n",
"647 Outfielder 32 Germany 7585.0 \n",
"648 Outfielder 33 Germany 34185.0 \n",
"651 Outfielder 21 Germany 761.0 \n",
"652 Outfielder 22 Germany 7585.0 \n",
"\n",
" annual_gross_base_salary_gbp adj_current_gross_base_salary_gbp \\\n",
"645 319688.0 325953.0 \n",
"647 394432.0 402161.0 \n",
"648 1777646.0 1812482.0 \n",
"651 39623.0 40399.0 \n",
"652 394432.0 402161.0 \n",
"\n",
" estimated_gross_total_gbp current_contract_status \\\n",
"645 NaN NaN \n",
"647 NaN NaN \n",
"648 NaN NaN \n",
"651 NaN NaN \n",
"652 NaN NaN \n",
"\n",
" current_contract_expiration current_contract_length player_name_lower \\\n",
"645 NaN NaN andreas luthe \n",
"647 NaN NaN christoph janker \n",
"648 NaN NaN daniel baier \n",
"651 NaN NaN efkan bekiroglu \n",
"652 NaN NaN erik thommy \n",
"\n",
" first_name_lower last_name_lower first_initial_lower country_lower \n",
"645 andreas luthe a germany \n",
"647 christoph janker c germany \n",
"648 daniel baier d germany \n",
"651 efkan bekiroglu e germany \n",
"652 erik thommy e germany "
]
},
"execution_count": 77,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# Define columns\n",
"cols_capology = ['player',\n",
" 'first_initial_lower',\n",
" 'first_name_lower',\n",
" 'last_name_lower',\n",
" 'country_lower',\n",
" 'outfielder_goalkeeper',\n",
" 'season'\n",
" ]\n",
"\n",
"# Select columns of interest\n",
"df_capology_select = df_capology[cols_capology]\n",
"\n",
"# Drop duplicates\n",
"df_capology_select = df_capology.drop_duplicates()\n",
"\n",
"# Display DataFrame\n",
"df_capology_select.head()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"---\n",
"\n",
"\n",
"\n",
"## 5. Data Unifiaction\n",
"Fuzzy Match Datasets - Record Linkage"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"\n",
"\n",
"### 5.1. Introduction\n",
"Now we have the player-level datasets, we are now read to merge them to form one dataset of identifiers, that can then be used join any datasets together in future analysis.\n",
"\n",
"We are required to join two data sets together that do not have a common unique identifier and are required to use a third-party Python library - [record linkage](https://pypi.org/project/recordlinkage/), installed using `pip install recordlinkage`. [record linkage](https://pypi.org/project/recordlinkage/) provides a simple interface to link records in or between data sources. \n",
"\n",
"As part of the joining of the datasets, the **FBref** dataset will be used as the base, from which the other datasets will be subsequently joined."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"\n",
"\n",
"### 5.2. About Record Linkage\n",
"\n",
"'Record linkage' is the term used by statisticians, epidemiologists, and historians, among others, to describe the process of joining records from one data source with another that describe the same entity ([source](https://en.wikipedia.org/wiki/Record_linkage)).\n",
"\n",
"Record linkage is necessary when joining different data sets based on entities that may or may not share a common identifier (e.g., database key, URI, National identification number), which may be due to differences in record shape, storage location, or curator style or preference. A data set that has undergone RL-oriented reconciliation may be referred to as being cross-linked. Record linkage is referred to as data linkage in many jurisdictions, but the two are the same process.\n",
"\n",
"The toolkit provides most of the tools needed for record linkage and deduplication. The package contains indexing methods, functions to compare records and classifiers. The package is developed for research and the linking of small or medium sized files.\n",
"\n",
"For a full guide on how to use record linkage, see the official documentation [here](https://recordlinkage.readthedocs.io/en/latest/) and also this worked example by [Chris Moffitt](https://twitter.com/chris1610) at the following [[link](https://pbpython.com/record-linking.html)]."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"\n",
"\n",
"### 5.3. Unify Datasets"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"\n",
"\n",
"#### 5.3.1. Join the FBref Players and FBref-TM mapping datasets"
]
},
{
"cell_type": "code",
"execution_count": 78,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" Nation | \n",
" Pos | \n",
" Squad | \n",
" Comp | \n",
" Age | \n",
" birth_year | \n",
" MP | \n",
" Starts | \n",
" Min | \n",
" 90s | \n",
" Gls | \n",
" Ast | \n",
" G-PK | \n",
" PK | \n",
" PKatt | \n",
" CrdY | \n",
" CrdR | \n",
" Gls.1 | \n",
" Ast.1 | \n",
" G+A | \n",
" G-PK.1 | \n",
" G+A-PK | \n",
" xG | \n",
" npxG | \n",
" xA | \n",
" npxG+xA | \n",
" xG.1 | \n",
" xA.1 | \n",
" xG+xA | \n",
" npxG.1 | \n",
" npxG+xA.1 | \n",
" Matches | \n",
" Sh | \n",
" SoT | \n",
" SoT% | \n",
" Sh/90 | \n",
" SoT/90 | \n",
" G/Sh | \n",
" G/SoT | \n",
" Dist | \n",
" FK | \n",
" npxG/Sh | \n",
" G-xG | \n",
" np:G-xG | \n",
" Cmp | \n",
" Att | \n",
" Cmp% | \n",
" TotDist | \n",
" PrgDist | \n",
" Cmp.1 | \n",
" Att.1 | \n",
" Cmp%.1 | \n",
" Cmp.2 | \n",
" Att.2 | \n",
" Cmp%.2 | \n",
" Cmp.3 | \n",
" Att.3 | \n",
" Cmp%.3 | \n",
" A-xA | \n",
" KP | \n",
" 1/3 | \n",
" PPA | \n",
" CrsPA | \n",
" Prog | \n",
" Live | \n",
" Dead | \n",
" TB | \n",
" Press | \n",
" Sw | \n",
" Crs | \n",
" CK | \n",
" In | \n",
" Out | \n",
" Str | \n",
" Ground | \n",
" Low | \n",
" High | \n",
" Left | \n",
" Right | \n",
" Head | \n",
" TI | \n",
" Other | \n",
" Off | \n",
" Out.1 | \n",
" Int | \n",
" Blocks | \n",
" SCA | \n",
" SCA90 | \n",
" PassLive | \n",
" PassDead | \n",
" Drib | \n",
" Fld | \n",
" Def | \n",
" GCA | \n",
" GCA90 | \n",
" PassLive.1 | \n",
" PassDead.1 | \n",
" Drib.1 | \n",
" Sh.1 | \n",
" Fld.1 | \n",
" Def.1 | \n",
" Tkl | \n",
" TklW | \n",
" Def 3rd | \n",
" Mid 3rd | \n",
" Att 3rd | \n",
" Tkl.1 | \n",
" Tkl% | \n",
" Past | \n",
" Succ | \n",
" % | \n",
" Def 3rd.1 | \n",
" Mid 3rd.1 | \n",
" Att 3rd.1 | \n",
" ShSv | \n",
" Pass | \n",
" Tkl+Int | \n",
" Clr | \n",
" Err | \n",
" Touches | \n",
" Def Pen | \n",
" Att Pen | \n",
" Succ% | \n",
" #Pl | \n",
" Megs | \n",
" Carries | \n",
" CPA | \n",
" Mis | \n",
" Dis | \n",
" Targ | \n",
" Rec | \n",
" Rec% | \n",
" Prog.1 | \n",
" Mn/MP | \n",
" Min% | \n",
" Mn/Start | \n",
" Compl | \n",
" Subs | \n",
" Mn/Sub | \n",
" unSub | \n",
" PPM | \n",
" onG | \n",
" onGA | \n",
" +/- | \n",
" +/-90 | \n",
" On-Off | \n",
" onxG | \n",
" onxGA | \n",
" xG+/- | \n",
" xG+/-90 | \n",
" On-Off.1 | \n",
" 2CrdY | \n",
" Fls | \n",
" PKwon | \n",
" PKcon | \n",
" OG | \n",
" Recov | \n",
" Won | \n",
" Lost | \n",
" Won% | \n",
" League Name | \n",
" League ID | \n",
" season | \n",
" Team Name | \n",
" Team Country | \n",
" Player Lower | \n",
" First Name Lower | \n",
" Last Name Lower | \n",
" First Initial Lower | \n",
" Team Country Lower | \n",
" Nationality Code | \n",
" Nationality Cleaned | \n",
" Primary Pos | \n",
" Position Grouped | \n",
" outfielder_goalkeeper | \n",
" GA | \n",
" GA90 | \n",
" SoTA | \n",
" Saves | \n",
" Save% | \n",
" W | \n",
" D | \n",
" L | \n",
" CS | \n",
" CS% | \n",
" PKA | \n",
" PKsv | \n",
" PKm | \n",
" Save%.1 | \n",
" PSxG | \n",
" PSxG/SoT | \n",
" PSxG+/- | \n",
" /90 | \n",
" Thr | \n",
" Launch% | \n",
" AvgLen | \n",
" Launch%.1 | \n",
" AvgLen.1 | \n",
" Opp | \n",
" Stp | \n",
" Stp% | \n",
" #OPA | \n",
" #OPA/90 | \n",
" AvgDist | \n",
" player_name_lower | \n",
" first_name_lower | \n",
" last_name_lower | \n",
" first_initial_lower | \n",
" country_lower | \n",
" player_name_fbref | \n",
" url_fbref | \n",
" url_tm | \n",
" TmPos | \n",
" tm_id | \n",
" fbref_id | \n",
"
\n",
" \n",
" \n",
" \n",
" 5430 | \n",
" ie IRL | \n",
" FW | \n",
" Brighton | \n",
" Premier League | \n",
" 19 | \n",
" 2000.0 | \n",
" 24 | \n",
" 14 | \n",
" 1258.0 | \n",
" 14.0 | \n",
" 3 | \n",
" 1 | \n",
" 3 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0.21 | \n",
" 0.07 | \n",
" 0.29 | \n",
" 0.21 | \n",
" 0.29 | \n",
" 3.2 | \n",
" 3.2 | \n",
" 0.3 | \n",
" 3.5 | \n",
" 0.23 | \n",
" 0.02 | \n",
" 0.25 | \n",
" 0.23 | \n",
" 0.25 | \n",
" Matches | \n",
" 38.0 | \n",
" 13.0 | \n",
" 34.2 | \n",
" 2.72 | \n",
" 0.93 | \n",
" 0.08 | \n",
" 0.23 | \n",
" 15.9 | \n",
" 0.0 | \n",
" 0.08 | \n",
" -0.2 | \n",
" -0.2 | \n",
" 126.0 | \n",
" 163.0 | \n",
" 77.3 | \n",
" 1739.0 | \n",
" 242.0 | \n",
" 76.0 | \n",
" 92.0 | \n",
" 82.6 | \n",
" 31.0 | \n",
" 39.0 | \n",
" 79.5 | \n",
" 7.0 | \n",
" 11.0 | \n",
" 63.6 | \n",
" 0.7 | \n",
" 6.0 | \n",
" 6.0 | \n",
" 2.0 | \n",
" 0.0 | \n",
" 10.0 | \n",
" 148.0 | \n",
" 15.0 | \n",
" 1.0 | \n",
" 50.0 | \n",
" 0.0 | \n",
" 7.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 90.0 | \n",
" 52.0 | \n",
" 21.0 | \n",
" 27.0 | \n",
" 107.0 | \n",
" 13.0 | \n",
" 1.0 | \n",
" 6.0 | \n",
" 0.0 | \n",
" 1.0 | \n",
" 4.0 | \n",
" 10.0 | \n",
" 25.0 | \n",
" 1.79 | \n",
" 7.0 | \n",
" 0.0 | \n",
" 3.0 | \n",
" 9.0 | \n",
" 3.0 | \n",
" 5.0 | \n",
" 0.36 | \n",
" 1.0 | \n",
" 0.0 | \n",
" 1.0 | \n",
" 1.0 | \n",
" 2.0 | \n",
" 0.0 | \n",
" 12.0 | \n",
" 8.0 | \n",
" 1.0 | \n",
" 5.0 | \n",
" 6.0 | \n",
" 3.0 | \n",
" 25.0 | \n",
" 9.0 | \n",
" 69.0 | \n",
" 29.5 | \n",
" 14.0 | \n",
" 94.0 | \n",
" 126.0 | \n",
" 0.0 | \n",
" 7.0 | \n",
" 17.0 | \n",
" 1.0 | \n",
" 0.0 | \n",
" 349.0 | \n",
" 2.0 | \n",
" 61.0 | \n",
" 37.5 | \n",
" 6.0 | \n",
" 1.0 | \n",
" 228.0 | \n",
" 12.0 | \n",
" 42.0 | \n",
" 34.0 | \n",
" 535.0 | \n",
" 235.0 | \n",
" 43.9 | \n",
" 99.0 | \n",
" 52 | \n",
" 36.8 | \n",
" 72.0 | \n",
" 0.0 | \n",
" 10 | \n",
" 26.0 | \n",
" 4 | \n",
" 1.13 | \n",
" 18.0 | \n",
" 22.0 | \n",
" -4.0 | \n",
" -0.29 | \n",
" 0.17 | \n",
" 15.6 | \n",
" 19.8 | \n",
" -4.2 | \n",
" -0.30 | \n",
" 0.08 | \n",
" 0.0 | \n",
" 16 | \n",
" 2.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 54.0 | \n",
" 14.0 | \n",
" 48.0 | \n",
" 22.6 | \n",
" Big-5-European-Leagues | \n",
" Big5 | \n",
" 2019/2020 | \n",
" Brighton | \n",
" England | \n",
" aaron connolly | \n",
" aaron | \n",
" connolly | \n",
" a | \n",
" england | \n",
" IRL | \n",
" Ireland | \n",
" FW | \n",
" Forward | \n",
" Outfielder | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" aaron connolly | \n",
" aaron | \n",
" connolly | \n",
" a | \n",
" ireland | \n",
" Aaron Connolly | \n",
" https://fbref.com/en/players/27c01749/Aaron-Co... | \n",
" https://www.transfermarkt.com/aaron-connolly/p... | \n",
" Centre-Forward | \n",
" 434207 | \n",
" 27c01749 | \n",
"
\n",
" \n",
" 8211 | \n",
" ie IRL | \n",
" FW | \n",
" Brighton | \n",
" Premier League | \n",
" 20 | \n",
" 2000.0 | \n",
" 17 | \n",
" 9 | \n",
" 791.0 | \n",
" 8.8 | \n",
" 2 | \n",
" 1 | \n",
" 2 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0.23 | \n",
" 0.11 | \n",
" 0.34 | \n",
" 0.23 | \n",
" 0.34 | \n",
" 3.5 | \n",
" 3.5 | \n",
" 0.2 | \n",
" 3.7 | \n",
" 0.40 | \n",
" 0.02 | \n",
" 0.42 | \n",
" 0.40 | \n",
" 0.42 | \n",
" Matches | \n",
" 23.0 | \n",
" 8.0 | \n",
" 34.8 | \n",
" 2.62 | \n",
" 0.91 | \n",
" 0.09 | \n",
" 0.25 | \n",
" 13.7 | \n",
" 0.0 | \n",
" 0.15 | \n",
" -1.5 | \n",
" -1.5 | \n",
" 79.0 | \n",
" 101.0 | \n",
" 78.2 | \n",
" 1147.0 | \n",
" 165.0 | \n",
" 45.0 | \n",
" 56.0 | \n",
" 80.4 | \n",
" 26.0 | \n",
" 30.0 | \n",
" 86.7 | \n",
" 4.0 | \n",
" 5.0 | \n",
" 80.0 | \n",
" 0.8 | \n",
" 5.0 | \n",
" 2.0 | \n",
" 1.0 | \n",
" 0.0 | \n",
" 3.0 | \n",
" 91.0 | \n",
" 10.0 | \n",
" 0.0 | \n",
" 22.0 | \n",
" 1.0 | \n",
" 2.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 64.0 | \n",
" 26.0 | \n",
" 11.0 | \n",
" 11.0 | \n",
" 74.0 | \n",
" 5.0 | \n",
" 0.0 | \n",
" 3.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 2.0 | \n",
" 4.0 | \n",
" 12.0 | \n",
" 1.37 | \n",
" 7.0 | \n",
" 0.0 | \n",
" 3.0 | \n",
" 2.0 | \n",
" 0.0 | \n",
" 1.0 | \n",
" 0.11 | \n",
" 1.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 7.0 | \n",
" 5.0 | \n",
" 2.0 | \n",
" 4.0 | \n",
" 1.0 | \n",
" 1.0 | \n",
" 20.0 | \n",
" 4.0 | \n",
" 40.0 | \n",
" 32.3 | \n",
" 7.0 | \n",
" 58.0 | \n",
" 59.0 | \n",
" 0.0 | \n",
" 8.0 | \n",
" 7.0 | \n",
" 1.0 | \n",
" 0.0 | \n",
" 201.0 | \n",
" 1.0 | \n",
" 38.0 | \n",
" 80.0 | \n",
" 8.0 | \n",
" 0.0 | \n",
" 124.0 | \n",
" 4.0 | \n",
" 29.0 | \n",
" 15.0 | \n",
" 357.0 | \n",
" 143.0 | \n",
" 40.1 | \n",
" 64.0 | \n",
" 47 | \n",
" 23.1 | \n",
" 68.0 | \n",
" NaN | \n",
" 8 | \n",
" 23.0 | \n",
" 11 | \n",
" 0.88 | \n",
" 12.0 | \n",
" 17.0 | \n",
" -5.0 | \n",
" -0.57 | \n",
" -0.53 | \n",
" 13.8 | \n",
" 7.8 | \n",
" 6.0 | \n",
" 0.69 | \n",
" 0.42 | \n",
" 0.0 | \n",
" 5 | \n",
" 1.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 28.0 | \n",
" 11.0 | \n",
" 30.0 | \n",
" 26.8 | \n",
" Big-5-European-Leagues | \n",
" Big5 | \n",
" 2020/2021 | \n",
" Brighton | \n",
" England | \n",
" aaron connolly | \n",
" aaron | \n",
" connolly | \n",
" a | \n",
" england | \n",
" IRL | \n",
" Ireland | \n",
" FW | \n",
" Forward | \n",
" Outfielder | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" aaron connolly | \n",
" aaron | \n",
" connolly | \n",
" a | \n",
" ireland | \n",
" Aaron Connolly | \n",
" https://fbref.com/en/players/27c01749/Aaron-Co... | \n",
" https://www.transfermarkt.com/aaron-connolly/p... | \n",
" Centre-Forward | \n",
" 434207 | \n",
" 27c01749 | \n",
"
\n",
" \n",
" 11071 | \n",
" ie IRL | \n",
" FW | \n",
" Brighton | \n",
" Premier League | \n",
" 21 | \n",
" 2000.0 | \n",
" 1 | \n",
" 0 | \n",
" 45.0 | \n",
" 0.5 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0.00 | \n",
" 0.00 | \n",
" 0.00 | \n",
" 0.00 | \n",
" 0.00 | \n",
" 0.4 | \n",
" 0.4 | \n",
" 0.0 | \n",
" 0.4 | \n",
" 0.85 | \n",
" 0.00 | \n",
" 0.85 | \n",
" 0.85 | \n",
" 0.85 | \n",
" Matches | \n",
" 1.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 2.00 | \n",
" 0.00 | \n",
" 0.00 | \n",
" NaN | \n",
" 9.0 | \n",
" 0.0 | \n",
" 0.42 | \n",
" -0.4 | \n",
" -0.4 | \n",
" 2.0 | \n",
" 3.0 | \n",
" 66.7 | \n",
" 14.0 | \n",
" 0.0 | \n",
" 2.0 | \n",
" 2.0 | \n",
" 100.0 | \n",
" 0.0 | \n",
" 1.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" NaN | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 3.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 1.0 | \n",
" 0.0 | \n",
" 1.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 2.0 | \n",
" 1.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 2.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 1.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 1.0 | \n",
" 2.00 | \n",
" 1.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.00 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" NaN | \n",
" 0.0 | \n",
" 1.0 | \n",
" 8.3 | \n",
" 1.0 | \n",
" 6.0 | \n",
" 5.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 8.0 | \n",
" 0.0 | \n",
" 2.0 | \n",
" NaN | \n",
" 0.0 | \n",
" 0.0 | \n",
" 5.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 1.0 | \n",
" 20.0 | \n",
" 4.0 | \n",
" 20.0 | \n",
" 2.0 | \n",
" 45 | \n",
" 16.7 | \n",
" NaN | \n",
" 0.0 | \n",
" 1 | \n",
" 45.0 | \n",
" 1 | \n",
" 3.00 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.00 | \n",
" -0.40 | \n",
" 1.0 | \n",
" 0.7 | \n",
" 0.3 | \n",
" 0.68 | \n",
" 0.74 | \n",
" 0.0 | \n",
" 0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 3.0 | \n",
" 0.0 | \n",
" 2.0 | \n",
" 0.0 | \n",
" Big-5-European-Leagues | \n",
" Big5 | \n",
" 2021/2022 | \n",
" Brighton | \n",
" England | \n",
" aaron connolly | \n",
" aaron | \n",
" connolly | \n",
" a | \n",
" england | \n",
" IRL | \n",
" Ireland | \n",
" FW | \n",
" Forward | \n",
" Outfielder | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" aaron connolly | \n",
" aaron | \n",
" connolly | \n",
" a | \n",
" ireland | \n",
" Aaron Connolly | \n",
" https://fbref.com/en/players/27c01749/Aaron-Co... | \n",
" https://www.transfermarkt.com/aaron-connolly/p... | \n",
" Centre-Forward | \n",
" 434207 | \n",
" 27c01749 | \n",
"
\n",
" \n",
" 8212 | \n",
" eng ENG | \n",
" DF | \n",
" West Ham | \n",
" Premier League | \n",
" 30 | \n",
" 1989.0 | \n",
" 36 | \n",
" 36 | \n",
" 3170.0 | \n",
" 35.2 | \n",
" 0 | \n",
" 8 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 3 | \n",
" 0 | \n",
" 0.00 | \n",
" 0.23 | \n",
" 0.23 | \n",
" 0.00 | \n",
" 0.23 | \n",
" 0.9 | \n",
" 0.9 | \n",
" 5.9 | \n",
" 6.9 | \n",
" 0.03 | \n",
" 0.17 | \n",
" 0.19 | \n",
" 0.03 | \n",
" 0.19 | \n",
" Matches | \n",
" 19.0 | \n",
" 4.0 | \n",
" 21.1 | \n",
" 0.54 | \n",
" 0.11 | \n",
" 0.00 | \n",
" 0.00 | \n",
" 24.6 | \n",
" 11.0 | \n",
" 0.05 | \n",
" -0.9 | \n",
" -0.9 | \n",
" 1541.0 | \n",
" 2061.0 | \n",
" 74.8 | \n",
" 30884.0 | \n",
" 14764.0 | \n",
" 655.0 | \n",
" 736.0 | \n",
" 89.0 | \n",
" 616.0 | \n",
" 736.0 | \n",
" 83.7 | \n",
" 252.0 | \n",
" 518.0 | \n",
" 48.6 | \n",
" 2.1 | \n",
" 60.0 | \n",
" 149.0 | \n",
" 24.0 | \n",
" 17.0 | \n",
" 120.0 | \n",
" 1617.0 | \n",
" 444.0 | \n",
" 2.0 | \n",
" 158.0 | \n",
" 84.0 | \n",
" 91.0 | \n",
" 82.0 | \n",
" 22.0 | \n",
" 51.0 | \n",
" 6.0 | \n",
" 1104.0 | \n",
" 365.0 | \n",
" 592.0 | \n",
" 1607.0 | \n",
" 118.0 | \n",
" 49.0 | \n",
" 259.0 | \n",
" 4.0 | \n",
" 23.0 | \n",
" 35.0 | \n",
" 48.0 | \n",
" 66.0 | \n",
" 96.0 | \n",
" 2.73 | \n",
" 48.0 | \n",
" 41.0 | \n",
" 1.0 | \n",
" 2.0 | \n",
" 0.0 | \n",
" 14.0 | \n",
" 0.40 | \n",
" 5.0 | \n",
" 6.0 | \n",
" 0.0 | \n",
" 2.0 | \n",
" 1.0 | \n",
" 0.0 | \n",
" 31.0 | \n",
" 13.0 | \n",
" 15.0 | \n",
" 14.0 | \n",
" 2.0 | \n",
" 14.0 | \n",
" 41.2 | \n",
" 20.0 | \n",
" 67.0 | \n",
" 29.1 | \n",
" 122.0 | \n",
" 90.0 | \n",
" 18.0 | \n",
" 0.0 | \n",
" 34.0 | \n",
" 67.0 | \n",
" 98.0 | \n",
" 0.0 | \n",
" 2307.0 | \n",
" 182.0 | \n",
" 18.0 | \n",
" 40.0 | \n",
" 8.0 | \n",
" 2.0 | \n",
" 1266.0 | \n",
" 3.0 | \n",
" 7.0 | \n",
" 9.0 | \n",
" 1366.0 | \n",
" 1318.0 | \n",
" 96.5 | \n",
" 30.0 | \n",
" 88 | \n",
" 92.7 | \n",
" 88.0 | \n",
" NaN | \n",
" 0 | \n",
" NaN | \n",
" 0 | \n",
" 1.81 | \n",
" 60.0 | \n",
" 41.0 | \n",
" 19.0 | \n",
" 0.54 | \n",
" 1.98 | \n",
" 51.3 | \n",
" 42.9 | \n",
" 8.4 | \n",
" 0.24 | \n",
" 1.26 | \n",
" 0.0 | \n",
" 13 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 307.0 | \n",
" 38.0 | \n",
" 30.0 | \n",
" 55.9 | \n",
" Big-5-European-Leagues | \n",
" Big5 | \n",
" 2020/2021 | \n",
" West Ham | \n",
" England | \n",
" aaron cresswell | \n",
" aaron | \n",
" cresswell | \n",
" a | \n",
" england | \n",
" ENG | \n",
" England | \n",
" DF | \n",
" Defender | \n",
" Outfielder | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" aaron cresswell | \n",
" aaron | \n",
" cresswell | \n",
" a | \n",
" england | \n",
" Aaron Cresswell | \n",
" https://fbref.com/en/players/4f974391/Aaron-Cr... | \n",
" https://www.transfermarkt.com/aaron-cresswell/... | \n",
" Left-Back | \n",
" 92571 | \n",
" 4f974391 | \n",
"
\n",
" \n",
" 2728 | \n",
" eng ENG | \n",
" DF | \n",
" West Ham | \n",
" Premier League | \n",
" 28 | \n",
" 1989.0 | \n",
" 20 | \n",
" 18 | \n",
" 1589.0 | \n",
" 17.7 | \n",
" 0 | \n",
" 1 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 1 | \n",
" 0 | \n",
" 0.00 | \n",
" 0.06 | \n",
" 0.06 | \n",
" 0.00 | \n",
" 0.06 | \n",
" 0.5 | \n",
" 0.5 | \n",
" 0.9 | \n",
" 1.4 | \n",
" 0.03 | \n",
" 0.05 | \n",
" 0.08 | \n",
" 0.03 | \n",
" 0.08 | \n",
" Matches | \n",
" 11.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.62 | \n",
" 0.00 | \n",
" 0.00 | \n",
" NaN | \n",
" 23.5 | \n",
" 2.0 | \n",
" 0.04 | \n",
" -0.5 | \n",
" -0.5 | \n",
" 842.0 | \n",
" 1070.0 | \n",
" 78.7 | \n",
" 13627.0 | \n",
" 5572.0 | \n",
" 453.0 | \n",
" 501.0 | \n",
" 90.4 | \n",
" 307.0 | \n",
" 371.0 | \n",
" 82.7 | \n",
" 64.0 | \n",
" 140.0 | \n",
" 45.7 | \n",
" 0.1 | \n",
" 16.0 | \n",
" 55.0 | \n",
" 15.0 | \n",
" 5.0 | \n",
" 65.0 | \n",
" 854.0 | \n",
" 216.0 | \n",
" 0.0 | \n",
" 168.0 | \n",
" 18.0 | \n",
" 46.0 | \n",
" 10.0 | \n",
" 0.0 | \n",
" 2.0 | \n",
" 0.0 | \n",
" 642.0 | \n",
" 235.0 | \n",
" 193.0 | \n",
" 787.0 | \n",
" 51.0 | \n",
" 27.0 | \n",
" 190.0 | \n",
" 4.0 | \n",
" 2.0 | \n",
" 21.0 | \n",
" 27.0 | \n",
" 44.0 | \n",
" 29.0 | \n",
" 1.64 | \n",
" 19.0 | \n",
" 6.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 1.0 | \n",
" 2.0 | \n",
" 0.11 | \n",
" 0.0 | \n",
" 2.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 30.0 | \n",
" 19.0 | \n",
" 14.0 | \n",
" 12.0 | \n",
" 4.0 | \n",
" 12.0 | \n",
" 42.9 | \n",
" 16.0 | \n",
" 68.0 | \n",
" 31.5 | \n",
" 129.0 | \n",
" 59.0 | \n",
" 28.0 | \n",
" 0.0 | \n",
" 39.0 | \n",
" 49.0 | \n",
" 60.0 | \n",
" 1.0 | \n",
" 1266.0 | \n",
" 78.0 | \n",
" 36.0 | \n",
" 63.6 | \n",
" 7.0 | \n",
" 1.0 | \n",
" 723.0 | \n",
" 8.0 | \n",
" 11.0 | \n",
" 13.0 | \n",
" 797.0 | \n",
" 715.0 | \n",
" 89.7 | \n",
" 43.0 | \n",
" 79 | \n",
" 46.5 | \n",
" 85.0 | \n",
" 16.0 | \n",
" 2 | \n",
" 30.0 | \n",
" 7 | \n",
" 1.30 | \n",
" 21.0 | \n",
" 26.0 | \n",
" -5.0 | \n",
" -0.28 | \n",
" -0.38 | \n",
" 20.1 | \n",
" 25.3 | \n",
" -5.3 | \n",
" -0.30 | \n",
" 0.12 | \n",
" 0.0 | \n",
" 2 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 169.0 | \n",
" 22.0 | \n",
" 14.0 | \n",
" 61.1 | \n",
" Big-5-European-Leagues | \n",
" Big5 | \n",
" 2018/2019 | \n",
" West Ham | \n",
" England | \n",
" aaron cresswell | \n",
" aaron | \n",
" cresswell | \n",
" a | \n",
" england | \n",
" ENG | \n",
" England | \n",
" DF | \n",
" Defender | \n",
" Outfielder | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" aaron cresswell | \n",
" aaron | \n",
" cresswell | \n",
" a | \n",
" england | \n",
" Aaron Cresswell | \n",
" https://fbref.com/en/players/4f974391/Aaron-Cr... | \n",
" https://www.transfermarkt.com/aaron-cresswell/... | \n",
" Left-Back | \n",
" 92571 | \n",
" 4f974391 | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" Nation Pos Squad Comp Age birth_year MP Starts \\\n",
"5430 ie IRL FW Brighton Premier League 19 2000.0 24 14 \n",
"8211 ie IRL FW Brighton Premier League 20 2000.0 17 9 \n",
"11071 ie IRL FW Brighton Premier League 21 2000.0 1 0 \n",
"8212 eng ENG DF West Ham Premier League 30 1989.0 36 36 \n",
"2728 eng ENG DF West Ham Premier League 28 1989.0 20 18 \n",
"\n",
" Min 90s Gls Ast G-PK PK PKatt CrdY CrdR Gls.1 Ast.1 \\\n",
"5430 1258.0 14.0 3 1 3 0 0 0 0 0.21 0.07 \n",
"8211 791.0 8.8 2 1 2 0 0 0 0 0.23 0.11 \n",
"11071 45.0 0.5 0 0 0 0 0 0 0 0.00 0.00 \n",
"8212 3170.0 35.2 0 8 0 0 0 3 0 0.00 0.23 \n",
"2728 1589.0 17.7 0 1 0 0 0 1 0 0.00 0.06 \n",
"\n",
" G+A G-PK.1 G+A-PK xG npxG xA npxG+xA xG.1 xA.1 xG+xA \\\n",
"5430 0.29 0.21 0.29 3.2 3.2 0.3 3.5 0.23 0.02 0.25 \n",
"8211 0.34 0.23 0.34 3.5 3.5 0.2 3.7 0.40 0.02 0.42 \n",
"11071 0.00 0.00 0.00 0.4 0.4 0.0 0.4 0.85 0.00 0.85 \n",
"8212 0.23 0.00 0.23 0.9 0.9 5.9 6.9 0.03 0.17 0.19 \n",
"2728 0.06 0.00 0.06 0.5 0.5 0.9 1.4 0.03 0.05 0.08 \n",
"\n",
" npxG.1 npxG+xA.1 Matches Sh SoT SoT% Sh/90 SoT/90 G/Sh \\\n",
"5430 0.23 0.25 Matches 38.0 13.0 34.2 2.72 0.93 0.08 \n",
"8211 0.40 0.42 Matches 23.0 8.0 34.8 2.62 0.91 0.09 \n",
"11071 0.85 0.85 Matches 1.0 0.0 0.0 2.00 0.00 0.00 \n",
"8212 0.03 0.19 Matches 19.0 4.0 21.1 0.54 0.11 0.00 \n",
"2728 0.03 0.08 Matches 11.0 0.0 0.0 0.62 0.00 0.00 \n",
"\n",
" G/SoT Dist FK npxG/Sh G-xG np:G-xG Cmp Att Cmp% \\\n",
"5430 0.23 15.9 0.0 0.08 -0.2 -0.2 126.0 163.0 77.3 \n",
"8211 0.25 13.7 0.0 0.15 -1.5 -1.5 79.0 101.0 78.2 \n",
"11071 NaN 9.0 0.0 0.42 -0.4 -0.4 2.0 3.0 66.7 \n",
"8212 0.00 24.6 11.0 0.05 -0.9 -0.9 1541.0 2061.0 74.8 \n",
"2728 NaN 23.5 2.0 0.04 -0.5 -0.5 842.0 1070.0 78.7 \n",
"\n",
" TotDist PrgDist Cmp.1 Att.1 Cmp%.1 Cmp.2 Att.2 Cmp%.2 Cmp.3 \\\n",
"5430 1739.0 242.0 76.0 92.0 82.6 31.0 39.0 79.5 7.0 \n",
"8211 1147.0 165.0 45.0 56.0 80.4 26.0 30.0 86.7 4.0 \n",
"11071 14.0 0.0 2.0 2.0 100.0 0.0 1.0 0.0 0.0 \n",
"8212 30884.0 14764.0 655.0 736.0 89.0 616.0 736.0 83.7 252.0 \n",
"2728 13627.0 5572.0 453.0 501.0 90.4 307.0 371.0 82.7 64.0 \n",
"\n",
" Att.3 Cmp%.3 A-xA KP 1/3 PPA CrsPA Prog Live Dead \\\n",
"5430 11.0 63.6 0.7 6.0 6.0 2.0 0.0 10.0 148.0 15.0 \n",
"8211 5.0 80.0 0.8 5.0 2.0 1.0 0.0 3.0 91.0 10.0 \n",
"11071 0.0 NaN 0.0 0.0 0.0 0.0 0.0 0.0 3.0 0.0 \n",
"8212 518.0 48.6 2.1 60.0 149.0 24.0 17.0 120.0 1617.0 444.0 \n",
"2728 140.0 45.7 0.1 16.0 55.0 15.0 5.0 65.0 854.0 216.0 \n",
"\n",
" TB Press Sw Crs CK In Out Str Ground Low High \\\n",
"5430 1.0 50.0 0.0 7.0 0.0 0.0 0.0 0.0 90.0 52.0 21.0 \n",
"8211 0.0 22.0 1.0 2.0 0.0 0.0 0.0 0.0 64.0 26.0 11.0 \n",
"11071 0.0 1.0 0.0 1.0 0.0 0.0 0.0 0.0 2.0 1.0 0.0 \n",
"8212 2.0 158.0 84.0 91.0 82.0 22.0 51.0 6.0 1104.0 365.0 592.0 \n",
"2728 0.0 168.0 18.0 46.0 10.0 0.0 2.0 0.0 642.0 235.0 193.0 \n",
"\n",
" Left Right Head TI Other Off Out.1 Int Blocks SCA \\\n",
"5430 27.0 107.0 13.0 1.0 6.0 0.0 1.0 4.0 10.0 25.0 \n",
"8211 11.0 74.0 5.0 0.0 3.0 0.0 0.0 2.0 4.0 12.0 \n",
"11071 0.0 2.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 1.0 \n",
"8212 1607.0 118.0 49.0 259.0 4.0 23.0 35.0 48.0 66.0 96.0 \n",
"2728 787.0 51.0 27.0 190.0 4.0 2.0 21.0 27.0 44.0 29.0 \n",
"\n",
" SCA90 PassLive PassDead Drib Fld Def GCA GCA90 PassLive.1 \\\n",
"5430 1.79 7.0 0.0 3.0 9.0 3.0 5.0 0.36 1.0 \n",
"8211 1.37 7.0 0.0 3.0 2.0 0.0 1.0 0.11 1.0 \n",
"11071 2.00 1.0 0.0 0.0 0.0 0.0 0.0 0.00 0.0 \n",
"8212 2.73 48.0 41.0 1.0 2.0 0.0 14.0 0.40 5.0 \n",
"2728 1.64 19.0 6.0 0.0 0.0 1.0 2.0 0.11 0.0 \n",
"\n",
" PassDead.1 Drib.1 Sh.1 Fld.1 Def.1 Tkl TklW Def 3rd Mid 3rd \\\n",
"5430 0.0 1.0 1.0 2.0 0.0 12.0 8.0 1.0 5.0 \n",
"8211 0.0 0.0 0.0 0.0 0.0 7.0 5.0 2.0 4.0 \n",
"11071 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 \n",
"8212 6.0 0.0 2.0 1.0 0.0 31.0 13.0 15.0 14.0 \n",
"2728 2.0 0.0 0.0 0.0 0.0 30.0 19.0 14.0 12.0 \n",
"\n",
" Att 3rd Tkl.1 Tkl% Past Succ % Def 3rd.1 Mid 3rd.1 \\\n",
"5430 6.0 3.0 25.0 9.0 69.0 29.5 14.0 94.0 \n",
"8211 1.0 1.0 20.0 4.0 40.0 32.3 7.0 58.0 \n",
"11071 0.0 0.0 NaN 0.0 1.0 8.3 1.0 6.0 \n",
"8212 2.0 14.0 41.2 20.0 67.0 29.1 122.0 90.0 \n",
"2728 4.0 12.0 42.9 16.0 68.0 31.5 129.0 59.0 \n",
"\n",
" Att 3rd.1 ShSv Pass Tkl+Int Clr Err Touches Def Pen Att Pen \\\n",
"5430 126.0 0.0 7.0 17.0 1.0 0.0 349.0 2.0 61.0 \n",
"8211 59.0 0.0 8.0 7.0 1.0 0.0 201.0 1.0 38.0 \n",
"11071 5.0 0.0 0.0 0.0 0.0 0.0 8.0 0.0 2.0 \n",
"8212 18.0 0.0 34.0 67.0 98.0 0.0 2307.0 182.0 18.0 \n",
"2728 28.0 0.0 39.0 49.0 60.0 1.0 1266.0 78.0 36.0 \n",
"\n",
" Succ% #Pl Megs Carries CPA Mis Dis Targ Rec Rec% \\\n",
"5430 37.5 6.0 1.0 228.0 12.0 42.0 34.0 535.0 235.0 43.9 \n",
"8211 80.0 8.0 0.0 124.0 4.0 29.0 15.0 357.0 143.0 40.1 \n",
"11071 NaN 0.0 0.0 5.0 0.0 0.0 1.0 20.0 4.0 20.0 \n",
"8212 40.0 8.0 2.0 1266.0 3.0 7.0 9.0 1366.0 1318.0 96.5 \n",
"2728 63.6 7.0 1.0 723.0 8.0 11.0 13.0 797.0 715.0 89.7 \n",
"\n",
" Prog.1 Mn/MP Min% Mn/Start Compl Subs Mn/Sub unSub PPM onG \\\n",
"5430 99.0 52 36.8 72.0 0.0 10 26.0 4 1.13 18.0 \n",
"8211 64.0 47 23.1 68.0 NaN 8 23.0 11 0.88 12.0 \n",
"11071 2.0 45 16.7 NaN 0.0 1 45.0 1 3.00 0.0 \n",
"8212 30.0 88 92.7 88.0 NaN 0 NaN 0 1.81 60.0 \n",
"2728 43.0 79 46.5 85.0 16.0 2 30.0 7 1.30 21.0 \n",
"\n",
" onGA +/- +/-90 On-Off onxG onxGA xG+/- xG+/-90 On-Off.1 \\\n",
"5430 22.0 -4.0 -0.29 0.17 15.6 19.8 -4.2 -0.30 0.08 \n",
"8211 17.0 -5.0 -0.57 -0.53 13.8 7.8 6.0 0.69 0.42 \n",
"11071 0.0 0.0 0.00 -0.40 1.0 0.7 0.3 0.68 0.74 \n",
"8212 41.0 19.0 0.54 1.98 51.3 42.9 8.4 0.24 1.26 \n",
"2728 26.0 -5.0 -0.28 -0.38 20.1 25.3 -5.3 -0.30 0.12 \n",
"\n",
" 2CrdY Fls PKwon PKcon OG Recov Won Lost Won% \\\n",
"5430 0.0 16 2.0 0.0 0.0 54.0 14.0 48.0 22.6 \n",
"8211 0.0 5 1.0 0.0 0.0 28.0 11.0 30.0 26.8 \n",
"11071 0.0 0 0.0 0.0 0.0 3.0 0.0 2.0 0.0 \n",
"8212 0.0 13 0.0 0.0 0.0 307.0 38.0 30.0 55.9 \n",
"2728 0.0 2 0.0 0.0 0.0 169.0 22.0 14.0 61.1 \n",
"\n",
" League Name League ID season Team Name Team Country \\\n",
"5430 Big-5-European-Leagues Big5 2019/2020 Brighton England \n",
"8211 Big-5-European-Leagues Big5 2020/2021 Brighton England \n",
"11071 Big-5-European-Leagues Big5 2021/2022 Brighton England \n",
"8212 Big-5-European-Leagues Big5 2020/2021 West Ham England \n",
"2728 Big-5-European-Leagues Big5 2018/2019 West Ham England \n",
"\n",
" Player Lower First Name Lower Last Name Lower First Initial Lower \\\n",
"5430 aaron connolly aaron connolly a \n",
"8211 aaron connolly aaron connolly a \n",
"11071 aaron connolly aaron connolly a \n",
"8212 aaron cresswell aaron cresswell a \n",
"2728 aaron cresswell aaron cresswell a \n",
"\n",
" Team Country Lower Nationality Code Nationality Cleaned Primary Pos \\\n",
"5430 england IRL Ireland FW \n",
"8211 england IRL Ireland FW \n",
"11071 england IRL Ireland FW \n",
"8212 england ENG England DF \n",
"2728 england ENG England DF \n",
"\n",
" Position Grouped outfielder_goalkeeper GA GA90 SoTA Saves Save% \\\n",
"5430 Forward Outfielder NaN NaN NaN NaN NaN \n",
"8211 Forward Outfielder NaN NaN NaN NaN NaN \n",
"11071 Forward Outfielder NaN NaN NaN NaN NaN \n",
"8212 Defender Outfielder NaN NaN NaN NaN NaN \n",
"2728 Defender Outfielder NaN NaN NaN NaN NaN \n",
"\n",
" W D L CS CS% PKA PKsv PKm Save%.1 PSxG PSxG/SoT PSxG+/- \\\n",
"5430 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN \n",
"8211 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN \n",
"11071 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN \n",
"8212 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN \n",
"2728 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN \n",
"\n",
" /90 Thr Launch% AvgLen Launch%.1 AvgLen.1 Opp Stp Stp% #OPA \\\n",
"5430 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN \n",
"8211 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN \n",
"11071 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN \n",
"8212 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN \n",
"2728 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN \n",
"\n",
" #OPA/90 AvgDist player_name_lower first_name_lower last_name_lower \\\n",
"5430 NaN NaN aaron connolly aaron connolly \n",
"8211 NaN NaN aaron connolly aaron connolly \n",
"11071 NaN NaN aaron connolly aaron connolly \n",
"8212 NaN NaN aaron cresswell aaron cresswell \n",
"2728 NaN NaN aaron cresswell aaron cresswell \n",
"\n",
" first_initial_lower country_lower player_name_fbref \\\n",
"5430 a ireland Aaron Connolly \n",
"8211 a ireland Aaron Connolly \n",
"11071 a ireland Aaron Connolly \n",
"8212 a england Aaron Cresswell \n",
"2728 a england Aaron Cresswell \n",
"\n",
" url_fbref \\\n",
"5430 https://fbref.com/en/players/27c01749/Aaron-Co... \n",
"8211 https://fbref.com/en/players/27c01749/Aaron-Co... \n",
"11071 https://fbref.com/en/players/27c01749/Aaron-Co... \n",
"8212 https://fbref.com/en/players/4f974391/Aaron-Cr... \n",
"2728 https://fbref.com/en/players/4f974391/Aaron-Cr... \n",
"\n",
" url_tm TmPos \\\n",
"5430 https://www.transfermarkt.com/aaron-connolly/p... Centre-Forward \n",
"8211 https://www.transfermarkt.com/aaron-connolly/p... Centre-Forward \n",
"11071 https://www.transfermarkt.com/aaron-connolly/p... Centre-Forward \n",
"8212 https://www.transfermarkt.com/aaron-cresswell/... Left-Back \n",
"2728 https://www.transfermarkt.com/aaron-cresswell/... Left-Back \n",
"\n",
" tm_id fbref_id \n",
"5430 434207 27c01749 \n",
"8211 434207 27c01749 \n",
"11071 434207 27c01749 \n",
"8212 92571 4f974391 \n",
"2728 92571 4f974391 "
]
},
"execution_count": 78,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# Join the Bio-Status dataset to the Historical Player Valuation dataset\n",
"\n",
"## Join the TransferMarkt Bio-Status and Player Valuation DataFrames\n",
"df_fbref_merge = pd.merge(df_fbref_players, df_fbref_tm_urls, left_on='Player', right_on='player_name_fbref', how='left')\n",
"\n",
"\n",
"## Rename columns - required otherwise 'birth_year' gets dropped\n",
"df_fbref_merge = df_fbref_merge.rename(columns={'birth_year': 'born'})\n",
"\n",
"\n",
"## Remove duplicates\n",
"\n",
"### Remove duplicate columns after join (contain '_y') and remove '_x' suffix from kept columns\n",
"df_fbref_merge = df_fbref_merge[df_fbref_merge.columns.drop(list(df_fbref_merge.filter(regex='_y')))]\n",
"df_fbref_merge.columns = df_fbref_merge.columns.str.replace('_x', '')\n",
"\n",
"### Remove duplicate rows\n",
"df_fbref_merge = df_fbref_merge.drop_duplicates(subset=['season', 'player_name_fbref', 'Team Name', 'Team Country', 'Comp'], keep='first')\n",
"\n",
"\n",
"### Drop unnecessary columns\n",
"df_fbref_merge = df_fbref_merge.drop(['Player'], axis=1)\n",
"\n",
"\n",
"## Rename columns\n",
"df_fbref_merge = df_fbref_merge.rename(columns={'born': 'birth_year'})\n",
"\n",
"\n",
"## Sort columns\n",
"df_fbref_merge = df_fbref_merge.sort_values(by=['player_name_fbref'], ascending=[True])\n",
"\n",
"\n",
"## Display DataFrame\n",
"df_fbref_merge.head()"
]
},
{
"cell_type": "code",
"execution_count": 79,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"No. rows in FBref Player DataFrame before join to FBref-TM Mapping data: 13680\n",
"No. rows in DataFrame AFTER join: 12753\n",
"\n",
"Variance in rows before and after join: -927\n",
"\n",
"----------\n"
]
}
],
"source": [
"print('No. rows in FBref Player DataFrame before join to FBref-TM Mapping data: {}'.format(len(df_fbref_players)))\n",
"print('No. rows in DataFrame AFTER join: {}\\n'.format(len(df_fbref_merge)))\n",
"print('Variance in rows before and after join: {}\\n'.format(len(df_fbref_merge) - len(df_fbref_players)))\n",
"print('-'*10)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Some duplication occuring here."
]
},
{
"cell_type": "code",
"execution_count": 80,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" Nation | \n",
" Pos | \n",
" Squad | \n",
" Comp | \n",
" Age | \n",
" birth_year | \n",
" MP | \n",
" Starts | \n",
" Min | \n",
" 90s | \n",
" Gls | \n",
" Ast | \n",
" G-PK | \n",
" PK | \n",
" PKatt | \n",
" CrdY | \n",
" CrdR | \n",
" Gls.1 | \n",
" Ast.1 | \n",
" G+A | \n",
" G-PK.1 | \n",
" G+A-PK | \n",
" xG | \n",
" npxG | \n",
" xA | \n",
" npxG+xA | \n",
" xG.1 | \n",
" xA.1 | \n",
" xG+xA | \n",
" npxG.1 | \n",
" npxG+xA.1 | \n",
" Matches | \n",
" Sh | \n",
" SoT | \n",
" SoT% | \n",
" Sh/90 | \n",
" SoT/90 | \n",
" G/Sh | \n",
" G/SoT | \n",
" Dist | \n",
" FK | \n",
" npxG/Sh | \n",
" G-xG | \n",
" np:G-xG | \n",
" Cmp | \n",
" Att | \n",
" Cmp% | \n",
" TotDist | \n",
" PrgDist | \n",
" Cmp.1 | \n",
" Att.1 | \n",
" Cmp%.1 | \n",
" Cmp.2 | \n",
" Att.2 | \n",
" Cmp%.2 | \n",
" Cmp.3 | \n",
" Att.3 | \n",
" Cmp%.3 | \n",
" A-xA | \n",
" KP | \n",
" 1/3 | \n",
" PPA | \n",
" CrsPA | \n",
" Prog | \n",
" Live | \n",
" Dead | \n",
" TB | \n",
" Press | \n",
" Sw | \n",
" Crs | \n",
" CK | \n",
" In | \n",
" Out | \n",
" Str | \n",
" Ground | \n",
" Low | \n",
" High | \n",
" Left | \n",
" Right | \n",
" Head | \n",
" TI | \n",
" Other | \n",
" Off | \n",
" Out.1 | \n",
" Int | \n",
" Blocks | \n",
" SCA | \n",
" SCA90 | \n",
" PassLive | \n",
" PassDead | \n",
" Drib | \n",
" Fld | \n",
" Def | \n",
" GCA | \n",
" GCA90 | \n",
" PassLive.1 | \n",
" PassDead.1 | \n",
" Drib.1 | \n",
" Sh.1 | \n",
" Fld.1 | \n",
" Def.1 | \n",
" Tkl | \n",
" TklW | \n",
" Def 3rd | \n",
" Mid 3rd | \n",
" Att 3rd | \n",
" Tkl.1 | \n",
" Tkl% | \n",
" Past | \n",
" Succ | \n",
" % | \n",
" Def 3rd.1 | \n",
" Mid 3rd.1 | \n",
" Att 3rd.1 | \n",
" ShSv | \n",
" Pass | \n",
" Tkl+Int | \n",
" Clr | \n",
" Err | \n",
" Touches | \n",
" Def Pen | \n",
" Att Pen | \n",
" Succ% | \n",
" #Pl | \n",
" Megs | \n",
" Carries | \n",
" CPA | \n",
" Mis | \n",
" Dis | \n",
" Targ | \n",
" Rec | \n",
" Rec% | \n",
" Prog.1 | \n",
" Mn/MP | \n",
" Min% | \n",
" Mn/Start | \n",
" Compl | \n",
" Subs | \n",
" Mn/Sub | \n",
" unSub | \n",
" PPM | \n",
" onG | \n",
" onGA | \n",
" +/- | \n",
" +/-90 | \n",
" On-Off | \n",
" onxG | \n",
" onxGA | \n",
" xG+/- | \n",
" xG+/-90 | \n",
" On-Off.1 | \n",
" 2CrdY | \n",
" Fls | \n",
" PKwon | \n",
" PKcon | \n",
" OG | \n",
" Recov | \n",
" Won | \n",
" Lost | \n",
" Won% | \n",
" League Name | \n",
" League ID | \n",
" season | \n",
" Team Name | \n",
" Team Country | \n",
" Player Lower | \n",
" First Name Lower | \n",
" Last Name Lower | \n",
" First Initial Lower | \n",
" Team Country Lower | \n",
" Nationality Code | \n",
" Nationality Cleaned | \n",
" Primary Pos | \n",
" Position Grouped | \n",
" outfielder_goalkeeper | \n",
" GA | \n",
" GA90 | \n",
" SoTA | \n",
" Saves | \n",
" Save% | \n",
" W | \n",
" D | \n",
" L | \n",
" CS | \n",
" CS% | \n",
" PKA | \n",
" PKsv | \n",
" PKm | \n",
" Save%.1 | \n",
" PSxG | \n",
" PSxG/SoT | \n",
" PSxG+/- | \n",
" /90 | \n",
" Thr | \n",
" Launch% | \n",
" AvgLen | \n",
" Launch%.1 | \n",
" AvgLen.1 | \n",
" Opp | \n",
" Stp | \n",
" Stp% | \n",
" #OPA | \n",
" #OPA/90 | \n",
" AvgDist | \n",
" player_name_lower | \n",
" first_name_lower | \n",
" last_name_lower | \n",
" first_initial_lower | \n",
" country_lower | \n",
" player_name_fbref | \n",
" url_fbref | \n",
" url_tm | \n",
" TmPos | \n",
" tm_id | \n",
" fbref_id | \n",
"
\n",
" \n",
" \n",
" \n",
" 3599 | \n",
" es ESP | \n",
" DF | \n",
" Barcelona | \n",
" La Liga | \n",
" 31 | \n",
" 1987.0 | \n",
" 35 | \n",
" 35 | \n",
" 3150.0 | \n",
" 35.0 | \n",
" 4 | \n",
" 2 | \n",
" 4 | \n",
" 0 | \n",
" 0 | \n",
" 6 | \n",
" 0 | \n",
" 0.11 | \n",
" 0.06 | \n",
" 0.17 | \n",
" 0.11 | \n",
" 0.17 | \n",
" 3.7 | \n",
" 3.7 | \n",
" 1.5 | \n",
" 5.2 | \n",
" 0.11 | \n",
" 0.04 | \n",
" 0.15 | \n",
" 0.11 | \n",
" 0.15 | \n",
" Matches | \n",
" 20.0 | \n",
" 11.0 | \n",
" 55.0 | \n",
" 0.57 | \n",
" 0.31 | \n",
" 0.20 | \n",
" 0.36 | \n",
" 7.3 | \n",
" 0.0 | \n",
" 0.19 | \n",
" 0.3 | \n",
" 0.3 | \n",
" 2230.0 | \n",
" 2429.0 | \n",
" 91.8 | \n",
" 46352.0 | \n",
" 14931.0 | \n",
" 666.0 | \n",
" 710.0 | \n",
" 93.8 | \n",
" 1209.0 | \n",
" 1277.0 | \n",
" 94.7 | \n",
" 343.0 | \n",
" 420.0 | \n",
" 81.7 | \n",
" 0.5 | \n",
" 8.0 | \n",
" 156.0 | \n",
" 5.0 | \n",
" 0.0 | \n",
" 103.0 | \n",
" 2347.0 | \n",
" 82.0 | \n",
" 3.0 | \n",
" 296.0 | \n",
" 58.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 1937.0 | \n",
" 190.0 | \n",
" 302.0 | \n",
" 97.0 | \n",
" 2125.0 | \n",
" 126.0 | \n",
" 12.0 | \n",
" 13.0 | \n",
" 5.0 | \n",
" 22.0 | \n",
" 14.0 | \n",
" 13.0 | \n",
" 25.0 | \n",
" 0.71 | \n",
" 17.0 | \n",
" 0.0 | \n",
" 2.0 | \n",
" 1.0 | \n",
" 1.0 | \n",
" 6.0 | \n",
" 0.17 | \n",
" 2.0 | \n",
" 0.0 | \n",
" 1.0 | \n",
" 2.0 | \n",
" 1.0 | \n",
" 0.0 | \n",
" 45.0 | \n",
" 27.0 | \n",
" 29.0 | \n",
" 15.0 | \n",
" 1.0 | \n",
" 20.0 | \n",
" 54.1 | \n",
" 17.0 | \n",
" 87.0 | \n",
" 31.9 | \n",
" 160.0 | \n",
" 101.0 | \n",
" 12.0 | \n",
" 2.0 | \n",
" 37.0 | \n",
" 77.0 | \n",
" 156.0 | \n",
" 2.0 | \n",
" 2760.0 | \n",
" 385.0 | \n",
" 32.0 | \n",
" 76.2 | \n",
" 16.0 | \n",
" 0.0 | \n",
" 1915.0 | \n",
" 1.0 | \n",
" 11.0 | \n",
" 9.0 | \n",
" 1963.0 | \n",
" 1889.0 | \n",
" 96.2 | \n",
" 27.0 | \n",
" 90 | \n",
" 92.1 | \n",
" 90.0 | \n",
" 35.0 | \n",
" 0 | \n",
" NaN | \n",
" 1 | \n",
" 2.43 | \n",
" 86.0 | \n",
" 30.0 | \n",
" 56.0 | \n",
" 1.60 | \n",
" 2.27 | \n",
" 69.9 | \n",
" 35.6 | \n",
" 34.2 | \n",
" 0.98 | \n",
" 1.29 | \n",
" 0.0 | \n",
" 24 | \n",
" 1.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 473.0 | \n",
" 91.0 | \n",
" 33.0 | \n",
" 73.4 | \n",
" Big-5-European-Leagues | \n",
" Big5 | \n",
" 2018/2019 | \n",
" Barcelona | \n",
" Spain | \n",
" gerard piqua | \n",
" gerard | \n",
" piqua | \n",
" g | \n",
" spain | \n",
" ESP | \n",
" Spain | \n",
" DF | \n",
" Defender | \n",
" Outfielder | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" gerard piqua | \n",
" gerard | \n",
" piqua | \n",
" g | \n",
" spain | \n",
" Gerard Piqué | \n",
" https://fbref.com/en/players/adfc9123/Gerard-P... | \n",
" https://www.transfermarkt.com/gerard-pique/pro... | \n",
" Centre-Back | \n",
" 18944 | \n",
" adfc9123 | \n",
"
\n",
" \n",
" 6327 | \n",
" es ESP | \n",
" DF | \n",
" Barcelona | \n",
" La Liga | \n",
" 32 | \n",
" 1987.0 | \n",
" 35 | \n",
" 35 | \n",
" 3092.0 | \n",
" 34.4 | \n",
" 1 | \n",
" 0 | \n",
" 1 | \n",
" 0 | \n",
" 0 | \n",
" 15 | \n",
" 0 | \n",
" 0.03 | \n",
" 0.00 | \n",
" 0.03 | \n",
" 0.03 | \n",
" 0.03 | \n",
" 2.3 | \n",
" 2.3 | \n",
" 0.6 | \n",
" 2.9 | \n",
" 0.07 | \n",
" 0.02 | \n",
" 0.08 | \n",
" 0.07 | \n",
" 0.08 | \n",
" Matches | \n",
" 15.0 | \n",
" 6.0 | \n",
" 40.0 | \n",
" 0.44 | \n",
" 0.17 | \n",
" 0.07 | \n",
" 0.17 | \n",
" 8.4 | \n",
" 1.0 | \n",
" 0.15 | \n",
" -1.3 | \n",
" -1.3 | \n",
" 2469.0 | \n",
" 2659.0 | \n",
" 92.9 | \n",
" 53752.0 | \n",
" 14795.0 | \n",
" 645.0 | \n",
" 682.0 | \n",
" 94.6 | \n",
" 1381.0 | \n",
" 1437.0 | \n",
" 96.1 | \n",
" 427.0 | \n",
" 506.0 | \n",
" 84.4 | \n",
" -0.6 | \n",
" 5.0 | \n",
" 192.0 | \n",
" 3.0 | \n",
" 0.0 | \n",
" 116.0 | \n",
" 2548.0 | \n",
" 111.0 | \n",
" 2.0 | \n",
" 275.0 | \n",
" 79.0 | \n",
" 3.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 2121.0 | \n",
" 227.0 | \n",
" 311.0 | \n",
" 113.0 | \n",
" 2364.0 | \n",
" 99.0 | \n",
" 9.0 | \n",
" 13.0 | \n",
" 1.0 | \n",
" 25.0 | \n",
" 14.0 | \n",
" 14.0 | \n",
" 12.0 | \n",
" 0.35 | \n",
" 12.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 1.0 | \n",
" 0.03 | \n",
" 1.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 37.0 | \n",
" 22.0 | \n",
" 21.0 | \n",
" 16.0 | \n",
" 0.0 | \n",
" 14.0 | \n",
" 48.3 | \n",
" 15.0 | \n",
" 83.0 | \n",
" 34.0 | \n",
" 128.0 | \n",
" 109.0 | \n",
" 7.0 | \n",
" 2.0 | \n",
" 40.0 | \n",
" 73.0 | \n",
" 182.0 | \n",
" 1.0 | \n",
" 2996.0 | \n",
" 427.0 | \n",
" 28.0 | \n",
" 100.0 | \n",
" 9.0 | \n",
" 0.0 | \n",
" 2084.0 | \n",
" 0.0 | \n",
" 9.0 | \n",
" 7.0 | \n",
" 2211.0 | \n",
" 2171.0 | \n",
" 98.2 | \n",
" 21.0 | \n",
" 88 | \n",
" 90.4 | \n",
" 88.0 | \n",
" 31.0 | \n",
" 0 | \n",
" NaN | \n",
" 0 | \n",
" 2.09 | \n",
" 71.0 | \n",
" 36.0 | \n",
" 35.0 | \n",
" 1.02 | \n",
" -2.55 | \n",
" 56.2 | \n",
" 33.8 | \n",
" 22.4 | \n",
" 0.65 | \n",
" -1.49 | \n",
" 0.0 | \n",
" 32 | \n",
" 0.0 | \n",
" 2.0 | \n",
" 0.0 | \n",
" 391.0 | \n",
" 128.0 | \n",
" 40.0 | \n",
" 76.2 | \n",
" Big-5-European-Leagues | \n",
" Big5 | \n",
" 2019/2020 | \n",
" Barcelona | \n",
" Spain | \n",
" gerard piqua | \n",
" gerard | \n",
" piqua | \n",
" g | \n",
" spain | \n",
" ESP | \n",
" Spain | \n",
" DF | \n",
" Defender | \n",
" Outfielder | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" gerard piqua | \n",
" gerard | \n",
" piqua | \n",
" g | \n",
" spain | \n",
" Gerard Piqué | \n",
" https://fbref.com/en/players/adfc9123/Gerard-P... | \n",
" https://www.transfermarkt.com/gerard-pique/pro... | \n",
" Centre-Back | \n",
" 18944 | \n",
" adfc9123 | \n",
"
\n",
" \n",
" 11649 | \n",
" es ESP | \n",
" DF | \n",
" Barcelona | \n",
" La Liga | \n",
" 34 | \n",
" 1987.0 | \n",
" 2 | \n",
" 2 | \n",
" 120.0 | \n",
" 1.3 | \n",
" 1 | \n",
" 0 | \n",
" 1 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0.75 | \n",
" 0.00 | \n",
" 0.75 | \n",
" 0.75 | \n",
" 0.75 | \n",
" 0.2 | \n",
" 0.2 | \n",
" 0.0 | \n",
" 0.2 | \n",
" 0.15 | \n",
" 0.00 | \n",
" 0.15 | \n",
" 0.15 | \n",
" 0.15 | \n",
" Matches | \n",
" 1.0 | \n",
" 1.0 | \n",
" 100.0 | \n",
" 0.75 | \n",
" 0.75 | \n",
" 1.00 | \n",
" 1.00 | \n",
" 8.0 | \n",
" 0.0 | \n",
" 0.19 | \n",
" 0.8 | \n",
" 0.8 | \n",
" 94.0 | \n",
" 97.0 | \n",
" 96.9 | \n",
" 2030.0 | \n",
" 415.0 | \n",
" 26.0 | \n",
" 28.0 | \n",
" 92.9 | \n",
" 51.0 | \n",
" 51.0 | \n",
" 100.0 | \n",
" 17.0 | \n",
" 18.0 | \n",
" 94.4 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 3.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 2.0 | \n",
" 89.0 | \n",
" 8.0 | \n",
" 0.0 | \n",
" 9.0 | \n",
" 5.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 85.0 | \n",
" 5.0 | \n",
" 7.0 | \n",
" 11.0 | \n",
" 80.0 | \n",
" 1.0 | \n",
" 0.0 | \n",
" 1.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 1.0 | \n",
" 0.75 | \n",
" 1.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.00 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 1.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 1.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" NaN | \n",
" 0.0 | \n",
" 2.0 | \n",
" 25.0 | \n",
" 4.0 | \n",
" 4.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 2.0 | \n",
" 4.0 | \n",
" 10.0 | \n",
" 0.0 | \n",
" 112.0 | \n",
" 24.0 | \n",
" 1.0 | \n",
" NaN | \n",
" 0.0 | \n",
" 0.0 | \n",
" 69.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 82.0 | \n",
" 79.0 | \n",
" 96.3 | \n",
" 0.0 | \n",
" 60 | \n",
" 44.4 | \n",
" 60.0 | \n",
" 1.0 | \n",
" 0 | \n",
" NaN | \n",
" 0 | \n",
" 2.00 | \n",
" 4.0 | \n",
" 2.0 | \n",
" 2.0 | \n",
" 1.50 | \n",
" 0.90 | \n",
" 3.3 | \n",
" 1.5 | \n",
" 1.8 | \n",
" 1.35 | \n",
" 1.00 | \n",
" 0.0 | \n",
" 1 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 9.0 | \n",
" 5.0 | \n",
" 1.0 | \n",
" 83.3 | \n",
" Big-5-European-Leagues | \n",
" Big5 | \n",
" 2021/2022 | \n",
" Barcelona | \n",
" Spain | \n",
" gerard piqua | \n",
" gerard | \n",
" piqua | \n",
" g | \n",
" spain | \n",
" ESP | \n",
" Spain | \n",
" DF | \n",
" Defender | \n",
" Outfielder | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" gerard piqua | \n",
" gerard | \n",
" piqua | \n",
" g | \n",
" spain | \n",
" Gerard Piqué | \n",
" https://fbref.com/en/players/adfc9123/Gerard-P... | \n",
" https://www.transfermarkt.com/gerard-pique/pro... | \n",
" Centre-Back | \n",
" 18944 | \n",
" adfc9123 | \n",
"
\n",
" \n",
" 9109 | \n",
" es ESP | \n",
" DF | \n",
" Barcelona | \n",
" La Liga | \n",
" 33 | \n",
" 1987.0 | \n",
" 18 | \n",
" 18 | \n",
" 1481.0 | \n",
" 16.5 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 4 | \n",
" 0 | \n",
" 0.00 | \n",
" 0.00 | \n",
" 0.00 | \n",
" 0.00 | \n",
" 0.00 | \n",
" 0.6 | \n",
" 0.6 | \n",
" 0.5 | \n",
" 1.1 | \n",
" 0.04 | \n",
" 0.03 | \n",
" 0.07 | \n",
" 0.04 | \n",
" 0.07 | \n",
" Matches | \n",
" 8.0 | \n",
" 2.0 | \n",
" 25.0 | \n",
" 0.49 | \n",
" 0.12 | \n",
" 0.00 | \n",
" 0.00 | \n",
" 9.3 | \n",
" 0.0 | \n",
" 0.08 | \n",
" -0.6 | \n",
" -0.6 | \n",
" 1173.0 | \n",
" 1247.0 | \n",
" 94.1 | \n",
" 24743.0 | \n",
" 6069.0 | \n",
" 321.0 | \n",
" 340.0 | \n",
" 94.4 | \n",
" 666.0 | \n",
" 690.0 | \n",
" 96.5 | \n",
" 173.0 | \n",
" 197.0 | \n",
" 87.8 | \n",
" -0.5 | \n",
" 2.0 | \n",
" 82.0 | \n",
" 1.0 | \n",
" 0.0 | \n",
" 35.0 | \n",
" 1204.0 | \n",
" 43.0 | \n",
" 0.0 | \n",
" 91.0 | \n",
" 32.0 | \n",
" 1.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 1033.0 | \n",
" 93.0 | \n",
" 121.0 | \n",
" 72.0 | \n",
" 1079.0 | \n",
" 45.0 | \n",
" 5.0 | \n",
" 10.0 | \n",
" 1.0 | \n",
" 14.0 | \n",
" 6.0 | \n",
" 4.0 | \n",
" 5.0 | \n",
" 0.30 | \n",
" 5.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 1.0 | \n",
" 0.06 | \n",
" 1.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 21.0 | \n",
" 13.0 | \n",
" 13.0 | \n",
" 7.0 | \n",
" 1.0 | \n",
" 9.0 | \n",
" 64.3 | \n",
" 5.0 | \n",
" 46.0 | \n",
" 40.4 | \n",
" 51.0 | \n",
" 62.0 | \n",
" 1.0 | \n",
" 0.0 | \n",
" 13.0 | \n",
" 36.0 | \n",
" 65.0 | \n",
" 0.0 | \n",
" 1368.0 | \n",
" 161.0 | \n",
" 14.0 | \n",
" 100.0 | \n",
" 1.0 | \n",
" 0.0 | \n",
" 961.0 | \n",
" 0.0 | \n",
" 2.0 | \n",
" 3.0 | \n",
" 1046.0 | \n",
" 1015.0 | \n",
" 97.0 | \n",
" 7.0 | \n",
" 82 | \n",
" 43.3 | \n",
" 82.0 | \n",
" 13.0 | \n",
" 0 | \n",
" NaN | \n",
" 1 | \n",
" 1.53 | \n",
" 34.0 | \n",
" 22.0 | \n",
" 12.0 | \n",
" 0.73 | \n",
" -0.90 | \n",
" 32.9 | \n",
" 16.1 | \n",
" 16.8 | \n",
" 1.02 | \n",
" -0.02 | \n",
" 0.0 | \n",
" 13 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 182.0 | \n",
" 66.0 | \n",
" 21.0 | \n",
" 75.9 | \n",
" Big-5-European-Leagues | \n",
" Big5 | \n",
" 2020/2021 | \n",
" Barcelona | \n",
" Spain | \n",
" gerard piqua | \n",
" gerard | \n",
" piqua | \n",
" g | \n",
" spain | \n",
" ESP | \n",
" Spain | \n",
" DF | \n",
" Defender | \n",
" Outfielder | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" gerard piqua | \n",
" gerard | \n",
" piqua | \n",
" g | \n",
" spain | \n",
" Gerard Piqué | \n",
" https://fbref.com/en/players/adfc9123/Gerard-P... | \n",
" https://www.transfermarkt.com/gerard-pique/pro... | \n",
" Centre-Back | \n",
" 18944 | \n",
" adfc9123 | \n",
"
\n",
" \n",
" 916 | \n",
" es ESP | \n",
" DF | \n",
" Barcelona | \n",
" La Liga | \n",
" 30 | \n",
" 1987.0 | \n",
" 30 | \n",
" 29 | \n",
" 2631.0 | \n",
" 29.2 | \n",
" 2 | \n",
" 0 | \n",
" 2 | \n",
" 0 | \n",
" 0 | \n",
" 8 | \n",
" 0 | \n",
" 0.07 | \n",
" 0.00 | \n",
" 0.07 | \n",
" 0.07 | \n",
" 0.07 | \n",
" 3.0 | \n",
" 3.0 | \n",
" 0.9 | \n",
" 3.8 | \n",
" 0.10 | \n",
" 0.03 | \n",
" 0.13 | \n",
" 0.10 | \n",
" 0.13 | \n",
" Matches | \n",
" 18.0 | \n",
" 5.0 | \n",
" 27.8 | \n",
" 0.62 | \n",
" 0.17 | \n",
" 0.11 | \n",
" 0.40 | \n",
" 9.2 | \n",
" 0.0 | \n",
" 0.16 | \n",
" -1.0 | \n",
" -1.0 | \n",
" 1606.0 | \n",
" 1810.0 | \n",
" 88.7 | \n",
" 34428.0 | \n",
" 10291.0 | \n",
" 460.0 | \n",
" 499.0 | \n",
" 92.2 | \n",
" 841.0 | \n",
" 904.0 | \n",
" 93.0 | \n",
" 293.0 | \n",
" 380.0 | \n",
" 77.1 | \n",
" -0.9 | \n",
" 6.0 | \n",
" 123.0 | \n",
" 4.0 | \n",
" 0.0 | \n",
" 90.0 | \n",
" 1764.0 | \n",
" 46.0 | \n",
" 0.0 | \n",
" 263.0 | \n",
" 70.0 | \n",
" 2.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 1436.0 | \n",
" 120.0 | \n",
" 254.0 | \n",
" 95.0 | \n",
" 1552.0 | \n",
" 106.0 | \n",
" 10.0 | \n",
" 8.0 | \n",
" 1.0 | \n",
" 28.0 | \n",
" 19.0 | \n",
" 11.0 | \n",
" 17.0 | \n",
" 0.58 | \n",
" 13.0 | \n",
" 0.0 | \n",
" 1.0 | \n",
" 2.0 | \n",
" 0.0 | \n",
" 1.0 | \n",
" 0.03 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 1.0 | \n",
" 0.0 | \n",
" 30.0 | \n",
" 22.0 | \n",
" 22.0 | \n",
" 8.0 | \n",
" 0.0 | \n",
" 12.0 | \n",
" 34.3 | \n",
" 23.0 | \n",
" 78.0 | \n",
" 32.5 | \n",
" 144.0 | \n",
" 80.0 | \n",
" 16.0 | \n",
" 2.0 | \n",
" 26.0 | \n",
" 62.0 | \n",
" 103.0 | \n",
" 5.0 | \n",
" 2075.0 | \n",
" 318.0 | \n",
" 28.0 | \n",
" 60.0 | \n",
" 6.0 | \n",
" 0.0 | \n",
" 1419.0 | \n",
" 0.0 | \n",
" 4.0 | \n",
" 7.0 | \n",
" 1385.0 | \n",
" 1341.0 | \n",
" 96.8 | \n",
" 27.0 | \n",
" 88 | \n",
" 76.9 | \n",
" NaN | \n",
" 27.0 | \n",
" 1 | \n",
" NaN | \n",
" 6 | \n",
" 2.57 | \n",
" 81.0 | \n",
" 23.0 | \n",
" 58.0 | \n",
" 1.98 | \n",
" 0.62 | \n",
" 65.0 | \n",
" 30.0 | \n",
" 35.1 | \n",
" 1.20 | \n",
" 0.96 | \n",
" 0.0 | \n",
" 23 | \n",
" 1.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 353.0 | \n",
" 54.0 | \n",
" 19.0 | \n",
" 74.0 | \n",
" Big-5-European-Leagues | \n",
" Big5 | \n",
" 2017/2018 | \n",
" Barcelona | \n",
" Spain | \n",
" gerard piqua | \n",
" gerard | \n",
" piqua | \n",
" g | \n",
" spain | \n",
" ESP | \n",
" Spain | \n",
" DF | \n",
" Defender | \n",
" Outfielder | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" gerard piqua | \n",
" gerard | \n",
" piqua | \n",
" g | \n",
" spain | \n",
" Gerard Piqué | \n",
" https://fbref.com/en/players/adfc9123/Gerard-P... | \n",
" https://www.transfermarkt.com/gerard-pique/pro... | \n",
" Centre-Back | \n",
" 18944 | \n",
" adfc9123 | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" Nation Pos Squad Comp Age birth_year MP Starts Min \\\n",
"3599 es ESP DF Barcelona La Liga 31 1987.0 35 35 3150.0 \n",
"6327 es ESP DF Barcelona La Liga 32 1987.0 35 35 3092.0 \n",
"11649 es ESP DF Barcelona La Liga 34 1987.0 2 2 120.0 \n",
"9109 es ESP DF Barcelona La Liga 33 1987.0 18 18 1481.0 \n",
"916 es ESP DF Barcelona La Liga 30 1987.0 30 29 2631.0 \n",
"\n",
" 90s Gls Ast G-PK PK PKatt CrdY CrdR Gls.1 Ast.1 G+A \\\n",
"3599 35.0 4 2 4 0 0 6 0 0.11 0.06 0.17 \n",
"6327 34.4 1 0 1 0 0 15 0 0.03 0.00 0.03 \n",
"11649 1.3 1 0 1 0 0 0 0 0.75 0.00 0.75 \n",
"9109 16.5 0 0 0 0 0 4 0 0.00 0.00 0.00 \n",
"916 29.2 2 0 2 0 0 8 0 0.07 0.00 0.07 \n",
"\n",
" G-PK.1 G+A-PK xG npxG xA npxG+xA xG.1 xA.1 xG+xA npxG.1 \\\n",
"3599 0.11 0.17 3.7 3.7 1.5 5.2 0.11 0.04 0.15 0.11 \n",
"6327 0.03 0.03 2.3 2.3 0.6 2.9 0.07 0.02 0.08 0.07 \n",
"11649 0.75 0.75 0.2 0.2 0.0 0.2 0.15 0.00 0.15 0.15 \n",
"9109 0.00 0.00 0.6 0.6 0.5 1.1 0.04 0.03 0.07 0.04 \n",
"916 0.07 0.07 3.0 3.0 0.9 3.8 0.10 0.03 0.13 0.10 \n",
"\n",
" npxG+xA.1 Matches Sh SoT SoT% Sh/90 SoT/90 G/Sh G/SoT \\\n",
"3599 0.15 Matches 20.0 11.0 55.0 0.57 0.31 0.20 0.36 \n",
"6327 0.08 Matches 15.0 6.0 40.0 0.44 0.17 0.07 0.17 \n",
"11649 0.15 Matches 1.0 1.0 100.0 0.75 0.75 1.00 1.00 \n",
"9109 0.07 Matches 8.0 2.0 25.0 0.49 0.12 0.00 0.00 \n",
"916 0.13 Matches 18.0 5.0 27.8 0.62 0.17 0.11 0.40 \n",
"\n",
" Dist FK npxG/Sh G-xG np:G-xG Cmp Att Cmp% TotDist \\\n",
"3599 7.3 0.0 0.19 0.3 0.3 2230.0 2429.0 91.8 46352.0 \n",
"6327 8.4 1.0 0.15 -1.3 -1.3 2469.0 2659.0 92.9 53752.0 \n",
"11649 8.0 0.0 0.19 0.8 0.8 94.0 97.0 96.9 2030.0 \n",
"9109 9.3 0.0 0.08 -0.6 -0.6 1173.0 1247.0 94.1 24743.0 \n",
"916 9.2 0.0 0.16 -1.0 -1.0 1606.0 1810.0 88.7 34428.0 \n",
"\n",
" PrgDist Cmp.1 Att.1 Cmp%.1 Cmp.2 Att.2 Cmp%.2 Cmp.3 Att.3 \\\n",
"3599 14931.0 666.0 710.0 93.8 1209.0 1277.0 94.7 343.0 420.0 \n",
"6327 14795.0 645.0 682.0 94.6 1381.0 1437.0 96.1 427.0 506.0 \n",
"11649 415.0 26.0 28.0 92.9 51.0 51.0 100.0 17.0 18.0 \n",
"9109 6069.0 321.0 340.0 94.4 666.0 690.0 96.5 173.0 197.0 \n",
"916 10291.0 460.0 499.0 92.2 841.0 904.0 93.0 293.0 380.0 \n",
"\n",
" Cmp%.3 A-xA KP 1/3 PPA CrsPA Prog Live Dead TB Press \\\n",
"3599 81.7 0.5 8.0 156.0 5.0 0.0 103.0 2347.0 82.0 3.0 296.0 \n",
"6327 84.4 -0.6 5.0 192.0 3.0 0.0 116.0 2548.0 111.0 2.0 275.0 \n",
"11649 94.4 0.0 0.0 3.0 0.0 0.0 2.0 89.0 8.0 0.0 9.0 \n",
"9109 87.8 -0.5 2.0 82.0 1.0 0.0 35.0 1204.0 43.0 0.0 91.0 \n",
"916 77.1 -0.9 6.0 123.0 4.0 0.0 90.0 1764.0 46.0 0.0 263.0 \n",
"\n",
" Sw Crs CK In Out Str Ground Low High Left Right \\\n",
"3599 58.0 0.0 0.0 0.0 0.0 0.0 1937.0 190.0 302.0 97.0 2125.0 \n",
"6327 79.0 3.0 0.0 0.0 0.0 0.0 2121.0 227.0 311.0 113.0 2364.0 \n",
"11649 5.0 0.0 0.0 0.0 0.0 0.0 85.0 5.0 7.0 11.0 80.0 \n",
"9109 32.0 1.0 0.0 0.0 0.0 0.0 1033.0 93.0 121.0 72.0 1079.0 \n",
"916 70.0 2.0 0.0 0.0 0.0 0.0 1436.0 120.0 254.0 95.0 1552.0 \n",
"\n",
" Head TI Other Off Out.1 Int Blocks SCA SCA90 PassLive \\\n",
"3599 126.0 12.0 13.0 5.0 22.0 14.0 13.0 25.0 0.71 17.0 \n",
"6327 99.0 9.0 13.0 1.0 25.0 14.0 14.0 12.0 0.35 12.0 \n",
"11649 1.0 0.0 1.0 0.0 0.0 0.0 0.0 1.0 0.75 1.0 \n",
"9109 45.0 5.0 10.0 1.0 14.0 6.0 4.0 5.0 0.30 5.0 \n",
"916 106.0 10.0 8.0 1.0 28.0 19.0 11.0 17.0 0.58 13.0 \n",
"\n",
" PassDead Drib Fld Def GCA GCA90 PassLive.1 PassDead.1 Drib.1 \\\n",
"3599 0.0 2.0 1.0 1.0 6.0 0.17 2.0 0.0 1.0 \n",
"6327 0.0 0.0 0.0 0.0 1.0 0.03 1.0 0.0 0.0 \n",
"11649 0.0 0.0 0.0 0.0 0.0 0.00 0.0 0.0 0.0 \n",
"9109 0.0 0.0 0.0 0.0 1.0 0.06 1.0 0.0 0.0 \n",
"916 0.0 1.0 2.0 0.0 1.0 0.03 0.0 0.0 0.0 \n",
"\n",
" Sh.1 Fld.1 Def.1 Tkl TklW Def 3rd Mid 3rd Att 3rd Tkl.1 Tkl% \\\n",
"3599 2.0 1.0 0.0 45.0 27.0 29.0 15.0 1.0 20.0 54.1 \n",
"6327 0.0 0.0 0.0 37.0 22.0 21.0 16.0 0.0 14.0 48.3 \n",
"11649 0.0 0.0 0.0 1.0 0.0 0.0 1.0 0.0 0.0 NaN \n",
"9109 0.0 0.0 0.0 21.0 13.0 13.0 7.0 1.0 9.0 64.3 \n",
"916 0.0 1.0 0.0 30.0 22.0 22.0 8.0 0.0 12.0 34.3 \n",
"\n",
" Past Succ % Def 3rd.1 Mid 3rd.1 Att 3rd.1 ShSv Pass Tkl+Int \\\n",
"3599 17.0 87.0 31.9 160.0 101.0 12.0 2.0 37.0 77.0 \n",
"6327 15.0 83.0 34.0 128.0 109.0 7.0 2.0 40.0 73.0 \n",
"11649 0.0 2.0 25.0 4.0 4.0 0.0 0.0 2.0 4.0 \n",
"9109 5.0 46.0 40.4 51.0 62.0 1.0 0.0 13.0 36.0 \n",
"916 23.0 78.0 32.5 144.0 80.0 16.0 2.0 26.0 62.0 \n",
"\n",
" Clr Err Touches Def Pen Att Pen Succ% #Pl Megs Carries CPA \\\n",
"3599 156.0 2.0 2760.0 385.0 32.0 76.2 16.0 0.0 1915.0 1.0 \n",
"6327 182.0 1.0 2996.0 427.0 28.0 100.0 9.0 0.0 2084.0 0.0 \n",
"11649 10.0 0.0 112.0 24.0 1.0 NaN 0.0 0.0 69.0 0.0 \n",
"9109 65.0 0.0 1368.0 161.0 14.0 100.0 1.0 0.0 961.0 0.0 \n",
"916 103.0 5.0 2075.0 318.0 28.0 60.0 6.0 0.0 1419.0 0.0 \n",
"\n",
" Mis Dis Targ Rec Rec% Prog.1 Mn/MP Min% Mn/Start Compl \\\n",
"3599 11.0 9.0 1963.0 1889.0 96.2 27.0 90 92.1 90.0 35.0 \n",
"6327 9.0 7.0 2211.0 2171.0 98.2 21.0 88 90.4 88.0 31.0 \n",
"11649 0.0 0.0 82.0 79.0 96.3 0.0 60 44.4 60.0 1.0 \n",
"9109 2.0 3.0 1046.0 1015.0 97.0 7.0 82 43.3 82.0 13.0 \n",
"916 4.0 7.0 1385.0 1341.0 96.8 27.0 88 76.9 NaN 27.0 \n",
"\n",
" Subs Mn/Sub unSub PPM onG onGA +/- +/-90 On-Off onxG \\\n",
"3599 0 NaN 1 2.43 86.0 30.0 56.0 1.60 2.27 69.9 \n",
"6327 0 NaN 0 2.09 71.0 36.0 35.0 1.02 -2.55 56.2 \n",
"11649 0 NaN 0 2.00 4.0 2.0 2.0 1.50 0.90 3.3 \n",
"9109 0 NaN 1 1.53 34.0 22.0 12.0 0.73 -0.90 32.9 \n",
"916 1 NaN 6 2.57 81.0 23.0 58.0 1.98 0.62 65.0 \n",
"\n",
" onxGA xG+/- xG+/-90 On-Off.1 2CrdY Fls PKwon PKcon OG Recov \\\n",
"3599 35.6 34.2 0.98 1.29 0.0 24 1.0 0.0 0.0 473.0 \n",
"6327 33.8 22.4 0.65 -1.49 0.0 32 0.0 2.0 0.0 391.0 \n",
"11649 1.5 1.8 1.35 1.00 0.0 1 0.0 0.0 0.0 9.0 \n",
"9109 16.1 16.8 1.02 -0.02 0.0 13 0.0 0.0 0.0 182.0 \n",
"916 30.0 35.1 1.20 0.96 0.0 23 1.0 0.0 0.0 353.0 \n",
"\n",
" Won Lost Won% League Name League ID season \\\n",
"3599 91.0 33.0 73.4 Big-5-European-Leagues Big5 2018/2019 \n",
"6327 128.0 40.0 76.2 Big-5-European-Leagues Big5 2019/2020 \n",
"11649 5.0 1.0 83.3 Big-5-European-Leagues Big5 2021/2022 \n",
"9109 66.0 21.0 75.9 Big-5-European-Leagues Big5 2020/2021 \n",
"916 54.0 19.0 74.0 Big-5-European-Leagues Big5 2017/2018 \n",
"\n",
" Team Name Team Country Player Lower First Name Lower Last Name Lower \\\n",
"3599 Barcelona Spain gerard piqua gerard piqua \n",
"6327 Barcelona Spain gerard piqua gerard piqua \n",
"11649 Barcelona Spain gerard piqua gerard piqua \n",
"9109 Barcelona Spain gerard piqua gerard piqua \n",
"916 Barcelona Spain gerard piqua gerard piqua \n",
"\n",
" First Initial Lower Team Country Lower Nationality Code \\\n",
"3599 g spain ESP \n",
"6327 g spain ESP \n",
"11649 g spain ESP \n",
"9109 g spain ESP \n",
"916 g spain ESP \n",
"\n",
" Nationality Cleaned Primary Pos Position Grouped outfielder_goalkeeper \\\n",
"3599 Spain DF Defender Outfielder \n",
"6327 Spain DF Defender Outfielder \n",
"11649 Spain DF Defender Outfielder \n",
"9109 Spain DF Defender Outfielder \n",
"916 Spain DF Defender Outfielder \n",
"\n",
" GA GA90 SoTA Saves Save% W D L CS CS% PKA PKsv PKm \\\n",
"3599 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN \n",
"6327 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN \n",
"11649 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN \n",
"9109 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN \n",
"916 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN \n",
"\n",
" Save%.1 PSxG PSxG/SoT PSxG+/- /90 Thr Launch% AvgLen Launch%.1 \\\n",
"3599 NaN NaN NaN NaN NaN NaN NaN NaN NaN \n",
"6327 NaN NaN NaN NaN NaN NaN NaN NaN NaN \n",
"11649 NaN NaN NaN NaN NaN NaN NaN NaN NaN \n",
"9109 NaN NaN NaN NaN NaN NaN NaN NaN NaN \n",
"916 NaN NaN NaN NaN NaN NaN NaN NaN NaN \n",
"\n",
" AvgLen.1 Opp Stp Stp% #OPA #OPA/90 AvgDist player_name_lower \\\n",
"3599 NaN NaN NaN NaN NaN NaN NaN gerard piqua \n",
"6327 NaN NaN NaN NaN NaN NaN NaN gerard piqua \n",
"11649 NaN NaN NaN NaN NaN NaN NaN gerard piqua \n",
"9109 NaN NaN NaN NaN NaN NaN NaN gerard piqua \n",
"916 NaN NaN NaN NaN NaN NaN NaN gerard piqua \n",
"\n",
" first_name_lower last_name_lower first_initial_lower country_lower \\\n",
"3599 gerard piqua g spain \n",
"6327 gerard piqua g spain \n",
"11649 gerard piqua g spain \n",
"9109 gerard piqua g spain \n",
"916 gerard piqua g spain \n",
"\n",
" player_name_fbref url_fbref \\\n",
"3599 Gerard Piqué https://fbref.com/en/players/adfc9123/Gerard-P... \n",
"6327 Gerard Piqué https://fbref.com/en/players/adfc9123/Gerard-P... \n",
"11649 Gerard Piqué https://fbref.com/en/players/adfc9123/Gerard-P... \n",
"9109 Gerard Piqué https://fbref.com/en/players/adfc9123/Gerard-P... \n",
"916 Gerard Piqué https://fbref.com/en/players/adfc9123/Gerard-P... \n",
"\n",
" url_tm TmPos tm_id \\\n",
"3599 https://www.transfermarkt.com/gerard-pique/pro... Centre-Back 18944 \n",
"6327 https://www.transfermarkt.com/gerard-pique/pro... Centre-Back 18944 \n",
"11649 https://www.transfermarkt.com/gerard-pique/pro... Centre-Back 18944 \n",
"9109 https://www.transfermarkt.com/gerard-pique/pro... Centre-Back 18944 \n",
"916 https://www.transfermarkt.com/gerard-pique/pro... Centre-Back 18944 \n",
"\n",
" fbref_id \n",
"3599 adfc9123 \n",
"6327 adfc9123 \n",
"11649 adfc9123 \n",
"9109 adfc9123 \n",
"916 adfc9123 "
]
},
"execution_count": 80,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"df_fbref_merge[df_fbref_merge['player_name_fbref'].str.contains('Gerard Piqu', na=False)]"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"\n",
"\n",
"#### 5.3.2. Join the three TransferMarkt Datasets\n",
"- Bio-Status\n",
"- Historical Player Valuations\n",
"- Recorded Transfers"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"##### Join the Bio-Status to the Historical Player Valuation datasets"
]
},
{
"cell_type": "code",
"execution_count": 81,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" tm_id | \n",
" season | \n",
" player_name | \n",
" club | \n",
" current_club | \n",
" league_code | \n",
" current_age | \n",
" market_value_gbp | \n",
" market_value_eur | \n",
" dob | \n",
" pob | \n",
" birth_year | \n",
" position | \n",
" position_code | \n",
" position_grouped | \n",
" outfielder_goalkeeper | \n",
" height | \n",
" foot | \n",
" citizenship | \n",
" second_citizenship | \n",
" player_agent | \n",
" player_name_lower | \n",
" first_name_lower | \n",
" last_name_lower | \n",
" first_initial_lower | \n",
" country_lower | \n",
" birth_day | \n",
" birth_month | \n",
" cob | \n",
" current_club_country | \n",
" market_value_euros | \n",
" joined | \n",
" contract_expires | \n",
" contract_option | \n",
" on_loan_from | \n",
" on_loan_from_country | \n",
" loan_contract_expiry | \n",
" name_lower | \n",
" firstname_lower | \n",
" lastname_lower | \n",
" firstinitial_lower | \n",
" league_country_lower | \n",
" age | \n",
" age_when_joining | \n",
" years_since_joining | \n",
" years_until_contract_expiry | \n",
" market_value_pounds | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" 26 | \n",
" 2017/2018 | \n",
" roman weidenfeller | \n",
" Borussia Dortmund | \n",
" retired | \n",
" L1 | \n",
" 41.0 | \n",
" 675000.0 | \n",
" 750000 | \n",
" 1980-08-06 | \n",
" Diez | \n",
" 1980.0 | \n",
" Goalkeeper | \n",
" GK | \n",
" Goalkeeper | \n",
" Goalkeeper | \n",
" 188.0 | \n",
" left | \n",
" Germany | \n",
" NaN | \n",
" Jörg Neubauer | \n",
" roman weidenfeller | \n",
" roman | \n",
" weidenfeller | \n",
" r | \n",
" germany | \n",
" 6.0 | \n",
" 8.0 | \n",
" Germany | \n",
" NaN | \n",
" 0.0 | \n",
" 2018-07-01 | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" roman weidenfeller | \n",
" roman | \n",
" weidenfeller | \n",
" r | \n",
" NaN | \n",
" 41.0 | \n",
" 37.0 | \n",
" 3.0 | \n",
" NaN | \n",
" 0.0 | \n",
"
\n",
" \n",
" 1 | \n",
" 26 | \n",
" 2018/2019 | \n",
" roman weidenfeller | \n",
" Borussia Dortmund | \n",
" retired | \n",
" L1 | \n",
" 41.0 | \n",
" 0.0 | \n",
" 0 | \n",
" 1980-08-06 | \n",
" Diez | \n",
" 1980.0 | \n",
" Goalkeeper | \n",
" GK | \n",
" Goalkeeper | \n",
" Goalkeeper | \n",
" 188.0 | \n",
" left | \n",
" Germany | \n",
" NaN | \n",
" Jörg Neubauer | \n",
" roman weidenfeller | \n",
" roman | \n",
" weidenfeller | \n",
" r | \n",
" germany | \n",
" 6.0 | \n",
" 8.0 | \n",
" Germany | \n",
" NaN | \n",
" 0.0 | \n",
" 2018-07-01 | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" roman weidenfeller | \n",
" roman | \n",
" weidenfeller | \n",
" r | \n",
" NaN | \n",
" 41.0 | \n",
" 37.0 | \n",
" 3.0 | \n",
" NaN | \n",
" 0.0 | \n",
"
\n",
" \n",
" 2 | \n",
" 80 | \n",
" 2017/2018 | \n",
" tom starke | \n",
" Bayern Munich | \n",
" retired | \n",
" L1 | \n",
" 40.0 | \n",
" 90000.0 | \n",
" 100000 | \n",
" 1981-03-18 | \n",
" Freital | \n",
" 1981.0 | \n",
" Goalkeeper | \n",
" GK | \n",
" Goalkeeper | \n",
" Goalkeeper | \n",
" 194.0 | \n",
" right | \n",
" Germany | \n",
" NaN | \n",
" IFM | \n",
" tom starke | \n",
" tom | \n",
" starke | \n",
" t | \n",
" germany | \n",
" 18.0 | \n",
" 3.0 | \n",
" DDR | \n",
" NaN | \n",
" 0.0 | \n",
" 2018-07-01 | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" tom starke | \n",
" tom | \n",
" starke | \n",
" t | \n",
" NaN | \n",
" 40.0 | \n",
" 37.0 | \n",
" 3.0 | \n",
" NaN | \n",
" 0.0 | \n",
"
\n",
" \n",
" 3 | \n",
" 80 | \n",
" 2018/2019 | \n",
" tom starke | \n",
" Bayern Munich | \n",
" retired | \n",
" L1 | \n",
" 40.0 | \n",
" 90000.0 | \n",
" 100000 | \n",
" 1981-03-18 | \n",
" Freital | \n",
" 1981.0 | \n",
" Goalkeeper | \n",
" GK | \n",
" Goalkeeper | \n",
" Goalkeeper | \n",
" 194.0 | \n",
" right | \n",
" Germany | \n",
" NaN | \n",
" IFM | \n",
" tom starke | \n",
" tom | \n",
" starke | \n",
" t | \n",
" germany | \n",
" 18.0 | \n",
" 3.0 | \n",
" DDR | \n",
" NaN | \n",
" 0.0 | \n",
" 2018-07-01 | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" tom starke | \n",
" tom | \n",
" starke | \n",
" t | \n",
" NaN | \n",
" 40.0 | \n",
" 37.0 | \n",
" 3.0 | \n",
" NaN | \n",
" 0.0 | \n",
"
\n",
" \n",
" 4 | \n",
" 488 | \n",
" 2017/2018 | \n",
" gerhard tremmel | \n",
" Swansea City | \n",
" retired | \n",
" GB1 | \n",
" 42.0 | \n",
" 225000.0 | \n",
" 250000 | \n",
" 1978-11-16 | \n",
" München | \n",
" 1978.0 | \n",
" Goalkeeper | \n",
" GK | \n",
" Goalkeeper | \n",
" Goalkeeper | \n",
" NaN | \n",
" NaN | \n",
" Germany | \n",
" NaN | \n",
" NaN | \n",
" gerhard tremmel | \n",
" gerhard | \n",
" tremmel | \n",
" g | \n",
" germany | \n",
" 16.0 | \n",
" 11.0 | \n",
" Germany | \n",
" NaN | \n",
" 0.0 | \n",
" 2017-07-17 | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" gerhard tremmel | \n",
" gerhard | \n",
" tremmel | \n",
" g | \n",
" NaN | \n",
" 42.0 | \n",
" 38.0 | \n",
" 4.0 | \n",
" NaN | \n",
" 0.0 | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" tm_id season player_name club current_club \\\n",
"0 26 2017/2018 roman weidenfeller Borussia Dortmund retired \n",
"1 26 2018/2019 roman weidenfeller Borussia Dortmund retired \n",
"2 80 2017/2018 tom starke Bayern Munich retired \n",
"3 80 2018/2019 tom starke Bayern Munich retired \n",
"4 488 2017/2018 gerhard tremmel Swansea City retired \n",
"\n",
" league_code current_age market_value_gbp market_value_eur dob \\\n",
"0 L1 41.0 675000.0 750000 1980-08-06 \n",
"1 L1 41.0 0.0 0 1980-08-06 \n",
"2 L1 40.0 90000.0 100000 1981-03-18 \n",
"3 L1 40.0 90000.0 100000 1981-03-18 \n",
"4 GB1 42.0 225000.0 250000 1978-11-16 \n",
"\n",
" pob birth_year position position_code position_grouped \\\n",
"0 Diez 1980.0 Goalkeeper GK Goalkeeper \n",
"1 Diez 1980.0 Goalkeeper GK Goalkeeper \n",
"2 Freital 1981.0 Goalkeeper GK Goalkeeper \n",
"3 Freital 1981.0 Goalkeeper GK Goalkeeper \n",
"4 München 1978.0 Goalkeeper GK Goalkeeper \n",
"\n",
" outfielder_goalkeeper height foot citizenship second_citizenship \\\n",
"0 Goalkeeper 188.0 left Germany NaN \n",
"1 Goalkeeper 188.0 left Germany NaN \n",
"2 Goalkeeper 194.0 right Germany NaN \n",
"3 Goalkeeper 194.0 right Germany NaN \n",
"4 Goalkeeper NaN NaN Germany NaN \n",
"\n",
" player_agent player_name_lower first_name_lower last_name_lower \\\n",
"0 Jörg Neubauer roman weidenfeller roman weidenfeller \n",
"1 Jörg Neubauer roman weidenfeller roman weidenfeller \n",
"2 IFM tom starke tom starke \n",
"3 IFM tom starke tom starke \n",
"4 NaN gerhard tremmel gerhard tremmel \n",
"\n",
" first_initial_lower country_lower birth_day birth_month cob \\\n",
"0 r germany 6.0 8.0 Germany \n",
"1 r germany 6.0 8.0 Germany \n",
"2 t germany 18.0 3.0 DDR \n",
"3 t germany 18.0 3.0 DDR \n",
"4 g germany 16.0 11.0 Germany \n",
"\n",
" current_club_country market_value_euros joined contract_expires \\\n",
"0 NaN 0.0 2018-07-01 NaN \n",
"1 NaN 0.0 2018-07-01 NaN \n",
"2 NaN 0.0 2018-07-01 NaN \n",
"3 NaN 0.0 2018-07-01 NaN \n",
"4 NaN 0.0 2017-07-17 NaN \n",
"\n",
" contract_option on_loan_from on_loan_from_country loan_contract_expiry \\\n",
"0 NaN NaN NaN NaN \n",
"1 NaN NaN NaN NaN \n",
"2 NaN NaN NaN NaN \n",
"3 NaN NaN NaN NaN \n",
"4 NaN NaN NaN NaN \n",
"\n",
" name_lower firstname_lower lastname_lower firstinitial_lower \\\n",
"0 roman weidenfeller roman weidenfeller r \n",
"1 roman weidenfeller roman weidenfeller r \n",
"2 tom starke tom starke t \n",
"3 tom starke tom starke t \n",
"4 gerhard tremmel gerhard tremmel g \n",
"\n",
" league_country_lower age age_when_joining years_since_joining \\\n",
"0 NaN 41.0 37.0 3.0 \n",
"1 NaN 41.0 37.0 3.0 \n",
"2 NaN 40.0 37.0 3.0 \n",
"3 NaN 40.0 37.0 3.0 \n",
"4 NaN 42.0 38.0 4.0 \n",
"\n",
" years_until_contract_expiry market_value_pounds \n",
"0 NaN 0.0 \n",
"1 NaN 0.0 \n",
"2 NaN 0.0 \n",
"3 NaN 0.0 \n",
"4 NaN 0.0 "
]
},
"execution_count": 81,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# Join the Bio-Status dataset to the Historical Player Valuation dataset\n",
"\n",
"## Join the TransferMarkt Bio-Status and Player Valuation DataFrames\n",
"df_tm_merge = pd.merge(df_tm_valuations, df_tm_bio_status, left_on='player_name', right_on='player_name', how='left')\n",
"\n",
"\n",
"## Rename columns - required otherwise 'birth_year' gets dropped\n",
"df_tm_merge = df_tm_merge.rename(columns={'birth_year_x': 'born'})\n",
"\n",
"\n",
"## Remove duplicates\n",
"\n",
"### Remove duplicate columns after join (contain '_y') and remove '_x' suffix from kept columns\n",
"df_tm_merge = df_tm_merge[df_tm_merge.columns.drop(list(df_tm_merge.filter(regex='_y')))]\n",
"df_tm_merge.columns = df_tm_merge.columns.str.replace('_x', '')\n",
"\n",
"### Remove duplicate rows\n",
"df_tm_merge = df_tm_merge.drop_duplicates(subset=['tm_id', 'season', 'player_name'], keep='first')\n",
"\n",
"\n",
"## Rename columns\n",
"df_tm_merge = df_tm_merge.rename(columns={'born': 'birth_year'})\n",
"\n",
"\n",
"## Display DataFrame\n",
"df_tm_merge.head()"
]
},
{
"cell_type": "code",
"execution_count": 82,
"metadata": {
"scrolled": true
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"No. rows in TM Player Valuation DataFrame before join to TransferMarkt Bio-Status data: 30241\n",
"No. rows in DataFrame AFTER join: 30241\n",
"\n",
"Variance in rows before and after join: 0\n",
"\n",
"----------\n"
]
}
],
"source": [
"print('No. rows in TM Player Valuation DataFrame before join to TransferMarkt Bio-Status data: {}'.format(len(df_tm_valuations)))\n",
"print('No. rows in DataFrame AFTER join: {}\\n'.format(len(df_tm_merge)))\n",
"print('Variance in rows before and after join: {}\\n'.format(len(df_tm_merge) - len(df_tm_valuations)))\n",
"print('-'*10)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"##### Join the Recorded Transfer dataset"
]
},
{
"cell_type": "code",
"execution_count": 83,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" tm_id | \n",
" season | \n",
" player_name | \n",
" club | \n",
" current_club | \n",
" league_code | \n",
" current_age | \n",
" market_value_gbp | \n",
" market_value_eur | \n",
" dob | \n",
" pob | \n",
" birth_year | \n",
" position | \n",
" position_code | \n",
" position_grouped | \n",
" outfielder_goalkeeper | \n",
" height | \n",
" foot | \n",
" citizenship | \n",
" second_citizenship | \n",
" player_agent | \n",
" player_name_lower | \n",
" first_name_lower | \n",
" last_name_lower | \n",
" first_initial_lower | \n",
" country_lower | \n",
" birth_day | \n",
" birth_month | \n",
" cob | \n",
" current_club_country | \n",
" market_value_euros | \n",
" joined | \n",
" contract_expires | \n",
" contract_option | \n",
" on_loan_from | \n",
" on_loan_from_country | \n",
" loan_contract_expiry | \n",
" name_lower | \n",
" firstname_lower | \n",
" lastname_lower | \n",
" firstinitial_lower | \n",
" league_country_lower | \n",
" age | \n",
" age_when_joining | \n",
" years_since_joining | \n",
" years_until_contract_expiry | \n",
" market_value_pounds | \n",
" club_name | \n",
" club_involved_name | \n",
" fee | \n",
" transfer_movement | \n",
" transfer_period | \n",
" fee_cleaned | \n",
" league_name | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" 26 | \n",
" 2017/2018 | \n",
" roman weidenfeller | \n",
" Borussia Dortmund | \n",
" retired | \n",
" L1 | \n",
" 41.0 | \n",
" 675000.0 | \n",
" 750000 | \n",
" 1980-08-06 | \n",
" Diez | \n",
" 1980.0 | \n",
" Goalkeeper | \n",
" GK | \n",
" Goalkeeper | \n",
" Goalkeeper | \n",
" 188.0 | \n",
" left | \n",
" Germany | \n",
" NaN | \n",
" Jörg Neubauer | \n",
" roman weidenfeller | \n",
" roman | \n",
" weidenfeller | \n",
" r | \n",
" germany | \n",
" 6.0 | \n",
" 8.0 | \n",
" Germany | \n",
" NaN | \n",
" 0.0 | \n",
" 2018-07-01 | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" roman weidenfeller | \n",
" roman | \n",
" weidenfeller | \n",
" r | \n",
" NaN | \n",
" 41.0 | \n",
" 37.0 | \n",
" 3.0 | \n",
" NaN | \n",
" 0.0 | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
"
\n",
" \n",
" 1 | \n",
" 26 | \n",
" 2018/2019 | \n",
" roman weidenfeller | \n",
" Borussia Dortmund | \n",
" retired | \n",
" L1 | \n",
" 41.0 | \n",
" 0.0 | \n",
" 0 | \n",
" 1980-08-06 | \n",
" Diez | \n",
" 1980.0 | \n",
" Goalkeeper | \n",
" GK | \n",
" Goalkeeper | \n",
" Goalkeeper | \n",
" 188.0 | \n",
" left | \n",
" Germany | \n",
" NaN | \n",
" Jörg Neubauer | \n",
" roman weidenfeller | \n",
" roman | \n",
" weidenfeller | \n",
" r | \n",
" germany | \n",
" 6.0 | \n",
" 8.0 | \n",
" Germany | \n",
" NaN | \n",
" 0.0 | \n",
" 2018-07-01 | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" roman weidenfeller | \n",
" roman | \n",
" weidenfeller | \n",
" r | \n",
" NaN | \n",
" 41.0 | \n",
" 37.0 | \n",
" 3.0 | \n",
" NaN | \n",
" 0.0 | \n",
" Borussia Dortmund | \n",
" Retired | \n",
" - | \n",
" out | \n",
" Summer | \n",
" 0.0 | \n",
" 1 Bundesliga | \n",
"
\n",
" \n",
" 2 | \n",
" 80 | \n",
" 2017/2018 | \n",
" tom starke | \n",
" Bayern Munich | \n",
" retired | \n",
" L1 | \n",
" 40.0 | \n",
" 90000.0 | \n",
" 100000 | \n",
" 1981-03-18 | \n",
" Freital | \n",
" 1981.0 | \n",
" Goalkeeper | \n",
" GK | \n",
" Goalkeeper | \n",
" Goalkeeper | \n",
" 194.0 | \n",
" right | \n",
" Germany | \n",
" NaN | \n",
" IFM | \n",
" tom starke | \n",
" tom | \n",
" starke | \n",
" t | \n",
" germany | \n",
" 18.0 | \n",
" 3.0 | \n",
" DDR | \n",
" NaN | \n",
" 0.0 | \n",
" 2018-07-01 | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" tom starke | \n",
" tom | \n",
" starke | \n",
" t | \n",
" NaN | \n",
" 40.0 | \n",
" 37.0 | \n",
" 3.0 | \n",
" NaN | \n",
" 0.0 | \n",
" Bayern Munich | \n",
" Career break | \n",
" - | \n",
" in | \n",
" Summer | \n",
" 0.0 | \n",
" 1 Bundesliga | \n",
"
\n",
" \n",
" 4 | \n",
" 80 | \n",
" 2018/2019 | \n",
" tom starke | \n",
" Bayern Munich | \n",
" retired | \n",
" L1 | \n",
" 40.0 | \n",
" 90000.0 | \n",
" 100000 | \n",
" 1981-03-18 | \n",
" Freital | \n",
" 1981.0 | \n",
" Goalkeeper | \n",
" GK | \n",
" Goalkeeper | \n",
" Goalkeeper | \n",
" 194.0 | \n",
" right | \n",
" Germany | \n",
" NaN | \n",
" IFM | \n",
" tom starke | \n",
" tom | \n",
" starke | \n",
" t | \n",
" germany | \n",
" 18.0 | \n",
" 3.0 | \n",
" DDR | \n",
" NaN | \n",
" 0.0 | \n",
" 2018-07-01 | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" tom starke | \n",
" tom | \n",
" starke | \n",
" t | \n",
" NaN | \n",
" 40.0 | \n",
" 37.0 | \n",
" 3.0 | \n",
" NaN | \n",
" 0.0 | \n",
" Bayern Munich | \n",
" Retired | \n",
" - | \n",
" out | \n",
" Summer | \n",
" 0.0 | \n",
" 1 Bundesliga | \n",
"
\n",
" \n",
" 5 | \n",
" 488 | \n",
" 2017/2018 | \n",
" gerhard tremmel | \n",
" Swansea City | \n",
" retired | \n",
" GB1 | \n",
" 42.0 | \n",
" 225000.0 | \n",
" 250000 | \n",
" 1978-11-16 | \n",
" München | \n",
" 1978.0 | \n",
" Goalkeeper | \n",
" GK | \n",
" Goalkeeper | \n",
" Goalkeeper | \n",
" NaN | \n",
" NaN | \n",
" Germany | \n",
" NaN | \n",
" NaN | \n",
" gerhard tremmel | \n",
" gerhard | \n",
" tremmel | \n",
" g | \n",
" germany | \n",
" 16.0 | \n",
" 11.0 | \n",
" Germany | \n",
" NaN | \n",
" 0.0 | \n",
" 2017-07-17 | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" gerhard tremmel | \n",
" gerhard | \n",
" tremmel | \n",
" g | \n",
" NaN | \n",
" 42.0 | \n",
" 38.0 | \n",
" 4.0 | \n",
" NaN | \n",
" 0.0 | \n",
" Swansea City | \n",
" Retired | \n",
" - | \n",
" out | \n",
" Summer | \n",
" 0.0 | \n",
" Premier League | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" tm_id season player_name club current_club \\\n",
"0 26 2017/2018 roman weidenfeller Borussia Dortmund retired \n",
"1 26 2018/2019 roman weidenfeller Borussia Dortmund retired \n",
"2 80 2017/2018 tom starke Bayern Munich retired \n",
"4 80 2018/2019 tom starke Bayern Munich retired \n",
"5 488 2017/2018 gerhard tremmel Swansea City retired \n",
"\n",
" league_code current_age market_value_gbp market_value_eur dob \\\n",
"0 L1 41.0 675000.0 750000 1980-08-06 \n",
"1 L1 41.0 0.0 0 1980-08-06 \n",
"2 L1 40.0 90000.0 100000 1981-03-18 \n",
"4 L1 40.0 90000.0 100000 1981-03-18 \n",
"5 GB1 42.0 225000.0 250000 1978-11-16 \n",
"\n",
" pob birth_year position position_code position_grouped \\\n",
"0 Diez 1980.0 Goalkeeper GK Goalkeeper \n",
"1 Diez 1980.0 Goalkeeper GK Goalkeeper \n",
"2 Freital 1981.0 Goalkeeper GK Goalkeeper \n",
"4 Freital 1981.0 Goalkeeper GK Goalkeeper \n",
"5 München 1978.0 Goalkeeper GK Goalkeeper \n",
"\n",
" outfielder_goalkeeper height foot citizenship second_citizenship \\\n",
"0 Goalkeeper 188.0 left Germany NaN \n",
"1 Goalkeeper 188.0 left Germany NaN \n",
"2 Goalkeeper 194.0 right Germany NaN \n",
"4 Goalkeeper 194.0 right Germany NaN \n",
"5 Goalkeeper NaN NaN Germany NaN \n",
"\n",
" player_agent player_name_lower first_name_lower last_name_lower \\\n",
"0 Jörg Neubauer roman weidenfeller roman weidenfeller \n",
"1 Jörg Neubauer roman weidenfeller roman weidenfeller \n",
"2 IFM tom starke tom starke \n",
"4 IFM tom starke tom starke \n",
"5 NaN gerhard tremmel gerhard tremmel \n",
"\n",
" first_initial_lower country_lower birth_day birth_month cob \\\n",
"0 r germany 6.0 8.0 Germany \n",
"1 r germany 6.0 8.0 Germany \n",
"2 t germany 18.0 3.0 DDR \n",
"4 t germany 18.0 3.0 DDR \n",
"5 g germany 16.0 11.0 Germany \n",
"\n",
" current_club_country market_value_euros joined contract_expires \\\n",
"0 NaN 0.0 2018-07-01 NaN \n",
"1 NaN 0.0 2018-07-01 NaN \n",
"2 NaN 0.0 2018-07-01 NaN \n",
"4 NaN 0.0 2018-07-01 NaN \n",
"5 NaN 0.0 2017-07-17 NaN \n",
"\n",
" contract_option on_loan_from on_loan_from_country loan_contract_expiry \\\n",
"0 NaN NaN NaN NaN \n",
"1 NaN NaN NaN NaN \n",
"2 NaN NaN NaN NaN \n",
"4 NaN NaN NaN NaN \n",
"5 NaN NaN NaN NaN \n",
"\n",
" name_lower firstname_lower lastname_lower firstinitial_lower \\\n",
"0 roman weidenfeller roman weidenfeller r \n",
"1 roman weidenfeller roman weidenfeller r \n",
"2 tom starke tom starke t \n",
"4 tom starke tom starke t \n",
"5 gerhard tremmel gerhard tremmel g \n",
"\n",
" league_country_lower age age_when_joining years_since_joining \\\n",
"0 NaN 41.0 37.0 3.0 \n",
"1 NaN 41.0 37.0 3.0 \n",
"2 NaN 40.0 37.0 3.0 \n",
"4 NaN 40.0 37.0 3.0 \n",
"5 NaN 42.0 38.0 4.0 \n",
"\n",
" years_until_contract_expiry market_value_pounds club_name \\\n",
"0 NaN 0.0 NaN \n",
"1 NaN 0.0 Borussia Dortmund \n",
"2 NaN 0.0 Bayern Munich \n",
"4 NaN 0.0 Bayern Munich \n",
"5 NaN 0.0 Swansea City \n",
"\n",
" club_involved_name fee transfer_movement transfer_period fee_cleaned \\\n",
"0 NaN NaN NaN NaN NaN \n",
"1 Retired - out Summer 0.0 \n",
"2 Career break - in Summer 0.0 \n",
"4 Retired - out Summer 0.0 \n",
"5 Retired - out Summer 0.0 \n",
"\n",
" league_name \n",
"0 NaN \n",
"1 1 Bundesliga \n",
"2 1 Bundesliga \n",
"4 1 Bundesliga \n",
"5 Premier League "
]
},
"execution_count": 83,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# Join Player Transfer dataset to Bio-Status-Valuation dataset\n",
"\n",
"## Join the TransferMarkt Bio-Status and Transfer DataFrames\n",
"df_tm_merge_final = pd.merge(df_tm_merge, df_tm_transfers, left_on=['player_name', 'season'], right_on=['player_name_lower', 'season'], how='left')\n",
"\n",
"\n",
"## Rename columns - required otherwise 'birth_year' gets dropped\n",
"df_tm_merge_final = df_tm_merge_final.rename(columns={'birth_year': 'born'})\n",
"\n",
"\n",
"## Remove duplicates\n",
"\n",
"### Remove duplicate columns after join (contain '_y') and remove '_x' suffix from kept columns\n",
"df_tm_merge_final = df_tm_merge_final[df_tm_merge_final.columns.drop(list(df_tm_merge_final.filter(regex='_y')))]\n",
"df_tm_merge_final.columns = df_tm_merge_final.columns.str.replace('_x','')\n",
"\n",
"### Remove duplicate rows\n",
"df_tm_merge_final = df_tm_merge_final.drop_duplicates(subset=['tm_id', 'season', 'player_name'], keep='first')\n",
"\n",
"\n",
"## Drop unnecessary columns\n",
"df_tm_merge_final = df_tm_merge_final.drop(['year'], axis=1)\n",
"\n",
"\n",
"## Rename columns\n",
"df_tm_merge_final = df_tm_merge_final.rename(columns={'born': 'birth_year'})\n",
"\n",
"\n",
"## Display DataFrame\n",
"df_tm_merge_final.head()"
]
},
{
"cell_type": "code",
"execution_count": 84,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"No. rows in merged TM Bio-Status-Valuation DataFrame before join to TM Recorded Transfer data: 30241\n",
"No. rows in DataFrame AFTER join: 30241\n",
"\n",
"Variance in rows before and after join: 0\n",
"\n",
"----------\n"
]
}
],
"source": [
"print('No. rows in merged TM Bio-Status-Valuation DataFrame before join to TM Recorded Transfer data: {}'.format(len(df_tm_merge)))\n",
"print('No. rows in DataFrame AFTER join: {}\\n'.format(len(df_tm_merge_final)))\n",
"print('Variance in rows before and after join: {}\\n'.format(len(df_tm_merge_final) - len(df_tm_merge)))\n",
"print('-'*10)"
]
},
{
"cell_type": "code",
"execution_count": 85,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" tm_id | \n",
" season | \n",
" player_name | \n",
" club | \n",
" current_club | \n",
" league_code | \n",
" current_age | \n",
" market_value_gbp | \n",
" market_value_eur | \n",
" dob | \n",
" pob | \n",
" birth_year | \n",
" position | \n",
" position_code | \n",
" position_grouped | \n",
" outfielder_goalkeeper | \n",
" height | \n",
" foot | \n",
" citizenship | \n",
" second_citizenship | \n",
" player_agent | \n",
" player_name_lower | \n",
" first_name_lower | \n",
" last_name_lower | \n",
" first_initial_lower | \n",
" country_lower | \n",
" birth_day | \n",
" birth_month | \n",
" cob | \n",
" current_club_country | \n",
" market_value_euros | \n",
" joined | \n",
" contract_expires | \n",
" contract_option | \n",
" on_loan_from | \n",
" on_loan_from_country | \n",
" loan_contract_expiry | \n",
" name_lower | \n",
" firstname_lower | \n",
" lastname_lower | \n",
" firstinitial_lower | \n",
" league_country_lower | \n",
" age | \n",
" age_when_joining | \n",
" years_since_joining | \n",
" years_until_contract_expiry | \n",
" market_value_pounds | \n",
" club_name | \n",
" club_involved_name | \n",
" fee | \n",
" transfer_movement | \n",
" transfer_period | \n",
" fee_cleaned | \n",
" league_name | \n",
"
\n",
" \n",
" \n",
" \n",
" 1016 | \n",
" 18944 | \n",
" 2017/2018 | \n",
" gerard piqué | \n",
" FC Barcelona | \n",
" fc barcelona | \n",
" ES1 | \n",
" 34.0 | \n",
" 36000000.0 | \n",
" 40000000 | \n",
" 1987-02-02 | \n",
" Barcelona | \n",
" 1987.0 | \n",
" Defender - Centre-Back | \n",
" CB | \n",
" Defender | \n",
" Outfielder | \n",
" 194.0 | \n",
" right | \n",
" Spain | \n",
" NaN | \n",
" AC Talent | \n",
" gerard pique | \n",
" gerard | \n",
" pique | \n",
" g | \n",
" spain | \n",
" 2.0 | \n",
" 2.0 | \n",
" Spain | \n",
" spain | \n",
" 10000000.0 | \n",
" 2008-07-01 | \n",
" 2024-06-30 | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" gerard pique | \n",
" gerard | \n",
" pique | \n",
" g | \n",
" spain | \n",
" 34.0 | \n",
" 21.0 | \n",
" 13.0 | \n",
" 2.0 | \n",
" 9000000.0 | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
"
\n",
" \n",
" 1017 | \n",
" 18944 | \n",
" 2018/2019 | \n",
" gerard piqué | \n",
" FC Barcelona | \n",
" fc barcelona | \n",
" ES1 | \n",
" 34.0 | \n",
" 36000000.0 | \n",
" 40000000 | \n",
" 1987-02-02 | \n",
" Barcelona | \n",
" 1987.0 | \n",
" Defender - Centre-Back | \n",
" CB | \n",
" Defender | \n",
" Outfielder | \n",
" 194.0 | \n",
" right | \n",
" Spain | \n",
" NaN | \n",
" AC Talent | \n",
" gerard pique | \n",
" gerard | \n",
" pique | \n",
" g | \n",
" spain | \n",
" 2.0 | \n",
" 2.0 | \n",
" Spain | \n",
" spain | \n",
" 10000000.0 | \n",
" 2008-07-01 | \n",
" 2024-06-30 | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" gerard pique | \n",
" gerard | \n",
" pique | \n",
" g | \n",
" spain | \n",
" 34.0 | \n",
" 21.0 | \n",
" 13.0 | \n",
" 2.0 | \n",
" 9000000.0 | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
"
\n",
" \n",
" 1018 | \n",
" 18944 | \n",
" 2019/2020 | \n",
" gerard piqué | \n",
" FC Barcelona | \n",
" fc barcelona | \n",
" ES1 | \n",
" 34.0 | \n",
" 22500000.0 | \n",
" 25000000 | \n",
" 1987-02-02 | \n",
" Barcelona | \n",
" 1987.0 | \n",
" Defender - Centre-Back | \n",
" CB | \n",
" Defender | \n",
" Outfielder | \n",
" 194.0 | \n",
" right | \n",
" Spain | \n",
" NaN | \n",
" AC Talent | \n",
" gerard pique | \n",
" gerard | \n",
" pique | \n",
" g | \n",
" spain | \n",
" 2.0 | \n",
" 2.0 | \n",
" Spain | \n",
" spain | \n",
" 10000000.0 | \n",
" 2008-07-01 | \n",
" 2024-06-30 | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" gerard pique | \n",
" gerard | \n",
" pique | \n",
" g | \n",
" spain | \n",
" 34.0 | \n",
" 21.0 | \n",
" 13.0 | \n",
" 2.0 | \n",
" 9000000.0 | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
"
\n",
" \n",
" 1019 | \n",
" 18944 | \n",
" 2020/2021 | \n",
" gerard piqué | \n",
" FC Barcelona | \n",
" fc barcelona | \n",
" ES1 | \n",
" 34.0 | \n",
" 13500000.0 | \n",
" 15000000 | \n",
" 1987-02-02 | \n",
" Barcelona | \n",
" 1987.0 | \n",
" Defender - Centre-Back | \n",
" CB | \n",
" Defender | \n",
" Outfielder | \n",
" 194.0 | \n",
" right | \n",
" Spain | \n",
" NaN | \n",
" AC Talent | \n",
" gerard pique | \n",
" gerard | \n",
" pique | \n",
" g | \n",
" spain | \n",
" 2.0 | \n",
" 2.0 | \n",
" Spain | \n",
" spain | \n",
" 10000000.0 | \n",
" 2008-07-01 | \n",
" 2024-06-30 | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" gerard pique | \n",
" gerard | \n",
" pique | \n",
" g | \n",
" spain | \n",
" 34.0 | \n",
" 21.0 | \n",
" 13.0 | \n",
" 2.0 | \n",
" 9000000.0 | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
"
\n",
" \n",
" 1020 | \n",
" 18944 | \n",
" 2021/2022 | \n",
" gerard piqué | \n",
" FC Barcelona | \n",
" fc barcelona | \n",
" ES1 | \n",
" 34.0 | \n",
" 9000000.0 | \n",
" 10000000 | \n",
" 1987-02-02 | \n",
" Barcelona | \n",
" 1987.0 | \n",
" Defender - Centre-Back | \n",
" CB | \n",
" Defender | \n",
" Outfielder | \n",
" 194.0 | \n",
" right | \n",
" Spain | \n",
" NaN | \n",
" AC Talent | \n",
" gerard pique | \n",
" gerard | \n",
" pique | \n",
" g | \n",
" spain | \n",
" 2.0 | \n",
" 2.0 | \n",
" Spain | \n",
" spain | \n",
" 10000000.0 | \n",
" 2008-07-01 | \n",
" 2024-06-30 | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" gerard pique | \n",
" gerard | \n",
" pique | \n",
" g | \n",
" spain | \n",
" 34.0 | \n",
" 21.0 | \n",
" 13.0 | \n",
" 2.0 | \n",
" 9000000.0 | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" tm_id season player_name club current_club league_code \\\n",
"1016 18944 2017/2018 gerard piqué FC Barcelona fc barcelona ES1 \n",
"1017 18944 2018/2019 gerard piqué FC Barcelona fc barcelona ES1 \n",
"1018 18944 2019/2020 gerard piqué FC Barcelona fc barcelona ES1 \n",
"1019 18944 2020/2021 gerard piqué FC Barcelona fc barcelona ES1 \n",
"1020 18944 2021/2022 gerard piqué FC Barcelona fc barcelona ES1 \n",
"\n",
" current_age market_value_gbp market_value_eur dob pob \\\n",
"1016 34.0 36000000.0 40000000 1987-02-02 Barcelona \n",
"1017 34.0 36000000.0 40000000 1987-02-02 Barcelona \n",
"1018 34.0 22500000.0 25000000 1987-02-02 Barcelona \n",
"1019 34.0 13500000.0 15000000 1987-02-02 Barcelona \n",
"1020 34.0 9000000.0 10000000 1987-02-02 Barcelona \n",
"\n",
" birth_year position position_code position_grouped \\\n",
"1016 1987.0 Defender - Centre-Back CB Defender \n",
"1017 1987.0 Defender - Centre-Back CB Defender \n",
"1018 1987.0 Defender - Centre-Back CB Defender \n",
"1019 1987.0 Defender - Centre-Back CB Defender \n",
"1020 1987.0 Defender - Centre-Back CB Defender \n",
"\n",
" outfielder_goalkeeper height foot citizenship second_citizenship \\\n",
"1016 Outfielder 194.0 right Spain NaN \n",
"1017 Outfielder 194.0 right Spain NaN \n",
"1018 Outfielder 194.0 right Spain NaN \n",
"1019 Outfielder 194.0 right Spain NaN \n",
"1020 Outfielder 194.0 right Spain NaN \n",
"\n",
" player_agent player_name_lower first_name_lower last_name_lower \\\n",
"1016 AC Talent gerard pique gerard pique \n",
"1017 AC Talent gerard pique gerard pique \n",
"1018 AC Talent gerard pique gerard pique \n",
"1019 AC Talent gerard pique gerard pique \n",
"1020 AC Talent gerard pique gerard pique \n",
"\n",
" first_initial_lower country_lower birth_day birth_month cob \\\n",
"1016 g spain 2.0 2.0 Spain \n",
"1017 g spain 2.0 2.0 Spain \n",
"1018 g spain 2.0 2.0 Spain \n",
"1019 g spain 2.0 2.0 Spain \n",
"1020 g spain 2.0 2.0 Spain \n",
"\n",
" current_club_country market_value_euros joined contract_expires \\\n",
"1016 spain 10000000.0 2008-07-01 2024-06-30 \n",
"1017 spain 10000000.0 2008-07-01 2024-06-30 \n",
"1018 spain 10000000.0 2008-07-01 2024-06-30 \n",
"1019 spain 10000000.0 2008-07-01 2024-06-30 \n",
"1020 spain 10000000.0 2008-07-01 2024-06-30 \n",
"\n",
" contract_option on_loan_from on_loan_from_country loan_contract_expiry \\\n",
"1016 NaN NaN NaN NaN \n",
"1017 NaN NaN NaN NaN \n",
"1018 NaN NaN NaN NaN \n",
"1019 NaN NaN NaN NaN \n",
"1020 NaN NaN NaN NaN \n",
"\n",
" name_lower firstname_lower lastname_lower firstinitial_lower \\\n",
"1016 gerard pique gerard pique g \n",
"1017 gerard pique gerard pique g \n",
"1018 gerard pique gerard pique g \n",
"1019 gerard pique gerard pique g \n",
"1020 gerard pique gerard pique g \n",
"\n",
" league_country_lower age age_when_joining years_since_joining \\\n",
"1016 spain 34.0 21.0 13.0 \n",
"1017 spain 34.0 21.0 13.0 \n",
"1018 spain 34.0 21.0 13.0 \n",
"1019 spain 34.0 21.0 13.0 \n",
"1020 spain 34.0 21.0 13.0 \n",
"\n",
" years_until_contract_expiry market_value_pounds club_name \\\n",
"1016 2.0 9000000.0 NaN \n",
"1017 2.0 9000000.0 NaN \n",
"1018 2.0 9000000.0 NaN \n",
"1019 2.0 9000000.0 NaN \n",
"1020 2.0 9000000.0 NaN \n",
"\n",
" club_involved_name fee transfer_movement transfer_period fee_cleaned \\\n",
"1016 NaN NaN NaN NaN NaN \n",
"1017 NaN NaN NaN NaN NaN \n",
"1018 NaN NaN NaN NaN NaN \n",
"1019 NaN NaN NaN NaN NaN \n",
"1020 NaN NaN NaN NaN NaN \n",
"\n",
" league_name \n",
"1016 NaN \n",
"1017 NaN \n",
"1018 NaN \n",
"1019 NaN \n",
"1020 NaN "
]
},
"execution_count": 85,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"df_tm_merge_final[df_tm_merge_final['player_name'].str.contains('gerard piqu', na=False)]"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"\n",
"\n",
"#### 5.3.3. Join the FBref and TM Datasets\n",
"The first step is to create a indexer object.\n",
"\n",
"The indexing module is used to make pairs of records. These pairs are called candidate links or candidate matches. There are several indexing algorithms available such as blocking and sorted neighborhood indexing. See the following references for background information about indexation\n",
"\n",
"One key concept is that we can use blocking to limit the number of comparisons. For instance, we know that it is very likely that we only want to compare records that have the same last name, first name initial and birth year. We can use this knowledge to setup a block on these columns in both DataFrames:"
]
},
{
"cell_type": "code",
"execution_count": 86,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" Nation | \n",
" Pos | \n",
" Squad | \n",
" Comp | \n",
" Age | \n",
" birth_year | \n",
" MP | \n",
" Starts | \n",
" Min | \n",
" 90s | \n",
" Gls | \n",
" Ast | \n",
" G-PK | \n",
" PK | \n",
" PKatt | \n",
" CrdY | \n",
" CrdR | \n",
" Gls.1 | \n",
" Ast.1 | \n",
" G+A | \n",
" G-PK.1 | \n",
" G+A-PK | \n",
" xG | \n",
" npxG | \n",
" xA | \n",
" npxG+xA | \n",
" xG.1 | \n",
" xA.1 | \n",
" xG+xA | \n",
" npxG.1 | \n",
" npxG+xA.1 | \n",
" Matches | \n",
" Sh | \n",
" SoT | \n",
" SoT% | \n",
" Sh/90 | \n",
" SoT/90 | \n",
" G/Sh | \n",
" G/SoT | \n",
" Dist | \n",
" FK | \n",
" npxG/Sh | \n",
" G-xG | \n",
" np:G-xG | \n",
" Cmp | \n",
" Att | \n",
" Cmp% | \n",
" TotDist | \n",
" PrgDist | \n",
" Cmp.1 | \n",
" Att.1 | \n",
" Cmp%.1 | \n",
" Cmp.2 | \n",
" Att.2 | \n",
" Cmp%.2 | \n",
" Cmp.3 | \n",
" Att.3 | \n",
" Cmp%.3 | \n",
" A-xA | \n",
" KP | \n",
" 1/3 | \n",
" PPA | \n",
" CrsPA | \n",
" Prog | \n",
" Live | \n",
" Dead | \n",
" TB | \n",
" Press | \n",
" Sw | \n",
" Crs | \n",
" CK | \n",
" In | \n",
" Out | \n",
" Str | \n",
" Ground | \n",
" Low | \n",
" High | \n",
" Left | \n",
" Right | \n",
" Head | \n",
" TI | \n",
" Other | \n",
" Off | \n",
" Out.1 | \n",
" Int | \n",
" Blocks | \n",
" SCA | \n",
" SCA90 | \n",
" PassLive | \n",
" PassDead | \n",
" Drib | \n",
" Fld | \n",
" Def | \n",
" GCA | \n",
" GCA90 | \n",
" PassLive.1 | \n",
" PassDead.1 | \n",
" Drib.1 | \n",
" Sh.1 | \n",
" Fld.1 | \n",
" Def.1 | \n",
" Tkl | \n",
" TklW | \n",
" Def 3rd | \n",
" Mid 3rd | \n",
" Att 3rd | \n",
" Tkl.1 | \n",
" Tkl% | \n",
" Past | \n",
" Succ | \n",
" % | \n",
" Def 3rd.1 | \n",
" Mid 3rd.1 | \n",
" Att 3rd.1 | \n",
" ShSv | \n",
" Pass | \n",
" Tkl+Int | \n",
" Clr | \n",
" Err | \n",
" Touches | \n",
" Def Pen | \n",
" Att Pen | \n",
" Succ% | \n",
" #Pl | \n",
" Megs | \n",
" Carries | \n",
" CPA | \n",
" Mis | \n",
" Dis | \n",
" Targ | \n",
" Rec | \n",
" Rec% | \n",
" Prog.1 | \n",
" Mn/MP | \n",
" Min% | \n",
" Mn/Start | \n",
" Compl | \n",
" Subs | \n",
" Mn/Sub | \n",
" unSub | \n",
" PPM | \n",
" onG | \n",
" onGA | \n",
" +/- | \n",
" +/-90 | \n",
" On-Off | \n",
" onxG | \n",
" onxGA | \n",
" xG+/- | \n",
" xG+/-90 | \n",
" On-Off.1 | \n",
" 2CrdY | \n",
" Fls | \n",
" PKwon | \n",
" PKcon | \n",
" OG | \n",
" Recov | \n",
" Won | \n",
" Lost | \n",
" Won% | \n",
" League Name | \n",
" League ID | \n",
" season | \n",
" Team Name | \n",
" Team Country | \n",
" Player Lower | \n",
" First Name Lower | \n",
" Last Name Lower | \n",
" First Initial Lower | \n",
" Team Country Lower | \n",
" Nationality Code | \n",
" Nationality Cleaned | \n",
" Primary Pos | \n",
" Position Grouped | \n",
" outfielder_goalkeeper | \n",
" GA | \n",
" GA90 | \n",
" SoTA | \n",
" Saves | \n",
" Save% | \n",
" W | \n",
" D | \n",
" L | \n",
" CS | \n",
" CS% | \n",
" PKA | \n",
" PKsv | \n",
" PKm | \n",
" Save%.1 | \n",
" PSxG | \n",
" PSxG/SoT | \n",
" PSxG+/- | \n",
" /90 | \n",
" Thr | \n",
" Launch% | \n",
" AvgLen | \n",
" Launch%.1 | \n",
" AvgLen.1 | \n",
" Opp | \n",
" Stp | \n",
" Stp% | \n",
" #OPA | \n",
" #OPA/90 | \n",
" AvgDist | \n",
" player_name_lower | \n",
" first_name_lower | \n",
" last_name_lower | \n",
" first_initial_lower | \n",
" country_lower | \n",
" player_name_fbref | \n",
" url_fbref | \n",
" url_tm | \n",
" TmPos | \n",
" tm_id | \n",
" fbref_id | \n",
"
\n",
" \n",
" \n",
" \n",
" 5430 | \n",
" ie IRL | \n",
" FW | \n",
" Brighton | \n",
" Premier League | \n",
" 19 | \n",
" 2000.0 | \n",
" 24 | \n",
" 14 | \n",
" 1258.0 | \n",
" 14.0 | \n",
" 3 | \n",
" 1 | \n",
" 3 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0.21 | \n",
" 0.07 | \n",
" 0.29 | \n",
" 0.21 | \n",
" 0.29 | \n",
" 3.2 | \n",
" 3.2 | \n",
" 0.3 | \n",
" 3.5 | \n",
" 0.23 | \n",
" 0.02 | \n",
" 0.25 | \n",
" 0.23 | \n",
" 0.25 | \n",
" Matches | \n",
" 38.0 | \n",
" 13.0 | \n",
" 34.2 | \n",
" 2.72 | \n",
" 0.93 | \n",
" 0.08 | \n",
" 0.23 | \n",
" 15.9 | \n",
" 0.0 | \n",
" 0.08 | \n",
" -0.2 | \n",
" -0.2 | \n",
" 126.0 | \n",
" 163.0 | \n",
" 77.3 | \n",
" 1739.0 | \n",
" 242.0 | \n",
" 76.0 | \n",
" 92.0 | \n",
" 82.6 | \n",
" 31.0 | \n",
" 39.0 | \n",
" 79.5 | \n",
" 7.0 | \n",
" 11.0 | \n",
" 63.6 | \n",
" 0.7 | \n",
" 6.0 | \n",
" 6.0 | \n",
" 2.0 | \n",
" 0.0 | \n",
" 10.0 | \n",
" 148.0 | \n",
" 15.0 | \n",
" 1.0 | \n",
" 50.0 | \n",
" 0.0 | \n",
" 7.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 90.0 | \n",
" 52.0 | \n",
" 21.0 | \n",
" 27.0 | \n",
" 107.0 | \n",
" 13.0 | \n",
" 1.0 | \n",
" 6.0 | \n",
" 0.0 | \n",
" 1.0 | \n",
" 4.0 | \n",
" 10.0 | \n",
" 25.0 | \n",
" 1.79 | \n",
" 7.0 | \n",
" 0.0 | \n",
" 3.0 | \n",
" 9.0 | \n",
" 3.0 | \n",
" 5.0 | \n",
" 0.36 | \n",
" 1.0 | \n",
" 0.0 | \n",
" 1.0 | \n",
" 1.0 | \n",
" 2.0 | \n",
" 0.0 | \n",
" 12.0 | \n",
" 8.0 | \n",
" 1.0 | \n",
" 5.0 | \n",
" 6.0 | \n",
" 3.0 | \n",
" 25.0 | \n",
" 9.0 | \n",
" 69.0 | \n",
" 29.5 | \n",
" 14.0 | \n",
" 94.0 | \n",
" 126.0 | \n",
" 0.0 | \n",
" 7.0 | \n",
" 17.0 | \n",
" 1.0 | \n",
" 0.0 | \n",
" 349.0 | \n",
" 2.0 | \n",
" 61.0 | \n",
" 37.5 | \n",
" 6.0 | \n",
" 1.0 | \n",
" 228.0 | \n",
" 12.0 | \n",
" 42.0 | \n",
" 34.0 | \n",
" 535.0 | \n",
" 235.0 | \n",
" 43.9 | \n",
" 99.0 | \n",
" 52 | \n",
" 36.8 | \n",
" 72.0 | \n",
" 0.0 | \n",
" 10 | \n",
" 26.0 | \n",
" 4 | \n",
" 1.13 | \n",
" 18.0 | \n",
" 22.0 | \n",
" -4.0 | \n",
" -0.29 | \n",
" 0.17 | \n",
" 15.6 | \n",
" 19.8 | \n",
" -4.2 | \n",
" -0.30 | \n",
" 0.08 | \n",
" 0.0 | \n",
" 16 | \n",
" 2.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 54.0 | \n",
" 14.0 | \n",
" 48.0 | \n",
" 22.6 | \n",
" Big-5-European-Leagues | \n",
" Big5 | \n",
" 2019/2020 | \n",
" Brighton | \n",
" England | \n",
" aaron connolly | \n",
" aaron | \n",
" connolly | \n",
" a | \n",
" england | \n",
" IRL | \n",
" Ireland | \n",
" FW | \n",
" Forward | \n",
" Outfielder | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" aaron connolly | \n",
" aaron | \n",
" connolly | \n",
" a | \n",
" ireland | \n",
" Aaron Connolly | \n",
" https://fbref.com/en/players/27c01749/Aaron-Co... | \n",
" https://www.transfermarkt.com/aaron-connolly/p... | \n",
" Centre-Forward | \n",
" 434207 | \n",
" 27c01749 | \n",
"
\n",
" \n",
" 8211 | \n",
" ie IRL | \n",
" FW | \n",
" Brighton | \n",
" Premier League | \n",
" 20 | \n",
" 2000.0 | \n",
" 17 | \n",
" 9 | \n",
" 791.0 | \n",
" 8.8 | \n",
" 2 | \n",
" 1 | \n",
" 2 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0.23 | \n",
" 0.11 | \n",
" 0.34 | \n",
" 0.23 | \n",
" 0.34 | \n",
" 3.5 | \n",
" 3.5 | \n",
" 0.2 | \n",
" 3.7 | \n",
" 0.40 | \n",
" 0.02 | \n",
" 0.42 | \n",
" 0.40 | \n",
" 0.42 | \n",
" Matches | \n",
" 23.0 | \n",
" 8.0 | \n",
" 34.8 | \n",
" 2.62 | \n",
" 0.91 | \n",
" 0.09 | \n",
" 0.25 | \n",
" 13.7 | \n",
" 0.0 | \n",
" 0.15 | \n",
" -1.5 | \n",
" -1.5 | \n",
" 79.0 | \n",
" 101.0 | \n",
" 78.2 | \n",
" 1147.0 | \n",
" 165.0 | \n",
" 45.0 | \n",
" 56.0 | \n",
" 80.4 | \n",
" 26.0 | \n",
" 30.0 | \n",
" 86.7 | \n",
" 4.0 | \n",
" 5.0 | \n",
" 80.0 | \n",
" 0.8 | \n",
" 5.0 | \n",
" 2.0 | \n",
" 1.0 | \n",
" 0.0 | \n",
" 3.0 | \n",
" 91.0 | \n",
" 10.0 | \n",
" 0.0 | \n",
" 22.0 | \n",
" 1.0 | \n",
" 2.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 64.0 | \n",
" 26.0 | \n",
" 11.0 | \n",
" 11.0 | \n",
" 74.0 | \n",
" 5.0 | \n",
" 0.0 | \n",
" 3.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 2.0 | \n",
" 4.0 | \n",
" 12.0 | \n",
" 1.37 | \n",
" 7.0 | \n",
" 0.0 | \n",
" 3.0 | \n",
" 2.0 | \n",
" 0.0 | \n",
" 1.0 | \n",
" 0.11 | \n",
" 1.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 7.0 | \n",
" 5.0 | \n",
" 2.0 | \n",
" 4.0 | \n",
" 1.0 | \n",
" 1.0 | \n",
" 20.0 | \n",
" 4.0 | \n",
" 40.0 | \n",
" 32.3 | \n",
" 7.0 | \n",
" 58.0 | \n",
" 59.0 | \n",
" 0.0 | \n",
" 8.0 | \n",
" 7.0 | \n",
" 1.0 | \n",
" 0.0 | \n",
" 201.0 | \n",
" 1.0 | \n",
" 38.0 | \n",
" 80.0 | \n",
" 8.0 | \n",
" 0.0 | \n",
" 124.0 | \n",
" 4.0 | \n",
" 29.0 | \n",
" 15.0 | \n",
" 357.0 | \n",
" 143.0 | \n",
" 40.1 | \n",
" 64.0 | \n",
" 47 | \n",
" 23.1 | \n",
" 68.0 | \n",
" NaN | \n",
" 8 | \n",
" 23.0 | \n",
" 11 | \n",
" 0.88 | \n",
" 12.0 | \n",
" 17.0 | \n",
" -5.0 | \n",
" -0.57 | \n",
" -0.53 | \n",
" 13.8 | \n",
" 7.8 | \n",
" 6.0 | \n",
" 0.69 | \n",
" 0.42 | \n",
" 0.0 | \n",
" 5 | \n",
" 1.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 28.0 | \n",
" 11.0 | \n",
" 30.0 | \n",
" 26.8 | \n",
" Big-5-European-Leagues | \n",
" Big5 | \n",
" 2020/2021 | \n",
" Brighton | \n",
" England | \n",
" aaron connolly | \n",
" aaron | \n",
" connolly | \n",
" a | \n",
" england | \n",
" IRL | \n",
" Ireland | \n",
" FW | \n",
" Forward | \n",
" Outfielder | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" aaron connolly | \n",
" aaron | \n",
" connolly | \n",
" a | \n",
" ireland | \n",
" Aaron Connolly | \n",
" https://fbref.com/en/players/27c01749/Aaron-Co... | \n",
" https://www.transfermarkt.com/aaron-connolly/p... | \n",
" Centre-Forward | \n",
" 434207 | \n",
" 27c01749 | \n",
"
\n",
" \n",
" 11071 | \n",
" ie IRL | \n",
" FW | \n",
" Brighton | \n",
" Premier League | \n",
" 21 | \n",
" 2000.0 | \n",
" 1 | \n",
" 0 | \n",
" 45.0 | \n",
" 0.5 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0.00 | \n",
" 0.00 | \n",
" 0.00 | \n",
" 0.00 | \n",
" 0.00 | \n",
" 0.4 | \n",
" 0.4 | \n",
" 0.0 | \n",
" 0.4 | \n",
" 0.85 | \n",
" 0.00 | \n",
" 0.85 | \n",
" 0.85 | \n",
" 0.85 | \n",
" Matches | \n",
" 1.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 2.00 | \n",
" 0.00 | \n",
" 0.00 | \n",
" NaN | \n",
" 9.0 | \n",
" 0.0 | \n",
" 0.42 | \n",
" -0.4 | \n",
" -0.4 | \n",
" 2.0 | \n",
" 3.0 | \n",
" 66.7 | \n",
" 14.0 | \n",
" 0.0 | \n",
" 2.0 | \n",
" 2.0 | \n",
" 100.0 | \n",
" 0.0 | \n",
" 1.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" NaN | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 3.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 1.0 | \n",
" 0.0 | \n",
" 1.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 2.0 | \n",
" 1.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 2.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 1.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 1.0 | \n",
" 2.00 | \n",
" 1.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.00 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" NaN | \n",
" 0.0 | \n",
" 1.0 | \n",
" 8.3 | \n",
" 1.0 | \n",
" 6.0 | \n",
" 5.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 8.0 | \n",
" 0.0 | \n",
" 2.0 | \n",
" NaN | \n",
" 0.0 | \n",
" 0.0 | \n",
" 5.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 1.0 | \n",
" 20.0 | \n",
" 4.0 | \n",
" 20.0 | \n",
" 2.0 | \n",
" 45 | \n",
" 16.7 | \n",
" NaN | \n",
" 0.0 | \n",
" 1 | \n",
" 45.0 | \n",
" 1 | \n",
" 3.00 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.00 | \n",
" -0.40 | \n",
" 1.0 | \n",
" 0.7 | \n",
" 0.3 | \n",
" 0.68 | \n",
" 0.74 | \n",
" 0.0 | \n",
" 0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 3.0 | \n",
" 0.0 | \n",
" 2.0 | \n",
" 0.0 | \n",
" Big-5-European-Leagues | \n",
" Big5 | \n",
" 2021/2022 | \n",
" Brighton | \n",
" England | \n",
" aaron connolly | \n",
" aaron | \n",
" connolly | \n",
" a | \n",
" england | \n",
" IRL | \n",
" Ireland | \n",
" FW | \n",
" Forward | \n",
" Outfielder | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" aaron connolly | \n",
" aaron | \n",
" connolly | \n",
" a | \n",
" ireland | \n",
" Aaron Connolly | \n",
" https://fbref.com/en/players/27c01749/Aaron-Co... | \n",
" https://www.transfermarkt.com/aaron-connolly/p... | \n",
" Centre-Forward | \n",
" 434207 | \n",
" 27c01749 | \n",
"
\n",
" \n",
" 8212 | \n",
" eng ENG | \n",
" DF | \n",
" West Ham | \n",
" Premier League | \n",
" 30 | \n",
" 1989.0 | \n",
" 36 | \n",
" 36 | \n",
" 3170.0 | \n",
" 35.2 | \n",
" 0 | \n",
" 8 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 3 | \n",
" 0 | \n",
" 0.00 | \n",
" 0.23 | \n",
" 0.23 | \n",
" 0.00 | \n",
" 0.23 | \n",
" 0.9 | \n",
" 0.9 | \n",
" 5.9 | \n",
" 6.9 | \n",
" 0.03 | \n",
" 0.17 | \n",
" 0.19 | \n",
" 0.03 | \n",
" 0.19 | \n",
" Matches | \n",
" 19.0 | \n",
" 4.0 | \n",
" 21.1 | \n",
" 0.54 | \n",
" 0.11 | \n",
" 0.00 | \n",
" 0.00 | \n",
" 24.6 | \n",
" 11.0 | \n",
" 0.05 | \n",
" -0.9 | \n",
" -0.9 | \n",
" 1541.0 | \n",
" 2061.0 | \n",
" 74.8 | \n",
" 30884.0 | \n",
" 14764.0 | \n",
" 655.0 | \n",
" 736.0 | \n",
" 89.0 | \n",
" 616.0 | \n",
" 736.0 | \n",
" 83.7 | \n",
" 252.0 | \n",
" 518.0 | \n",
" 48.6 | \n",
" 2.1 | \n",
" 60.0 | \n",
" 149.0 | \n",
" 24.0 | \n",
" 17.0 | \n",
" 120.0 | \n",
" 1617.0 | \n",
" 444.0 | \n",
" 2.0 | \n",
" 158.0 | \n",
" 84.0 | \n",
" 91.0 | \n",
" 82.0 | \n",
" 22.0 | \n",
" 51.0 | \n",
" 6.0 | \n",
" 1104.0 | \n",
" 365.0 | \n",
" 592.0 | \n",
" 1607.0 | \n",
" 118.0 | \n",
" 49.0 | \n",
" 259.0 | \n",
" 4.0 | \n",
" 23.0 | \n",
" 35.0 | \n",
" 48.0 | \n",
" 66.0 | \n",
" 96.0 | \n",
" 2.73 | \n",
" 48.0 | \n",
" 41.0 | \n",
" 1.0 | \n",
" 2.0 | \n",
" 0.0 | \n",
" 14.0 | \n",
" 0.40 | \n",
" 5.0 | \n",
" 6.0 | \n",
" 0.0 | \n",
" 2.0 | \n",
" 1.0 | \n",
" 0.0 | \n",
" 31.0 | \n",
" 13.0 | \n",
" 15.0 | \n",
" 14.0 | \n",
" 2.0 | \n",
" 14.0 | \n",
" 41.2 | \n",
" 20.0 | \n",
" 67.0 | \n",
" 29.1 | \n",
" 122.0 | \n",
" 90.0 | \n",
" 18.0 | \n",
" 0.0 | \n",
" 34.0 | \n",
" 67.0 | \n",
" 98.0 | \n",
" 0.0 | \n",
" 2307.0 | \n",
" 182.0 | \n",
" 18.0 | \n",
" 40.0 | \n",
" 8.0 | \n",
" 2.0 | \n",
" 1266.0 | \n",
" 3.0 | \n",
" 7.0 | \n",
" 9.0 | \n",
" 1366.0 | \n",
" 1318.0 | \n",
" 96.5 | \n",
" 30.0 | \n",
" 88 | \n",
" 92.7 | \n",
" 88.0 | \n",
" NaN | \n",
" 0 | \n",
" NaN | \n",
" 0 | \n",
" 1.81 | \n",
" 60.0 | \n",
" 41.0 | \n",
" 19.0 | \n",
" 0.54 | \n",
" 1.98 | \n",
" 51.3 | \n",
" 42.9 | \n",
" 8.4 | \n",
" 0.24 | \n",
" 1.26 | \n",
" 0.0 | \n",
" 13 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 307.0 | \n",
" 38.0 | \n",
" 30.0 | \n",
" 55.9 | \n",
" Big-5-European-Leagues | \n",
" Big5 | \n",
" 2020/2021 | \n",
" West Ham | \n",
" England | \n",
" aaron cresswell | \n",
" aaron | \n",
" cresswell | \n",
" a | \n",
" england | \n",
" ENG | \n",
" England | \n",
" DF | \n",
" Defender | \n",
" Outfielder | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" aaron cresswell | \n",
" aaron | \n",
" cresswell | \n",
" a | \n",
" england | \n",
" Aaron Cresswell | \n",
" https://fbref.com/en/players/4f974391/Aaron-Cr... | \n",
" https://www.transfermarkt.com/aaron-cresswell/... | \n",
" Left-Back | \n",
" 92571 | \n",
" 4f974391 | \n",
"
\n",
" \n",
" 2728 | \n",
" eng ENG | \n",
" DF | \n",
" West Ham | \n",
" Premier League | \n",
" 28 | \n",
" 1989.0 | \n",
" 20 | \n",
" 18 | \n",
" 1589.0 | \n",
" 17.7 | \n",
" 0 | \n",
" 1 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 1 | \n",
" 0 | \n",
" 0.00 | \n",
" 0.06 | \n",
" 0.06 | \n",
" 0.00 | \n",
" 0.06 | \n",
" 0.5 | \n",
" 0.5 | \n",
" 0.9 | \n",
" 1.4 | \n",
" 0.03 | \n",
" 0.05 | \n",
" 0.08 | \n",
" 0.03 | \n",
" 0.08 | \n",
" Matches | \n",
" 11.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.62 | \n",
" 0.00 | \n",
" 0.00 | \n",
" NaN | \n",
" 23.5 | \n",
" 2.0 | \n",
" 0.04 | \n",
" -0.5 | \n",
" -0.5 | \n",
" 842.0 | \n",
" 1070.0 | \n",
" 78.7 | \n",
" 13627.0 | \n",
" 5572.0 | \n",
" 453.0 | \n",
" 501.0 | \n",
" 90.4 | \n",
" 307.0 | \n",
" 371.0 | \n",
" 82.7 | \n",
" 64.0 | \n",
" 140.0 | \n",
" 45.7 | \n",
" 0.1 | \n",
" 16.0 | \n",
" 55.0 | \n",
" 15.0 | \n",
" 5.0 | \n",
" 65.0 | \n",
" 854.0 | \n",
" 216.0 | \n",
" 0.0 | \n",
" 168.0 | \n",
" 18.0 | \n",
" 46.0 | \n",
" 10.0 | \n",
" 0.0 | \n",
" 2.0 | \n",
" 0.0 | \n",
" 642.0 | \n",
" 235.0 | \n",
" 193.0 | \n",
" 787.0 | \n",
" 51.0 | \n",
" 27.0 | \n",
" 190.0 | \n",
" 4.0 | \n",
" 2.0 | \n",
" 21.0 | \n",
" 27.0 | \n",
" 44.0 | \n",
" 29.0 | \n",
" 1.64 | \n",
" 19.0 | \n",
" 6.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 1.0 | \n",
" 2.0 | \n",
" 0.11 | \n",
" 0.0 | \n",
" 2.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 30.0 | \n",
" 19.0 | \n",
" 14.0 | \n",
" 12.0 | \n",
" 4.0 | \n",
" 12.0 | \n",
" 42.9 | \n",
" 16.0 | \n",
" 68.0 | \n",
" 31.5 | \n",
" 129.0 | \n",
" 59.0 | \n",
" 28.0 | \n",
" 0.0 | \n",
" 39.0 | \n",
" 49.0 | \n",
" 60.0 | \n",
" 1.0 | \n",
" 1266.0 | \n",
" 78.0 | \n",
" 36.0 | \n",
" 63.6 | \n",
" 7.0 | \n",
" 1.0 | \n",
" 723.0 | \n",
" 8.0 | \n",
" 11.0 | \n",
" 13.0 | \n",
" 797.0 | \n",
" 715.0 | \n",
" 89.7 | \n",
" 43.0 | \n",
" 79 | \n",
" 46.5 | \n",
" 85.0 | \n",
" 16.0 | \n",
" 2 | \n",
" 30.0 | \n",
" 7 | \n",
" 1.30 | \n",
" 21.0 | \n",
" 26.0 | \n",
" -5.0 | \n",
" -0.28 | \n",
" -0.38 | \n",
" 20.1 | \n",
" 25.3 | \n",
" -5.3 | \n",
" -0.30 | \n",
" 0.12 | \n",
" 0.0 | \n",
" 2 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 169.0 | \n",
" 22.0 | \n",
" 14.0 | \n",
" 61.1 | \n",
" Big-5-European-Leagues | \n",
" Big5 | \n",
" 2018/2019 | \n",
" West Ham | \n",
" England | \n",
" aaron cresswell | \n",
" aaron | \n",
" cresswell | \n",
" a | \n",
" england | \n",
" ENG | \n",
" England | \n",
" DF | \n",
" Defender | \n",
" Outfielder | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" aaron cresswell | \n",
" aaron | \n",
" cresswell | \n",
" a | \n",
" england | \n",
" Aaron Cresswell | \n",
" https://fbref.com/en/players/4f974391/Aaron-Cr... | \n",
" https://www.transfermarkt.com/aaron-cresswell/... | \n",
" Left-Back | \n",
" 92571 | \n",
" 4f974391 | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" Nation Pos Squad Comp Age birth_year MP Starts \\\n",
"5430 ie IRL FW Brighton Premier League 19 2000.0 24 14 \n",
"8211 ie IRL FW Brighton Premier League 20 2000.0 17 9 \n",
"11071 ie IRL FW Brighton Premier League 21 2000.0 1 0 \n",
"8212 eng ENG DF West Ham Premier League 30 1989.0 36 36 \n",
"2728 eng ENG DF West Ham Premier League 28 1989.0 20 18 \n",
"\n",
" Min 90s Gls Ast G-PK PK PKatt CrdY CrdR Gls.1 Ast.1 \\\n",
"5430 1258.0 14.0 3 1 3 0 0 0 0 0.21 0.07 \n",
"8211 791.0 8.8 2 1 2 0 0 0 0 0.23 0.11 \n",
"11071 45.0 0.5 0 0 0 0 0 0 0 0.00 0.00 \n",
"8212 3170.0 35.2 0 8 0 0 0 3 0 0.00 0.23 \n",
"2728 1589.0 17.7 0 1 0 0 0 1 0 0.00 0.06 \n",
"\n",
" G+A G-PK.1 G+A-PK xG npxG xA npxG+xA xG.1 xA.1 xG+xA \\\n",
"5430 0.29 0.21 0.29 3.2 3.2 0.3 3.5 0.23 0.02 0.25 \n",
"8211 0.34 0.23 0.34 3.5 3.5 0.2 3.7 0.40 0.02 0.42 \n",
"11071 0.00 0.00 0.00 0.4 0.4 0.0 0.4 0.85 0.00 0.85 \n",
"8212 0.23 0.00 0.23 0.9 0.9 5.9 6.9 0.03 0.17 0.19 \n",
"2728 0.06 0.00 0.06 0.5 0.5 0.9 1.4 0.03 0.05 0.08 \n",
"\n",
" npxG.1 npxG+xA.1 Matches Sh SoT SoT% Sh/90 SoT/90 G/Sh \\\n",
"5430 0.23 0.25 Matches 38.0 13.0 34.2 2.72 0.93 0.08 \n",
"8211 0.40 0.42 Matches 23.0 8.0 34.8 2.62 0.91 0.09 \n",
"11071 0.85 0.85 Matches 1.0 0.0 0.0 2.00 0.00 0.00 \n",
"8212 0.03 0.19 Matches 19.0 4.0 21.1 0.54 0.11 0.00 \n",
"2728 0.03 0.08 Matches 11.0 0.0 0.0 0.62 0.00 0.00 \n",
"\n",
" G/SoT Dist FK npxG/Sh G-xG np:G-xG Cmp Att Cmp% \\\n",
"5430 0.23 15.9 0.0 0.08 -0.2 -0.2 126.0 163.0 77.3 \n",
"8211 0.25 13.7 0.0 0.15 -1.5 -1.5 79.0 101.0 78.2 \n",
"11071 NaN 9.0 0.0 0.42 -0.4 -0.4 2.0 3.0 66.7 \n",
"8212 0.00 24.6 11.0 0.05 -0.9 -0.9 1541.0 2061.0 74.8 \n",
"2728 NaN 23.5 2.0 0.04 -0.5 -0.5 842.0 1070.0 78.7 \n",
"\n",
" TotDist PrgDist Cmp.1 Att.1 Cmp%.1 Cmp.2 Att.2 Cmp%.2 Cmp.3 \\\n",
"5430 1739.0 242.0 76.0 92.0 82.6 31.0 39.0 79.5 7.0 \n",
"8211 1147.0 165.0 45.0 56.0 80.4 26.0 30.0 86.7 4.0 \n",
"11071 14.0 0.0 2.0 2.0 100.0 0.0 1.0 0.0 0.0 \n",
"8212 30884.0 14764.0 655.0 736.0 89.0 616.0 736.0 83.7 252.0 \n",
"2728 13627.0 5572.0 453.0 501.0 90.4 307.0 371.0 82.7 64.0 \n",
"\n",
" Att.3 Cmp%.3 A-xA KP 1/3 PPA CrsPA Prog Live Dead \\\n",
"5430 11.0 63.6 0.7 6.0 6.0 2.0 0.0 10.0 148.0 15.0 \n",
"8211 5.0 80.0 0.8 5.0 2.0 1.0 0.0 3.0 91.0 10.0 \n",
"11071 0.0 NaN 0.0 0.0 0.0 0.0 0.0 0.0 3.0 0.0 \n",
"8212 518.0 48.6 2.1 60.0 149.0 24.0 17.0 120.0 1617.0 444.0 \n",
"2728 140.0 45.7 0.1 16.0 55.0 15.0 5.0 65.0 854.0 216.0 \n",
"\n",
" TB Press Sw Crs CK In Out Str Ground Low High \\\n",
"5430 1.0 50.0 0.0 7.0 0.0 0.0 0.0 0.0 90.0 52.0 21.0 \n",
"8211 0.0 22.0 1.0 2.0 0.0 0.0 0.0 0.0 64.0 26.0 11.0 \n",
"11071 0.0 1.0 0.0 1.0 0.0 0.0 0.0 0.0 2.0 1.0 0.0 \n",
"8212 2.0 158.0 84.0 91.0 82.0 22.0 51.0 6.0 1104.0 365.0 592.0 \n",
"2728 0.0 168.0 18.0 46.0 10.0 0.0 2.0 0.0 642.0 235.0 193.0 \n",
"\n",
" Left Right Head TI Other Off Out.1 Int Blocks SCA \\\n",
"5430 27.0 107.0 13.0 1.0 6.0 0.0 1.0 4.0 10.0 25.0 \n",
"8211 11.0 74.0 5.0 0.0 3.0 0.0 0.0 2.0 4.0 12.0 \n",
"11071 0.0 2.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 1.0 \n",
"8212 1607.0 118.0 49.0 259.0 4.0 23.0 35.0 48.0 66.0 96.0 \n",
"2728 787.0 51.0 27.0 190.0 4.0 2.0 21.0 27.0 44.0 29.0 \n",
"\n",
" SCA90 PassLive PassDead Drib Fld Def GCA GCA90 PassLive.1 \\\n",
"5430 1.79 7.0 0.0 3.0 9.0 3.0 5.0 0.36 1.0 \n",
"8211 1.37 7.0 0.0 3.0 2.0 0.0 1.0 0.11 1.0 \n",
"11071 2.00 1.0 0.0 0.0 0.0 0.0 0.0 0.00 0.0 \n",
"8212 2.73 48.0 41.0 1.0 2.0 0.0 14.0 0.40 5.0 \n",
"2728 1.64 19.0 6.0 0.0 0.0 1.0 2.0 0.11 0.0 \n",
"\n",
" PassDead.1 Drib.1 Sh.1 Fld.1 Def.1 Tkl TklW Def 3rd Mid 3rd \\\n",
"5430 0.0 1.0 1.0 2.0 0.0 12.0 8.0 1.0 5.0 \n",
"8211 0.0 0.0 0.0 0.0 0.0 7.0 5.0 2.0 4.0 \n",
"11071 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 \n",
"8212 6.0 0.0 2.0 1.0 0.0 31.0 13.0 15.0 14.0 \n",
"2728 2.0 0.0 0.0 0.0 0.0 30.0 19.0 14.0 12.0 \n",
"\n",
" Att 3rd Tkl.1 Tkl% Past Succ % Def 3rd.1 Mid 3rd.1 \\\n",
"5430 6.0 3.0 25.0 9.0 69.0 29.5 14.0 94.0 \n",
"8211 1.0 1.0 20.0 4.0 40.0 32.3 7.0 58.0 \n",
"11071 0.0 0.0 NaN 0.0 1.0 8.3 1.0 6.0 \n",
"8212 2.0 14.0 41.2 20.0 67.0 29.1 122.0 90.0 \n",
"2728 4.0 12.0 42.9 16.0 68.0 31.5 129.0 59.0 \n",
"\n",
" Att 3rd.1 ShSv Pass Tkl+Int Clr Err Touches Def Pen Att Pen \\\n",
"5430 126.0 0.0 7.0 17.0 1.0 0.0 349.0 2.0 61.0 \n",
"8211 59.0 0.0 8.0 7.0 1.0 0.0 201.0 1.0 38.0 \n",
"11071 5.0 0.0 0.0 0.0 0.0 0.0 8.0 0.0 2.0 \n",
"8212 18.0 0.0 34.0 67.0 98.0 0.0 2307.0 182.0 18.0 \n",
"2728 28.0 0.0 39.0 49.0 60.0 1.0 1266.0 78.0 36.0 \n",
"\n",
" Succ% #Pl Megs Carries CPA Mis Dis Targ Rec Rec% \\\n",
"5430 37.5 6.0 1.0 228.0 12.0 42.0 34.0 535.0 235.0 43.9 \n",
"8211 80.0 8.0 0.0 124.0 4.0 29.0 15.0 357.0 143.0 40.1 \n",
"11071 NaN 0.0 0.0 5.0 0.0 0.0 1.0 20.0 4.0 20.0 \n",
"8212 40.0 8.0 2.0 1266.0 3.0 7.0 9.0 1366.0 1318.0 96.5 \n",
"2728 63.6 7.0 1.0 723.0 8.0 11.0 13.0 797.0 715.0 89.7 \n",
"\n",
" Prog.1 Mn/MP Min% Mn/Start Compl Subs Mn/Sub unSub PPM onG \\\n",
"5430 99.0 52 36.8 72.0 0.0 10 26.0 4 1.13 18.0 \n",
"8211 64.0 47 23.1 68.0 NaN 8 23.0 11 0.88 12.0 \n",
"11071 2.0 45 16.7 NaN 0.0 1 45.0 1 3.00 0.0 \n",
"8212 30.0 88 92.7 88.0 NaN 0 NaN 0 1.81 60.0 \n",
"2728 43.0 79 46.5 85.0 16.0 2 30.0 7 1.30 21.0 \n",
"\n",
" onGA +/- +/-90 On-Off onxG onxGA xG+/- xG+/-90 On-Off.1 \\\n",
"5430 22.0 -4.0 -0.29 0.17 15.6 19.8 -4.2 -0.30 0.08 \n",
"8211 17.0 -5.0 -0.57 -0.53 13.8 7.8 6.0 0.69 0.42 \n",
"11071 0.0 0.0 0.00 -0.40 1.0 0.7 0.3 0.68 0.74 \n",
"8212 41.0 19.0 0.54 1.98 51.3 42.9 8.4 0.24 1.26 \n",
"2728 26.0 -5.0 -0.28 -0.38 20.1 25.3 -5.3 -0.30 0.12 \n",
"\n",
" 2CrdY Fls PKwon PKcon OG Recov Won Lost Won% \\\n",
"5430 0.0 16 2.0 0.0 0.0 54.0 14.0 48.0 22.6 \n",
"8211 0.0 5 1.0 0.0 0.0 28.0 11.0 30.0 26.8 \n",
"11071 0.0 0 0.0 0.0 0.0 3.0 0.0 2.0 0.0 \n",
"8212 0.0 13 0.0 0.0 0.0 307.0 38.0 30.0 55.9 \n",
"2728 0.0 2 0.0 0.0 0.0 169.0 22.0 14.0 61.1 \n",
"\n",
" League Name League ID season Team Name Team Country \\\n",
"5430 Big-5-European-Leagues Big5 2019/2020 Brighton England \n",
"8211 Big-5-European-Leagues Big5 2020/2021 Brighton England \n",
"11071 Big-5-European-Leagues Big5 2021/2022 Brighton England \n",
"8212 Big-5-European-Leagues Big5 2020/2021 West Ham England \n",
"2728 Big-5-European-Leagues Big5 2018/2019 West Ham England \n",
"\n",
" Player Lower First Name Lower Last Name Lower First Initial Lower \\\n",
"5430 aaron connolly aaron connolly a \n",
"8211 aaron connolly aaron connolly a \n",
"11071 aaron connolly aaron connolly a \n",
"8212 aaron cresswell aaron cresswell a \n",
"2728 aaron cresswell aaron cresswell a \n",
"\n",
" Team Country Lower Nationality Code Nationality Cleaned Primary Pos \\\n",
"5430 england IRL Ireland FW \n",
"8211 england IRL Ireland FW \n",
"11071 england IRL Ireland FW \n",
"8212 england ENG England DF \n",
"2728 england ENG England DF \n",
"\n",
" Position Grouped outfielder_goalkeeper GA GA90 SoTA Saves Save% \\\n",
"5430 Forward Outfielder NaN NaN NaN NaN NaN \n",
"8211 Forward Outfielder NaN NaN NaN NaN NaN \n",
"11071 Forward Outfielder NaN NaN NaN NaN NaN \n",
"8212 Defender Outfielder NaN NaN NaN NaN NaN \n",
"2728 Defender Outfielder NaN NaN NaN NaN NaN \n",
"\n",
" W D L CS CS% PKA PKsv PKm Save%.1 PSxG PSxG/SoT PSxG+/- \\\n",
"5430 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN \n",
"8211 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN \n",
"11071 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN \n",
"8212 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN \n",
"2728 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN \n",
"\n",
" /90 Thr Launch% AvgLen Launch%.1 AvgLen.1 Opp Stp Stp% #OPA \\\n",
"5430 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN \n",
"8211 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN \n",
"11071 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN \n",
"8212 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN \n",
"2728 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN \n",
"\n",
" #OPA/90 AvgDist player_name_lower first_name_lower last_name_lower \\\n",
"5430 NaN NaN aaron connolly aaron connolly \n",
"8211 NaN NaN aaron connolly aaron connolly \n",
"11071 NaN NaN aaron connolly aaron connolly \n",
"8212 NaN NaN aaron cresswell aaron cresswell \n",
"2728 NaN NaN aaron cresswell aaron cresswell \n",
"\n",
" first_initial_lower country_lower player_name_fbref \\\n",
"5430 a ireland Aaron Connolly \n",
"8211 a ireland Aaron Connolly \n",
"11071 a ireland Aaron Connolly \n",
"8212 a england Aaron Cresswell \n",
"2728 a england Aaron Cresswell \n",
"\n",
" url_fbref \\\n",
"5430 https://fbref.com/en/players/27c01749/Aaron-Co... \n",
"8211 https://fbref.com/en/players/27c01749/Aaron-Co... \n",
"11071 https://fbref.com/en/players/27c01749/Aaron-Co... \n",
"8212 https://fbref.com/en/players/4f974391/Aaron-Cr... \n",
"2728 https://fbref.com/en/players/4f974391/Aaron-Cr... \n",
"\n",
" url_tm TmPos \\\n",
"5430 https://www.transfermarkt.com/aaron-connolly/p... Centre-Forward \n",
"8211 https://www.transfermarkt.com/aaron-connolly/p... Centre-Forward \n",
"11071 https://www.transfermarkt.com/aaron-connolly/p... Centre-Forward \n",
"8212 https://www.transfermarkt.com/aaron-cresswell/... Left-Back \n",
"2728 https://www.transfermarkt.com/aaron-cresswell/... Left-Back \n",
"\n",
" tm_id fbref_id \n",
"5430 434207 27c01749 \n",
"8211 434207 27c01749 \n",
"11071 434207 27c01749 \n",
"8212 92571 4f974391 \n",
"2728 92571 4f974391 "
]
},
"execution_count": 86,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"df_fbref_merge.head()"
]
},
{
"cell_type": "code",
"execution_count": 87,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" tm_id | \n",
" season | \n",
" player_name | \n",
" club | \n",
" current_club | \n",
" league_code | \n",
" current_age | \n",
" market_value_gbp | \n",
" market_value_eur | \n",
" dob | \n",
" pob | \n",
" birth_year | \n",
" position | \n",
" position_code | \n",
" position_grouped | \n",
" outfielder_goalkeeper | \n",
" height | \n",
" foot | \n",
" citizenship | \n",
" second_citizenship | \n",
" player_agent | \n",
" player_name_lower | \n",
" first_name_lower | \n",
" last_name_lower | \n",
" first_initial_lower | \n",
" country_lower | \n",
" birth_day | \n",
" birth_month | \n",
" cob | \n",
" current_club_country | \n",
" market_value_euros | \n",
" joined | \n",
" contract_expires | \n",
" contract_option | \n",
" on_loan_from | \n",
" on_loan_from_country | \n",
" loan_contract_expiry | \n",
" name_lower | \n",
" firstname_lower | \n",
" lastname_lower | \n",
" firstinitial_lower | \n",
" league_country_lower | \n",
" age | \n",
" age_when_joining | \n",
" years_since_joining | \n",
" years_until_contract_expiry | \n",
" market_value_pounds | \n",
" club_name | \n",
" club_involved_name | \n",
" fee | \n",
" transfer_movement | \n",
" transfer_period | \n",
" fee_cleaned | \n",
" league_name | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" 26 | \n",
" 2017/2018 | \n",
" roman weidenfeller | \n",
" Borussia Dortmund | \n",
" retired | \n",
" L1 | \n",
" 41.0 | \n",
" 675000.0 | \n",
" 750000 | \n",
" 1980-08-06 | \n",
" Diez | \n",
" 1980.0 | \n",
" Goalkeeper | \n",
" GK | \n",
" Goalkeeper | \n",
" Goalkeeper | \n",
" 188.0 | \n",
" left | \n",
" Germany | \n",
" NaN | \n",
" Jörg Neubauer | \n",
" roman weidenfeller | \n",
" roman | \n",
" weidenfeller | \n",
" r | \n",
" germany | \n",
" 6.0 | \n",
" 8.0 | \n",
" Germany | \n",
" NaN | \n",
" 0.0 | \n",
" 2018-07-01 | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" roman weidenfeller | \n",
" roman | \n",
" weidenfeller | \n",
" r | \n",
" NaN | \n",
" 41.0 | \n",
" 37.0 | \n",
" 3.0 | \n",
" NaN | \n",
" 0.0 | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
"
\n",
" \n",
" 1 | \n",
" 26 | \n",
" 2018/2019 | \n",
" roman weidenfeller | \n",
" Borussia Dortmund | \n",
" retired | \n",
" L1 | \n",
" 41.0 | \n",
" 0.0 | \n",
" 0 | \n",
" 1980-08-06 | \n",
" Diez | \n",
" 1980.0 | \n",
" Goalkeeper | \n",
" GK | \n",
" Goalkeeper | \n",
" Goalkeeper | \n",
" 188.0 | \n",
" left | \n",
" Germany | \n",
" NaN | \n",
" Jörg Neubauer | \n",
" roman weidenfeller | \n",
" roman | \n",
" weidenfeller | \n",
" r | \n",
" germany | \n",
" 6.0 | \n",
" 8.0 | \n",
" Germany | \n",
" NaN | \n",
" 0.0 | \n",
" 2018-07-01 | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" roman weidenfeller | \n",
" roman | \n",
" weidenfeller | \n",
" r | \n",
" NaN | \n",
" 41.0 | \n",
" 37.0 | \n",
" 3.0 | \n",
" NaN | \n",
" 0.0 | \n",
" Borussia Dortmund | \n",
" Retired | \n",
" - | \n",
" out | \n",
" Summer | \n",
" 0.0 | \n",
" 1 Bundesliga | \n",
"
\n",
" \n",
" 2 | \n",
" 80 | \n",
" 2017/2018 | \n",
" tom starke | \n",
" Bayern Munich | \n",
" retired | \n",
" L1 | \n",
" 40.0 | \n",
" 90000.0 | \n",
" 100000 | \n",
" 1981-03-18 | \n",
" Freital | \n",
" 1981.0 | \n",
" Goalkeeper | \n",
" GK | \n",
" Goalkeeper | \n",
" Goalkeeper | \n",
" 194.0 | \n",
" right | \n",
" Germany | \n",
" NaN | \n",
" IFM | \n",
" tom starke | \n",
" tom | \n",
" starke | \n",
" t | \n",
" germany | \n",
" 18.0 | \n",
" 3.0 | \n",
" DDR | \n",
" NaN | \n",
" 0.0 | \n",
" 2018-07-01 | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" tom starke | \n",
" tom | \n",
" starke | \n",
" t | \n",
" NaN | \n",
" 40.0 | \n",
" 37.0 | \n",
" 3.0 | \n",
" NaN | \n",
" 0.0 | \n",
" Bayern Munich | \n",
" Career break | \n",
" - | \n",
" in | \n",
" Summer | \n",
" 0.0 | \n",
" 1 Bundesliga | \n",
"
\n",
" \n",
" 4 | \n",
" 80 | \n",
" 2018/2019 | \n",
" tom starke | \n",
" Bayern Munich | \n",
" retired | \n",
" L1 | \n",
" 40.0 | \n",
" 90000.0 | \n",
" 100000 | \n",
" 1981-03-18 | \n",
" Freital | \n",
" 1981.0 | \n",
" Goalkeeper | \n",
" GK | \n",
" Goalkeeper | \n",
" Goalkeeper | \n",
" 194.0 | \n",
" right | \n",
" Germany | \n",
" NaN | \n",
" IFM | \n",
" tom starke | \n",
" tom | \n",
" starke | \n",
" t | \n",
" germany | \n",
" 18.0 | \n",
" 3.0 | \n",
" DDR | \n",
" NaN | \n",
" 0.0 | \n",
" 2018-07-01 | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" tom starke | \n",
" tom | \n",
" starke | \n",
" t | \n",
" NaN | \n",
" 40.0 | \n",
" 37.0 | \n",
" 3.0 | \n",
" NaN | \n",
" 0.0 | \n",
" Bayern Munich | \n",
" Retired | \n",
" - | \n",
" out | \n",
" Summer | \n",
" 0.0 | \n",
" 1 Bundesliga | \n",
"
\n",
" \n",
" 5 | \n",
" 488 | \n",
" 2017/2018 | \n",
" gerhard tremmel | \n",
" Swansea City | \n",
" retired | \n",
" GB1 | \n",
" 42.0 | \n",
" 225000.0 | \n",
" 250000 | \n",
" 1978-11-16 | \n",
" München | \n",
" 1978.0 | \n",
" Goalkeeper | \n",
" GK | \n",
" Goalkeeper | \n",
" Goalkeeper | \n",
" NaN | \n",
" NaN | \n",
" Germany | \n",
" NaN | \n",
" NaN | \n",
" gerhard tremmel | \n",
" gerhard | \n",
" tremmel | \n",
" g | \n",
" germany | \n",
" 16.0 | \n",
" 11.0 | \n",
" Germany | \n",
" NaN | \n",
" 0.0 | \n",
" 2017-07-17 | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" gerhard tremmel | \n",
" gerhard | \n",
" tremmel | \n",
" g | \n",
" NaN | \n",
" 42.0 | \n",
" 38.0 | \n",
" 4.0 | \n",
" NaN | \n",
" 0.0 | \n",
" Swansea City | \n",
" Retired | \n",
" - | \n",
" out | \n",
" Summer | \n",
" 0.0 | \n",
" Premier League | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" tm_id season player_name club current_club \\\n",
"0 26 2017/2018 roman weidenfeller Borussia Dortmund retired \n",
"1 26 2018/2019 roman weidenfeller Borussia Dortmund retired \n",
"2 80 2017/2018 tom starke Bayern Munich retired \n",
"4 80 2018/2019 tom starke Bayern Munich retired \n",
"5 488 2017/2018 gerhard tremmel Swansea City retired \n",
"\n",
" league_code current_age market_value_gbp market_value_eur dob \\\n",
"0 L1 41.0 675000.0 750000 1980-08-06 \n",
"1 L1 41.0 0.0 0 1980-08-06 \n",
"2 L1 40.0 90000.0 100000 1981-03-18 \n",
"4 L1 40.0 90000.0 100000 1981-03-18 \n",
"5 GB1 42.0 225000.0 250000 1978-11-16 \n",
"\n",
" pob birth_year position position_code position_grouped \\\n",
"0 Diez 1980.0 Goalkeeper GK Goalkeeper \n",
"1 Diez 1980.0 Goalkeeper GK Goalkeeper \n",
"2 Freital 1981.0 Goalkeeper GK Goalkeeper \n",
"4 Freital 1981.0 Goalkeeper GK Goalkeeper \n",
"5 München 1978.0 Goalkeeper GK Goalkeeper \n",
"\n",
" outfielder_goalkeeper height foot citizenship second_citizenship \\\n",
"0 Goalkeeper 188.0 left Germany NaN \n",
"1 Goalkeeper 188.0 left Germany NaN \n",
"2 Goalkeeper 194.0 right Germany NaN \n",
"4 Goalkeeper 194.0 right Germany NaN \n",
"5 Goalkeeper NaN NaN Germany NaN \n",
"\n",
" player_agent player_name_lower first_name_lower last_name_lower \\\n",
"0 Jörg Neubauer roman weidenfeller roman weidenfeller \n",
"1 Jörg Neubauer roman weidenfeller roman weidenfeller \n",
"2 IFM tom starke tom starke \n",
"4 IFM tom starke tom starke \n",
"5 NaN gerhard tremmel gerhard tremmel \n",
"\n",
" first_initial_lower country_lower birth_day birth_month cob \\\n",
"0 r germany 6.0 8.0 Germany \n",
"1 r germany 6.0 8.0 Germany \n",
"2 t germany 18.0 3.0 DDR \n",
"4 t germany 18.0 3.0 DDR \n",
"5 g germany 16.0 11.0 Germany \n",
"\n",
" current_club_country market_value_euros joined contract_expires \\\n",
"0 NaN 0.0 2018-07-01 NaN \n",
"1 NaN 0.0 2018-07-01 NaN \n",
"2 NaN 0.0 2018-07-01 NaN \n",
"4 NaN 0.0 2018-07-01 NaN \n",
"5 NaN 0.0 2017-07-17 NaN \n",
"\n",
" contract_option on_loan_from on_loan_from_country loan_contract_expiry \\\n",
"0 NaN NaN NaN NaN \n",
"1 NaN NaN NaN NaN \n",
"2 NaN NaN NaN NaN \n",
"4 NaN NaN NaN NaN \n",
"5 NaN NaN NaN NaN \n",
"\n",
" name_lower firstname_lower lastname_lower firstinitial_lower \\\n",
"0 roman weidenfeller roman weidenfeller r \n",
"1 roman weidenfeller roman weidenfeller r \n",
"2 tom starke tom starke t \n",
"4 tom starke tom starke t \n",
"5 gerhard tremmel gerhard tremmel g \n",
"\n",
" league_country_lower age age_when_joining years_since_joining \\\n",
"0 NaN 41.0 37.0 3.0 \n",
"1 NaN 41.0 37.0 3.0 \n",
"2 NaN 40.0 37.0 3.0 \n",
"4 NaN 40.0 37.0 3.0 \n",
"5 NaN 42.0 38.0 4.0 \n",
"\n",
" years_until_contract_expiry market_value_pounds club_name \\\n",
"0 NaN 0.0 NaN \n",
"1 NaN 0.0 Borussia Dortmund \n",
"2 NaN 0.0 Bayern Munich \n",
"4 NaN 0.0 Bayern Munich \n",
"5 NaN 0.0 Swansea City \n",
"\n",
" club_involved_name fee transfer_movement transfer_period fee_cleaned \\\n",
"0 NaN NaN NaN NaN NaN \n",
"1 Retired - out Summer 0.0 \n",
"2 Career break - in Summer 0.0 \n",
"4 Retired - out Summer 0.0 \n",
"5 Retired - out Summer 0.0 \n",
"\n",
" league_name \n",
"0 NaN \n",
"1 1 Bundesliga \n",
"2 1 Bundesliga \n",
"4 1 Bundesliga \n",
"5 Premier League "
]
},
"execution_count": 87,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"df_tm_merge_final.head()"
]
},
{
"cell_type": "code",
"execution_count": 88,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
""
]
},
"execution_count": 88,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# Record Linkage Step 1 - Create an indexer object\n",
"indexer = recordlinkage.Index()\n",
"indexer.block(left_on = ['first_initial_lower', 'birth_year', 'outfielder_goalkeeper', 'season'], \n",
" right_on = ['first_initial_lower', 'birth_year', 'outfielder_goalkeeper', 'season']\n",
" )"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"The next step is to build up all the potential candidates to check:"
]
},
{
"cell_type": "code",
"execution_count": 89,
"metadata": {
"scrolled": true
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"258184\n"
]
}
],
"source": [
"# Record Linkage Step 2 - Build up all the potential candidates to check:\n",
"candidates = indexer.index(df_fbref_merge, df_tm_merge_final)\n",
"print(len(candidates))"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Now that we have defined the left and right data sets and all the candidates, we can define how we want to perform the comparison logic using `Compare()`:"
]
},
{
"cell_type": "code",
"execution_count": 90,
"metadata": {},
"outputs": [],
"source": [
"# Record Linkage Step 3 - Define how we to perform the comparison logic\n",
"compare = recordlinkage.Compare()\n",
"\n",
"compare.string('first_name_lower',\n",
" 'first_name_lower',\n",
" method='levenshtein',\n",
" threshold=0.60,\n",
" label='first_name'\n",
" )\n",
"\n",
"compare.string('last_name_lower',\n",
" 'last_name_lower',\n",
" method='levenshtein',\n",
" threshold=0.60,\n",
" label='last_name'\n",
" )\n",
"\n",
"compare.string('country_lower',\n",
" 'country_lower',\n",
" method='levenshtein',\n",
" threshold=0.60,\n",
" label='country'\n",
" )\n",
"\n",
"features = compare.compute(candidates, df_fbref_merge, df_tm_merge_final)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"View the potential candidates"
]
},
{
"cell_type": "code",
"execution_count": 91,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" | \n",
" first_name | \n",
" last_name | \n",
" country | \n",
"
\n",
" \n",
" \n",
" \n",
" 5430 | \n",
" 28740 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
"
\n",
" \n",
" 28758 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
"
\n",
" \n",
" 29919 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
"
\n",
" \n",
" 29967 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
"
\n",
" \n",
" 30184 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
"
\n",
" \n",
" ... | \n",
" ... | \n",
" ... | \n",
" ... | \n",
" ... | \n",
"
\n",
" \n",
" 11066 | \n",
" 5389 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
"
\n",
" \n",
" 8204 | \n",
" 149 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
"
\n",
" \n",
" 5388 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
"
\n",
" \n",
" 5330 | \n",
" 17228 | \n",
" 1.0 | \n",
" 1.0 | \n",
" 1.0 | \n",
"
\n",
" \n",
" 8109 | \n",
" 17229 | \n",
" 1.0 | \n",
" 1.0 | \n",
" 1.0 | \n",
"
\n",
" \n",
"
\n",
"
258184 rows × 3 columns
\n",
"
"
],
"text/plain": [
" first_name last_name country\n",
"5430 28740 0.0 0.0 0.0\n",
" 28758 0.0 0.0 0.0\n",
" 29919 0.0 0.0 0.0\n",
" 29967 0.0 0.0 0.0\n",
" 30184 0.0 0.0 0.0\n",
"... ... ... ...\n",
"11066 5389 0.0 0.0 0.0\n",
"8204 149 0.0 0.0 0.0\n",
" 5388 0.0 0.0 0.0\n",
"5330 17228 1.0 1.0 1.0\n",
"8109 17229 1.0 1.0 1.0\n",
"\n",
"[258184 rows x 3 columns]"
]
},
"execution_count": 91,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# Record Linkage Step 4 - view the potential candidates\n",
"features"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"This DataFrame shows the results of all of the comparisons. There is one row for each row in the Company House and Fan360 DataFrames. The columns correspond to the comparisons we defined. A 1 is a match and 0 is not.\n",
"\n",
"Given the large number of records with no matches, it is a little hard to see how many matches we might have. We can sum up the individual scores to see about the quality of the matches."
]
},
{
"cell_type": "code",
"execution_count": 92,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"3.0 7358\n",
"2.0 7442\n",
"1.0 29599\n",
"0.0 213785\n",
"dtype: int64"
]
},
"execution_count": 92,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# Sum up the individual scores to see the quality of the matches\n",
"features.sum(axis=1).value_counts().sort_index(ascending=False)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"To only include high-quality matches, let’s just take all the records with at least 2 matches out of 3 and create a total score column:"
]
},
{
"cell_type": "code",
"execution_count": 93,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" level_0 | \n",
" level_1 | \n",
" first_name | \n",
" last_name | \n",
" country | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" 5430 | \n",
" 32278 | \n",
" 1.0 | \n",
" 1.0 | \n",
" 1.0 | \n",
"
\n",
" \n",
" 1 | \n",
" 5442 | \n",
" 35813 | \n",
" 1.0 | \n",
" 1.0 | \n",
" 1.0 | \n",
"
\n",
" \n",
" 2 | \n",
" 5495 | \n",
" 32743 | \n",
" 1.0 | \n",
" 1.0 | \n",
" 0.0 | \n",
"
\n",
" \n",
" 3 | \n",
" 5579 | \n",
" 31981 | \n",
" 1.0 | \n",
" 1.0 | \n",
" 0.0 | \n",
"
\n",
" \n",
" 4 | \n",
" 5586 | \n",
" 34594 | \n",
" 1.0 | \n",
" 1.0 | \n",
" 0.0 | \n",
"
\n",
" \n",
" ... | \n",
" ... | \n",
" ... | \n",
" ... | \n",
" ... | \n",
" ... | \n",
"
\n",
" \n",
" 14795 | \n",
" 8167 | \n",
" 11485 | \n",
" 1.0 | \n",
" 1.0 | \n",
" 0.0 | \n",
"
\n",
" \n",
" 14796 | \n",
" 2689 | \n",
" 6333 | \n",
" 1.0 | \n",
" 1.0 | \n",
" 1.0 | \n",
"
\n",
" \n",
" 14797 | \n",
" 11046 | \n",
" 36305 | \n",
" 1.0 | \n",
" 0.0 | \n",
" 1.0 | \n",
"
\n",
" \n",
" 14798 | \n",
" 5330 | \n",
" 17228 | \n",
" 1.0 | \n",
" 1.0 | \n",
" 1.0 | \n",
"
\n",
" \n",
" 14799 | \n",
" 8109 | \n",
" 17229 | \n",
" 1.0 | \n",
" 1.0 | \n",
" 1.0 | \n",
"
\n",
" \n",
"
\n",
"
14800 rows × 5 columns
\n",
"
"
],
"text/plain": [
" level_0 level_1 first_name last_name country\n",
"0 5430 32278 1.0 1.0 1.0\n",
"1 5442 35813 1.0 1.0 1.0\n",
"2 5495 32743 1.0 1.0 0.0\n",
"3 5579 31981 1.0 1.0 0.0\n",
"4 5586 34594 1.0 1.0 0.0\n",
"... ... ... ... ... ...\n",
"14795 8167 11485 1.0 1.0 0.0\n",
"14796 2689 6333 1.0 1.0 1.0\n",
"14797 11046 36305 1.0 0.0 1.0\n",
"14798 5330 17228 1.0 1.0 1.0\n",
"14799 8109 17229 1.0 1.0 1.0\n",
"\n",
"[14800 rows x 5 columns]"
]
},
"execution_count": 93,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# Show records that have match by index number\n",
"potential_matches = features[features.sum(axis=1) >= 2].reset_index()\n",
"potential_matches"
]
},
{
"cell_type": "code",
"execution_count": 94,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" level_0 | \n",
" level_1 | \n",
" first_name | \n",
" last_name | \n",
" country | \n",
" Score | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" 5430 | \n",
" 32278 | \n",
" 1.0 | \n",
" 1.0 | \n",
" 1.0 | \n",
" 3.0 | \n",
"
\n",
" \n",
" 1 | \n",
" 5442 | \n",
" 35813 | \n",
" 1.0 | \n",
" 1.0 | \n",
" 1.0 | \n",
" 3.0 | \n",
"
\n",
" \n",
" 2 | \n",
" 5495 | \n",
" 32743 | \n",
" 1.0 | \n",
" 1.0 | \n",
" 0.0 | \n",
" 2.0 | \n",
"
\n",
" \n",
" 3 | \n",
" 5579 | \n",
" 31981 | \n",
" 1.0 | \n",
" 1.0 | \n",
" 0.0 | \n",
" 2.0 | \n",
"
\n",
" \n",
" 4 | \n",
" 5586 | \n",
" 34594 | \n",
" 1.0 | \n",
" 1.0 | \n",
" 0.0 | \n",
" 2.0 | \n",
"
\n",
" \n",
" ... | \n",
" ... | \n",
" ... | \n",
" ... | \n",
" ... | \n",
" ... | \n",
" ... | \n",
"
\n",
" \n",
" 14795 | \n",
" 8167 | \n",
" 11485 | \n",
" 1.0 | \n",
" 1.0 | \n",
" 0.0 | \n",
" 2.0 | \n",
"
\n",
" \n",
" 14796 | \n",
" 2689 | \n",
" 6333 | \n",
" 1.0 | \n",
" 1.0 | \n",
" 1.0 | \n",
" 3.0 | \n",
"
\n",
" \n",
" 14797 | \n",
" 11046 | \n",
" 36305 | \n",
" 1.0 | \n",
" 0.0 | \n",
" 1.0 | \n",
" 2.0 | \n",
"
\n",
" \n",
" 14798 | \n",
" 5330 | \n",
" 17228 | \n",
" 1.0 | \n",
" 1.0 | \n",
" 1.0 | \n",
" 3.0 | \n",
"
\n",
" \n",
" 14799 | \n",
" 8109 | \n",
" 17229 | \n",
" 1.0 | \n",
" 1.0 | \n",
" 1.0 | \n",
" 3.0 | \n",
"
\n",
" \n",
"
\n",
"
14800 rows × 6 columns
\n",
"
"
],
"text/plain": [
" level_0 level_1 first_name last_name country Score\n",
"0 5430 32278 1.0 1.0 1.0 3.0\n",
"1 5442 35813 1.0 1.0 1.0 3.0\n",
"2 5495 32743 1.0 1.0 0.0 2.0\n",
"3 5579 31981 1.0 1.0 0.0 2.0\n",
"4 5586 34594 1.0 1.0 0.0 2.0\n",
"... ... ... ... ... ... ...\n",
"14795 8167 11485 1.0 1.0 0.0 2.0\n",
"14796 2689 6333 1.0 1.0 1.0 3.0\n",
"14797 11046 36305 1.0 0.0 1.0 2.0\n",
"14798 5330 17228 1.0 1.0 1.0 3.0\n",
"14799 8109 17229 1.0 1.0 1.0 3.0\n",
"\n",
"[14800 rows x 6 columns]"
]
},
"execution_count": 94,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# Create 'Score' attribute, that sums the three columns defined in record-linkage\n",
"potential_matches['Score'] = potential_matches.loc[:, 'first_name': 'country'].sum(axis=1)\n",
"\n",
"# Display DataFrame of potential matches, potential_matches \n",
"potential_matches"
]
},
{
"cell_type": "code",
"execution_count": 95,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" level_0 | \n",
" level_1 | \n",
" first_name | \n",
" last_name | \n",
" country | \n",
" Score | \n",
"
\n",
" \n",
" \n",
" \n",
" 117 | \n",
" 0 | \n",
" 8742 | \n",
" 1.0 | \n",
" 1.0 | \n",
" 1.0 | \n",
" 3.0 | \n",
"
\n",
" \n",
" 161 | \n",
" 1 | \n",
" 176 | \n",
" 1.0 | \n",
" 1.0 | \n",
" 0.0 | \n",
" 2.0 | \n",
"
\n",
" \n",
" 191 | \n",
" 2 | \n",
" 696 | \n",
" 1.0 | \n",
" 1.0 | \n",
" 0.0 | \n",
" 2.0 | \n",
"
\n",
" \n",
" 190 | \n",
" 3 | \n",
" 696 | \n",
" 1.0 | \n",
" 1.0 | \n",
" 0.0 | \n",
" 2.0 | \n",
"
\n",
" \n",
" 369 | \n",
" 4 | \n",
" 10802 | \n",
" 1.0 | \n",
" 1.0 | \n",
" 0.0 | \n",
" 2.0 | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" level_0 level_1 first_name last_name country Score\n",
"117 0 8742 1.0 1.0 1.0 3.0\n",
"161 1 176 1.0 1.0 0.0 2.0\n",
"191 2 696 1.0 1.0 0.0 2.0\n",
"190 3 696 1.0 1.0 0.0 2.0\n",
"369 4 10802 1.0 1.0 0.0 2.0"
]
},
"execution_count": 95,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# Select only the top match per per left index (FBref data)\n",
"\n",
"## Order the potential matches by left index (FBref data) ascending and score decending\n",
"potential_matches = potential_matches.sort_values(by=['level_0', 'Score'], ascending=[True, False])\n",
"\n",
"## Dedupe DataFrame, keeping only the top row\n",
"potential_matches = potential_matches.drop_duplicates(subset=['level_0'], keep='first')\n",
"\n",
"\n",
"# Display DataFrame\n",
"potential_matches.head()"
]
},
{
"cell_type": "code",
"execution_count": 96,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"(11761, 6)"
]
},
"execution_count": 96,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# Shape of potential matches DataFrame\n",
"potential_matches.shape"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"The following code puts the two datasets back together, using the output record-linkage dataset - `potential_matches`."
]
},
{
"cell_type": "code",
"execution_count": 97,
"metadata": {},
"outputs": [],
"source": [
"# Join Datasets\n",
"\n",
"## Join Datasets\n",
"\n",
"\n",
"### Join the FBref Outfielder DataFrame to the potential matches DataFrame\n",
"#df_merge_fbref_tm = pd.merge(potential_matches, df_fbref_merge, left_on='level_0', right_index=True, how='left')\n",
"df_merge_fbref_tm = pd.merge(df_fbref_merge, potential_matches, left_index=True, right_on='level_0', how='left')\n",
"\n",
"\n",
"### Join the TransferMarkt Outfielder DataFrame to the potential matches DataFrame\n",
"df_merge_fbref_tm = pd.merge(df_merge_fbref_tm, df_tm_merge_final, left_on='level_1', right_index=True, how='left')\n",
"\n",
"\n",
"\n",
"## Data cleanup\n",
"\n",
"\n",
"### Rename columns - required otherwise 'birth_year' gets dropped\n",
"df_merge_fbref_tm = df_merge_fbref_tm.rename(columns={'birth_year_x': 'born'})\n",
"\n",
"\n",
"### Sort columns\n",
"df_merge_fbref_tm = df_merge_fbref_tm.sort_values(by=['season_x', 'player_name_fbref', 'tm_id_x', 'Score'], ascending=[True, True, True, False])\n",
"\n",
"\n",
"### Remove duplicates\n",
"\n",
"\n",
"#### Remove duplicate columns after join (contain '_y') and remove '_x' suffix from kept columns\n",
"df_merge_fbref_tm = df_merge_fbref_tm[df_merge_fbref_tm.columns.drop(list(df_merge_fbref_tm.filter(regex='_y')))]\n",
"df_merge_fbref_tm.columns = df_merge_fbref_tm.columns.str.replace('_x','')\n",
"\n",
"#### Remove duplicate rows\n",
"#df_merge_fbref_tm = df_merge_fbref_tm.drop_duplicates(subset=['player_name_fbref', 'season', 'Team Name', 'Comp'], keep='first')\n",
"df_merge_fbref_tm = df_merge_fbref_tm.drop_duplicates(subset=['player_name_fbref', 'season', 'Team Name', 'Comp'], keep='first')\n",
"\n",
"\n",
"### Rename columns\n",
"df_merge_fbref_tm = df_merge_fbref_tm.rename(columns={'born': 'birth_year',\n",
" 'player_name': 'player_name_tm'\n",
" }\n",
" \n",
" )\n",
"\n",
"\n",
"### Sort columns\n",
"df_merge_fbref_tm = df_merge_fbref_tm.sort_values(by=['player_name_fbref', 'season'], ascending=[True, True])\n",
"\n",
"\n",
"### Reset index\n",
"df_merge_fbref_tm = df_merge_fbref_tm.reset_index(drop=True)\n",
"\n",
"\n",
"## Determine columns to keep and remove\n",
"\n",
"### Drop unnecessary columns\n",
"df_merge_fbref_tm = df_merge_fbref_tm.drop(['League Name', 'League ID', 'Score', 'level_0', 'level_1', 'first_name' , 'last_name', 'country'], axis=1)\n",
"\n",
"\n",
"### Define columns of interest\n",
"\n",
"#### FBref players\n",
"lst_cols_fbref_players = ['player_name_fbref',\n",
" 'fbref_id',\n",
" 'url_fbref',\n",
" 'first_initial_lower',\n",
" 'first_name_lower',\n",
" 'last_name_lower',\n",
" 'birth_year',\n",
" 'country_lower',\n",
" 'outfielder_goalkeeper',\n",
" 'season'\n",
" ]\n",
"\n",
"#### TM Bio-Status, Valuations, and Transfers\n",
"lst_cols_tm = ['player_name_tm',\n",
" 'url_tm',\n",
" 'tm_id',\n",
" 'first_initial_lower',\n",
" 'first_name_lower',\n",
" 'last_name_lower',\n",
" 'birth_year',\n",
" 'country_lower',\n",
" 'outfielder_goalkeeper',\n",
" ]\n",
"\n",
"\n",
"### Combine all columns of interest into a single list\n",
"lst_fbref_tm_select = list(lst_cols_fbref_players)\n",
"lst_fbref_tm_select.extend(x for x in lst_cols_tm if x not in lst_fbref_tm_select)\n",
"\n",
"\n",
"### Determine columns not of interest as separate list\n",
"lst_fbref_tm_non_select = list(set(list(df_merge_fbref_tm.columns)) - set(lst_fbref_tm_select))\n",
"\n",
"### Define all columns\n",
"lst_fbref_tm_all = list(df_merge_fbref_tm.columns)\n",
"\n",
"\n",
"## Select columns of interest\n",
"df_merge_fbref_tm_select = df_merge_fbref_tm[lst_fbref_tm_select]"
]
},
{
"cell_type": "code",
"execution_count": 98,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"No. rows in FBref Players DataFrame before join to merged TM data: 12753\n",
"No. rows in DataFrame AFTER join: 12753\n",
"\n",
"----------\n",
"\n",
"Variance in rows before and after join: 0\n",
"\n"
]
}
],
"source": [
"print('No. rows in FBref Players DataFrame before join to merged TM data: {}'.format(len(df_fbref_merge)))\n",
"print('No. rows in DataFrame AFTER join: {}\\n'.format(len(df_merge_fbref_tm_select)))\n",
"print('-'*10+'\\n')\n",
"print('Variance in rows before and after join: {}\\n'.format(len(df_merge_fbref_tm_select) - len(df_fbref_merge)))"
]
},
{
"cell_type": "code",
"execution_count": 99,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" Nation | \n",
" Pos | \n",
" Squad | \n",
" Comp | \n",
" Age | \n",
" birth_year | \n",
" MP | \n",
" Starts | \n",
" Min | \n",
" 90s | \n",
" Gls | \n",
" Ast | \n",
" G-PK | \n",
" PK | \n",
" PKatt | \n",
" CrdY | \n",
" CrdR | \n",
" Gls.1 | \n",
" Ast.1 | \n",
" G+A | \n",
" G-PK.1 | \n",
" G+A-PK | \n",
" xG | \n",
" npxG | \n",
" xA | \n",
" npxG+xA | \n",
" xG.1 | \n",
" xA.1 | \n",
" xG+xA | \n",
" npxG.1 | \n",
" npxG+xA.1 | \n",
" Matches | \n",
" Sh | \n",
" SoT | \n",
" SoT% | \n",
" Sh/90 | \n",
" SoT/90 | \n",
" G/Sh | \n",
" G/SoT | \n",
" Dist | \n",
" FK | \n",
" npxG/Sh | \n",
" G-xG | \n",
" np:G-xG | \n",
" Cmp | \n",
" Att | \n",
" Cmp% | \n",
" TotDist | \n",
" PrgDist | \n",
" Cmp.1 | \n",
" Att.1 | \n",
" Cmp%.1 | \n",
" Cmp.2 | \n",
" Att.2 | \n",
" Cmp%.2 | \n",
" Cmp.3 | \n",
" Att.3 | \n",
" Cmp%.3 | \n",
" A-xA | \n",
" KP | \n",
" 1/3 | \n",
" PPA | \n",
" CrsPA | \n",
" Prog | \n",
" Live | \n",
" Dead | \n",
" TB | \n",
" Press | \n",
" Sw | \n",
" Crs | \n",
" CK | \n",
" In | \n",
" Out | \n",
" Str | \n",
" Ground | \n",
" Low | \n",
" High | \n",
" Left | \n",
" Right | \n",
" Head | \n",
" TI | \n",
" Other | \n",
" Off | \n",
" Out.1 | \n",
" Int | \n",
" Blocks | \n",
" SCA | \n",
" SCA90 | \n",
" PassLive | \n",
" PassDead | \n",
" Drib | \n",
" Fld | \n",
" Def | \n",
" GCA | \n",
" GCA90 | \n",
" PassLive.1 | \n",
" PassDead.1 | \n",
" Drib.1 | \n",
" Sh.1 | \n",
" Fld.1 | \n",
" Def.1 | \n",
" Tkl | \n",
" TklW | \n",
" Def 3rd | \n",
" Mid 3rd | \n",
" Att 3rd | \n",
" Tkl.1 | \n",
" Tkl% | \n",
" Past | \n",
" Succ | \n",
" % | \n",
" Def 3rd.1 | \n",
" Mid 3rd.1 | \n",
" Att 3rd.1 | \n",
" ShSv | \n",
" Pass | \n",
" Tkl+Int | \n",
" Clr | \n",
" Err | \n",
" Touches | \n",
" Def Pen | \n",
" Att Pen | \n",
" Succ% | \n",
" #Pl | \n",
" Megs | \n",
" Carries | \n",
" CPA | \n",
" Mis | \n",
" Dis | \n",
" Targ | \n",
" Rec | \n",
" Rec% | \n",
" Prog.1 | \n",
" Mn/MP | \n",
" Min% | \n",
" Mn/Start | \n",
" Compl | \n",
" Subs | \n",
" Mn/Sub | \n",
" unSub | \n",
" PPM | \n",
" onG | \n",
" onGA | \n",
" +/- | \n",
" +/-90 | \n",
" On-Off | \n",
" onxG | \n",
" onxGA | \n",
" xG+/- | \n",
" xG+/-90 | \n",
" On-Off.1 | \n",
" 2CrdY | \n",
" Fls | \n",
" PKwon | \n",
" PKcon | \n",
" OG | \n",
" Recov | \n",
" Won | \n",
" Lost | \n",
" Won% | \n",
" season | \n",
" Team Name | \n",
" Team Country | \n",
" Player Lower | \n",
" First Name Lower | \n",
" Last Name Lower | \n",
" First Initial Lower | \n",
" Team Country Lower | \n",
" Nationality Code | \n",
" Nationality Cleaned | \n",
" Primary Pos | \n",
" Position Grouped | \n",
" outfielder_goalkeeper | \n",
" GA | \n",
" GA90 | \n",
" SoTA | \n",
" Saves | \n",
" Save% | \n",
" W | \n",
" D | \n",
" L | \n",
" CS | \n",
" CS% | \n",
" PKA | \n",
" PKsv | \n",
" PKm | \n",
" Save%.1 | \n",
" PSxG | \n",
" PSxG/SoT | \n",
" PSxG+/- | \n",
" /90 | \n",
" Thr | \n",
" Launch% | \n",
" AvgLen | \n",
" Launch%.1 | \n",
" AvgLen.1 | \n",
" Opp | \n",
" Stp | \n",
" Stp% | \n",
" #OPA | \n",
" #OPA/90 | \n",
" AvgDist | \n",
" player_name_lower | \n",
" first_name_lower | \n",
" last_name_lower | \n",
" first_initial_lower | \n",
" country_lower | \n",
" player_name_fbref | \n",
" url_fbref | \n",
" url_tm | \n",
" TmPos | \n",
" tm_id | \n",
" fbref_id | \n",
" player_name_tm | \n",
" club | \n",
" current_club | \n",
" league_code | \n",
" current_age | \n",
" market_value_gbp | \n",
" market_value_eur | \n",
" dob | \n",
" pob | \n",
" position | \n",
" position_code | \n",
" position_grouped | \n",
" height | \n",
" foot | \n",
" citizenship | \n",
" second_citizenship | \n",
" player_agent | \n",
" birth_day | \n",
" birth_month | \n",
" cob | \n",
" current_club_country | \n",
" market_value_euros | \n",
" joined | \n",
" contract_expires | \n",
" contract_option | \n",
" on_loan_from | \n",
" on_loan_from_country | \n",
" loan_contract_expiry | \n",
" name_lower | \n",
" firstname_lower | \n",
" lastname_lower | \n",
" firstinitial_lower | \n",
" league_country_lower | \n",
" age | \n",
" age_when_joining | \n",
" years_since_joining | \n",
" years_until_contract_expiry | \n",
" market_value_pounds | \n",
" club_name | \n",
" club_involved_name | \n",
" fee | \n",
" transfer_movement | \n",
" transfer_period | \n",
" fee_cleaned | \n",
" league_name | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" ie IRL | \n",
" FW | \n",
" Brighton | \n",
" Premier League | \n",
" 19 | \n",
" 2000.0 | \n",
" 24 | \n",
" 14 | \n",
" 1258.0 | \n",
" 14.0 | \n",
" 3 | \n",
" 1 | \n",
" 3 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0.21 | \n",
" 0.07 | \n",
" 0.29 | \n",
" 0.21 | \n",
" 0.29 | \n",
" 3.2 | \n",
" 3.2 | \n",
" 0.3 | \n",
" 3.5 | \n",
" 0.23 | \n",
" 0.02 | \n",
" 0.25 | \n",
" 0.23 | \n",
" 0.25 | \n",
" Matches | \n",
" 38.0 | \n",
" 13.0 | \n",
" 34.2 | \n",
" 2.72 | \n",
" 0.93 | \n",
" 0.08 | \n",
" 0.23 | \n",
" 15.9 | \n",
" 0.0 | \n",
" 0.08 | \n",
" -0.2 | \n",
" -0.2 | \n",
" 126.0 | \n",
" 163.0 | \n",
" 77.3 | \n",
" 1739.0 | \n",
" 242.0 | \n",
" 76.0 | \n",
" 92.0 | \n",
" 82.6 | \n",
" 31.0 | \n",
" 39.0 | \n",
" 79.5 | \n",
" 7.0 | \n",
" 11.0 | \n",
" 63.6 | \n",
" 0.7 | \n",
" 6.0 | \n",
" 6.0 | \n",
" 2.0 | \n",
" 0.0 | \n",
" 10.0 | \n",
" 148.0 | \n",
" 15.0 | \n",
" 1.0 | \n",
" 50.0 | \n",
" 0.0 | \n",
" 7.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 90.0 | \n",
" 52.0 | \n",
" 21.0 | \n",
" 27.0 | \n",
" 107.0 | \n",
" 13.0 | \n",
" 1.0 | \n",
" 6.0 | \n",
" 0.0 | \n",
" 1.0 | \n",
" 4.0 | \n",
" 10.0 | \n",
" 25.0 | \n",
" 1.79 | \n",
" 7.0 | \n",
" 0.0 | \n",
" 3.0 | \n",
" 9.0 | \n",
" 3.0 | \n",
" 5.0 | \n",
" 0.36 | \n",
" 1.0 | \n",
" 0.0 | \n",
" 1.0 | \n",
" 1.0 | \n",
" 2.0 | \n",
" 0.0 | \n",
" 12.0 | \n",
" 8.0 | \n",
" 1.0 | \n",
" 5.0 | \n",
" 6.0 | \n",
" 3.0 | \n",
" 25.0 | \n",
" 9.0 | \n",
" 69.0 | \n",
" 29.5 | \n",
" 14.0 | \n",
" 94.0 | \n",
" 126.0 | \n",
" 0.0 | \n",
" 7.0 | \n",
" 17.0 | \n",
" 1.0 | \n",
" 0.0 | \n",
" 349.0 | \n",
" 2.0 | \n",
" 61.0 | \n",
" 37.5 | \n",
" 6.0 | \n",
" 1.0 | \n",
" 228.0 | \n",
" 12.0 | \n",
" 42.0 | \n",
" 34.0 | \n",
" 535.0 | \n",
" 235.0 | \n",
" 43.9 | \n",
" 99.0 | \n",
" 52 | \n",
" 36.8 | \n",
" 72.0 | \n",
" 0.0 | \n",
" 10 | \n",
" 26.0 | \n",
" 4 | \n",
" 1.13 | \n",
" 18.0 | \n",
" 22.0 | \n",
" -4.0 | \n",
" -0.29 | \n",
" 0.17 | \n",
" 15.6 | \n",
" 19.8 | \n",
" -4.2 | \n",
" -0.30 | \n",
" 0.08 | \n",
" 0.0 | \n",
" 16 | \n",
" 2.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 54.0 | \n",
" 14.0 | \n",
" 48.0 | \n",
" 22.6 | \n",
" 2019/2020 | \n",
" Brighton | \n",
" England | \n",
" aaron connolly | \n",
" aaron | \n",
" connolly | \n",
" a | \n",
" england | \n",
" IRL | \n",
" Ireland | \n",
" FW | \n",
" Forward | \n",
" Outfielder | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" aaron connolly | \n",
" aaron | \n",
" connolly | \n",
" a | \n",
" ireland | \n",
" Aaron Connolly | \n",
" https://fbref.com/en/players/27c01749/Aaron-Co... | \n",
" https://www.transfermarkt.com/aaron-connolly/p... | \n",
" Centre-Forward | \n",
" 434207 | \n",
" 27c01749 | \n",
" aaron connolly | \n",
" Brighton Hove Albion | \n",
" brighton & hove albion | \n",
" GB1 | \n",
" 21.0 | \n",
" 4050000.0 | \n",
" 4500000.0 | \n",
" 2000-01-28 | \n",
" Galway | \n",
" attack - Centre-Forward | \n",
" ST | \n",
" Forward | \n",
" 175.0 | \n",
" right | \n",
" Ireland | \n",
" NaN | \n",
" PLG | \n",
" 28.0 | \n",
" 1.0 | \n",
" Ireland | \n",
" england | \n",
" 7000000.0 | \n",
" 2019-07-01 | \n",
" 2024-06-30 | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" aaron connolly | \n",
" aaron | \n",
" connolly | \n",
" a | \n",
" england | \n",
" 21.0 | \n",
" 19.0 | \n",
" 2.0 | \n",
" 2.0 | \n",
" 6300000.0 | \n",
" Brighton & Hove Albion | \n",
" Brighton U23 | \n",
" - | \n",
" in | \n",
" Summer | \n",
" 0.0 | \n",
" Premier League | \n",
"
\n",
" \n",
" 1 | \n",
" ie IRL | \n",
" FW | \n",
" Brighton | \n",
" Premier League | \n",
" 20 | \n",
" 2000.0 | \n",
" 17 | \n",
" 9 | \n",
" 791.0 | \n",
" 8.8 | \n",
" 2 | \n",
" 1 | \n",
" 2 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0.23 | \n",
" 0.11 | \n",
" 0.34 | \n",
" 0.23 | \n",
" 0.34 | \n",
" 3.5 | \n",
" 3.5 | \n",
" 0.2 | \n",
" 3.7 | \n",
" 0.40 | \n",
" 0.02 | \n",
" 0.42 | \n",
" 0.40 | \n",
" 0.42 | \n",
" Matches | \n",
" 23.0 | \n",
" 8.0 | \n",
" 34.8 | \n",
" 2.62 | \n",
" 0.91 | \n",
" 0.09 | \n",
" 0.25 | \n",
" 13.7 | \n",
" 0.0 | \n",
" 0.15 | \n",
" -1.5 | \n",
" -1.5 | \n",
" 79.0 | \n",
" 101.0 | \n",
" 78.2 | \n",
" 1147.0 | \n",
" 165.0 | \n",
" 45.0 | \n",
" 56.0 | \n",
" 80.4 | \n",
" 26.0 | \n",
" 30.0 | \n",
" 86.7 | \n",
" 4.0 | \n",
" 5.0 | \n",
" 80.0 | \n",
" 0.8 | \n",
" 5.0 | \n",
" 2.0 | \n",
" 1.0 | \n",
" 0.0 | \n",
" 3.0 | \n",
" 91.0 | \n",
" 10.0 | \n",
" 0.0 | \n",
" 22.0 | \n",
" 1.0 | \n",
" 2.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 64.0 | \n",
" 26.0 | \n",
" 11.0 | \n",
" 11.0 | \n",
" 74.0 | \n",
" 5.0 | \n",
" 0.0 | \n",
" 3.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 2.0 | \n",
" 4.0 | \n",
" 12.0 | \n",
" 1.37 | \n",
" 7.0 | \n",
" 0.0 | \n",
" 3.0 | \n",
" 2.0 | \n",
" 0.0 | \n",
" 1.0 | \n",
" 0.11 | \n",
" 1.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 7.0 | \n",
" 5.0 | \n",
" 2.0 | \n",
" 4.0 | \n",
" 1.0 | \n",
" 1.0 | \n",
" 20.0 | \n",
" 4.0 | \n",
" 40.0 | \n",
" 32.3 | \n",
" 7.0 | \n",
" 58.0 | \n",
" 59.0 | \n",
" 0.0 | \n",
" 8.0 | \n",
" 7.0 | \n",
" 1.0 | \n",
" 0.0 | \n",
" 201.0 | \n",
" 1.0 | \n",
" 38.0 | \n",
" 80.0 | \n",
" 8.0 | \n",
" 0.0 | \n",
" 124.0 | \n",
" 4.0 | \n",
" 29.0 | \n",
" 15.0 | \n",
" 357.0 | \n",
" 143.0 | \n",
" 40.1 | \n",
" 64.0 | \n",
" 47 | \n",
" 23.1 | \n",
" 68.0 | \n",
" NaN | \n",
" 8 | \n",
" 23.0 | \n",
" 11 | \n",
" 0.88 | \n",
" 12.0 | \n",
" 17.0 | \n",
" -5.0 | \n",
" -0.57 | \n",
" -0.53 | \n",
" 13.8 | \n",
" 7.8 | \n",
" 6.0 | \n",
" 0.69 | \n",
" 0.42 | \n",
" 0.0 | \n",
" 5 | \n",
" 1.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 28.0 | \n",
" 11.0 | \n",
" 30.0 | \n",
" 26.8 | \n",
" 2020/2021 | \n",
" Brighton | \n",
" England | \n",
" aaron connolly | \n",
" aaron | \n",
" connolly | \n",
" a | \n",
" england | \n",
" IRL | \n",
" Ireland | \n",
" FW | \n",
" Forward | \n",
" Outfielder | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" aaron connolly | \n",
" aaron | \n",
" connolly | \n",
" a | \n",
" ireland | \n",
" Aaron Connolly | \n",
" https://fbref.com/en/players/27c01749/Aaron-Co... | \n",
" https://www.transfermarkt.com/aaron-connolly/p... | \n",
" Centre-Forward | \n",
" 434207 | \n",
" 27c01749 | \n",
" aaron connolly | \n",
" Brighton Hove Albion | \n",
" brighton & hove albion | \n",
" GB1 | \n",
" 21.0 | \n",
" 6300000.0 | \n",
" 7000000.0 | \n",
" 2000-01-28 | \n",
" Galway | \n",
" attack - Centre-Forward | \n",
" ST | \n",
" Forward | \n",
" 175.0 | \n",
" right | \n",
" Ireland | \n",
" NaN | \n",
" PLG | \n",
" 28.0 | \n",
" 1.0 | \n",
" Ireland | \n",
" england | \n",
" 7000000.0 | \n",
" 2019-07-01 | \n",
" 2024-06-30 | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" aaron connolly | \n",
" aaron | \n",
" connolly | \n",
" a | \n",
" england | \n",
" 21.0 | \n",
" 19.0 | \n",
" 2.0 | \n",
" 2.0 | \n",
" 6300000.0 | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
"
\n",
" \n",
" 2 | \n",
" ie IRL | \n",
" FW | \n",
" Brighton | \n",
" Premier League | \n",
" 21 | \n",
" 2000.0 | \n",
" 1 | \n",
" 0 | \n",
" 45.0 | \n",
" 0.5 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0.00 | \n",
" 0.00 | \n",
" 0.00 | \n",
" 0.00 | \n",
" 0.00 | \n",
" 0.4 | \n",
" 0.4 | \n",
" 0.0 | \n",
" 0.4 | \n",
" 0.85 | \n",
" 0.00 | \n",
" 0.85 | \n",
" 0.85 | \n",
" 0.85 | \n",
" Matches | \n",
" 1.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 2.00 | \n",
" 0.00 | \n",
" 0.00 | \n",
" NaN | \n",
" 9.0 | \n",
" 0.0 | \n",
" 0.42 | \n",
" -0.4 | \n",
" -0.4 | \n",
" 2.0 | \n",
" 3.0 | \n",
" 66.7 | \n",
" 14.0 | \n",
" 0.0 | \n",
" 2.0 | \n",
" 2.0 | \n",
" 100.0 | \n",
" 0.0 | \n",
" 1.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" NaN | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 3.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 1.0 | \n",
" 0.0 | \n",
" 1.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 2.0 | \n",
" 1.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 2.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 1.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 1.0 | \n",
" 2.00 | \n",
" 1.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.00 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" NaN | \n",
" 0.0 | \n",
" 1.0 | \n",
" 8.3 | \n",
" 1.0 | \n",
" 6.0 | \n",
" 5.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 8.0 | \n",
" 0.0 | \n",
" 2.0 | \n",
" NaN | \n",
" 0.0 | \n",
" 0.0 | \n",
" 5.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 1.0 | \n",
" 20.0 | \n",
" 4.0 | \n",
" 20.0 | \n",
" 2.0 | \n",
" 45 | \n",
" 16.7 | \n",
" NaN | \n",
" 0.0 | \n",
" 1 | \n",
" 45.0 | \n",
" 1 | \n",
" 3.00 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.00 | \n",
" -0.40 | \n",
" 1.0 | \n",
" 0.7 | \n",
" 0.3 | \n",
" 0.68 | \n",
" 0.74 | \n",
" 0.0 | \n",
" 0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 3.0 | \n",
" 0.0 | \n",
" 2.0 | \n",
" 0.0 | \n",
" 2021/2022 | \n",
" Brighton | \n",
" England | \n",
" aaron connolly | \n",
" aaron | \n",
" connolly | \n",
" a | \n",
" england | \n",
" IRL | \n",
" Ireland | \n",
" FW | \n",
" Forward | \n",
" Outfielder | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" aaron connolly | \n",
" aaron | \n",
" connolly | \n",
" a | \n",
" ireland | \n",
" Aaron Connolly | \n",
" https://fbref.com/en/players/27c01749/Aaron-Co... | \n",
" https://www.transfermarkt.com/aaron-connolly/p... | \n",
" Centre-Forward | \n",
" 434207 | \n",
" 27c01749 | \n",
" aaron connolly | \n",
" Brighton Hove Albion | \n",
" brighton & hove albion | \n",
" GB1 | \n",
" 21.0 | \n",
" 6300000.0 | \n",
" 7000000.0 | \n",
" 2000-01-28 | \n",
" Galway | \n",
" attack - Centre-Forward | \n",
" ST | \n",
" Forward | \n",
" 175.0 | \n",
" right | \n",
" Ireland | \n",
" NaN | \n",
" PLG | \n",
" 28.0 | \n",
" 1.0 | \n",
" Ireland | \n",
" england | \n",
" 7000000.0 | \n",
" 2019-07-01 | \n",
" 2024-06-30 | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" aaron connolly | \n",
" aaron | \n",
" connolly | \n",
" a | \n",
" england | \n",
" 21.0 | \n",
" 19.0 | \n",
" 2.0 | \n",
" 2.0 | \n",
" 6300000.0 | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
"
\n",
" \n",
" 3 | \n",
" eng ENG | \n",
" DF | \n",
" West Ham | \n",
" Premier League | \n",
" 27 | \n",
" 1989.0 | \n",
" 36 | \n",
" 35 | \n",
" 3069.0 | \n",
" 34.1 | \n",
" 1 | \n",
" 3 | \n",
" 1 | \n",
" 0 | \n",
" 0 | \n",
" 7 | \n",
" 0 | \n",
" 0.03 | \n",
" 0.09 | \n",
" 0.12 | \n",
" 0.03 | \n",
" 0.12 | \n",
" 0.8 | \n",
" 0.8 | \n",
" 2.8 | \n",
" 3.6 | \n",
" 0.02 | \n",
" 0.08 | \n",
" 0.10 | \n",
" 0.02 | \n",
" 0.10 | \n",
" Matches | \n",
" 21.0 | \n",
" 6.0 | \n",
" 28.6 | \n",
" 0.62 | \n",
" 0.18 | \n",
" 0.05 | \n",
" 0.17 | \n",
" 28.1 | \n",
" 8.0 | \n",
" 0.04 | \n",
" 0.2 | \n",
" 0.2 | \n",
" 1224.0 | \n",
" 1708.0 | \n",
" 71.7 | \n",
" 23519.0 | \n",
" 10212.0 | \n",
" 560.0 | \n",
" 623.0 | \n",
" 89.9 | \n",
" 472.0 | \n",
" 587.0 | \n",
" 80.4 | \n",
" 183.0 | \n",
" 449.0 | \n",
" 40.8 | \n",
" 0.2 | \n",
" 35.0 | \n",
" 117.0 | \n",
" 21.0 | \n",
" 14.0 | \n",
" 96.0 | \n",
" 1343.0 | \n",
" 365.0 | \n",
" 1.0 | \n",
" 222.0 | \n",
" 83.0 | \n",
" 93.0 | \n",
" 67.0 | \n",
" 35.0 | \n",
" 15.0 | \n",
" 9.0 | \n",
" 893.0 | \n",
" 293.0 | \n",
" 522.0 | \n",
" 1329.0 | \n",
" 78.0 | \n",
" 59.0 | \n",
" 210.0 | \n",
" 5.0 | \n",
" 15.0 | \n",
" 44.0 | \n",
" 39.0 | \n",
" 52.0 | \n",
" 62.0 | \n",
" 1.82 | \n",
" 35.0 | \n",
" 21.0 | \n",
" 1.0 | \n",
" 3.0 | \n",
" 0.0 | \n",
" 9.0 | \n",
" 0.26 | \n",
" 6.0 | \n",
" 3.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 38.0 | \n",
" 18.0 | \n",
" 15.0 | \n",
" 18.0 | \n",
" 5.0 | \n",
" 17.0 | \n",
" 53.1 | \n",
" 15.0 | \n",
" 115.0 | \n",
" 32.1 | \n",
" 181.0 | \n",
" 123.0 | \n",
" 54.0 | \n",
" 0.0 | \n",
" 38.0 | \n",
" 90.0 | \n",
" 133.0 | \n",
" 0.0 | \n",
" 2050.0 | \n",
" 125.0 | \n",
" 17.0 | \n",
" 33.3 | \n",
" 7.0 | \n",
" 0.0 | \n",
" 1071.0 | \n",
" 2.0 | \n",
" 18.0 | \n",
" 19.0 | \n",
" 1171.0 | \n",
" 1094.0 | \n",
" 93.4 | \n",
" 31.0 | \n",
" 85 | \n",
" 89.7 | \n",
" NaN | \n",
" 30.0 | \n",
" 1 | \n",
" NaN | \n",
" 1 | \n",
" 1.14 | \n",
" 45.0 | \n",
" 60.0 | \n",
" -15.0 | \n",
" -0.44 | \n",
" 0.84 | \n",
" 38.0 | \n",
" 51.5 | \n",
" -13.5 | \n",
" -0.40 | \n",
" 1.09 | \n",
" 0.0 | \n",
" 20 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 277.0 | \n",
" 70.0 | \n",
" 57.0 | \n",
" 55.1 | \n",
" 2017/2018 | \n",
" West Ham | \n",
" England | \n",
" aaron cresswell | \n",
" aaron | \n",
" cresswell | \n",
" a | \n",
" england | \n",
" ENG | \n",
" England | \n",
" DF | \n",
" Defender | \n",
" Outfielder | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" aaron cresswell | \n",
" aaron | \n",
" cresswell | \n",
" a | \n",
" england | \n",
" Aaron Cresswell | \n",
" https://fbref.com/en/players/4f974391/Aaron-Cr... | \n",
" https://www.transfermarkt.com/aaron-cresswell/... | \n",
" Left-Back | \n",
" 92571 | \n",
" 4f974391 | \n",
" aaron cresswell | \n",
" West Ham United | \n",
" west ham united | \n",
" GB1 | \n",
" 31.0 | \n",
" 10800000.0 | \n",
" 12000000.0 | \n",
" 1989-12-15 | \n",
" Liverpool | \n",
" Defender - Left-Back | \n",
" LB | \n",
" Defender | \n",
" 170.0 | \n",
" left | \n",
" England | \n",
" NaN | \n",
" Unique Sports Management | \n",
" 15.0 | \n",
" 12.0 | \n",
" England | \n",
" england | \n",
" 5000000.0 | \n",
" 2014-07-03 | \n",
" 2023-06-30 | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" aaron cresswell | \n",
" aaron | \n",
" cresswell | \n",
" a | \n",
" england | \n",
" 31.0 | \n",
" 24.0 | \n",
" 7.0 | \n",
" 1.0 | \n",
" 4500000.0 | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
"
\n",
" \n",
" 4 | \n",
" eng ENG | \n",
" DF | \n",
" West Ham | \n",
" Premier League | \n",
" 28 | \n",
" 1989.0 | \n",
" 20 | \n",
" 18 | \n",
" 1589.0 | \n",
" 17.7 | \n",
" 0 | \n",
" 1 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 1 | \n",
" 0 | \n",
" 0.00 | \n",
" 0.06 | \n",
" 0.06 | \n",
" 0.00 | \n",
" 0.06 | \n",
" 0.5 | \n",
" 0.5 | \n",
" 0.9 | \n",
" 1.4 | \n",
" 0.03 | \n",
" 0.05 | \n",
" 0.08 | \n",
" 0.03 | \n",
" 0.08 | \n",
" Matches | \n",
" 11.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.62 | \n",
" 0.00 | \n",
" 0.00 | \n",
" NaN | \n",
" 23.5 | \n",
" 2.0 | \n",
" 0.04 | \n",
" -0.5 | \n",
" -0.5 | \n",
" 842.0 | \n",
" 1070.0 | \n",
" 78.7 | \n",
" 13627.0 | \n",
" 5572.0 | \n",
" 453.0 | \n",
" 501.0 | \n",
" 90.4 | \n",
" 307.0 | \n",
" 371.0 | \n",
" 82.7 | \n",
" 64.0 | \n",
" 140.0 | \n",
" 45.7 | \n",
" 0.1 | \n",
" 16.0 | \n",
" 55.0 | \n",
" 15.0 | \n",
" 5.0 | \n",
" 65.0 | \n",
" 854.0 | \n",
" 216.0 | \n",
" 0.0 | \n",
" 168.0 | \n",
" 18.0 | \n",
" 46.0 | \n",
" 10.0 | \n",
" 0.0 | \n",
" 2.0 | \n",
" 0.0 | \n",
" 642.0 | \n",
" 235.0 | \n",
" 193.0 | \n",
" 787.0 | \n",
" 51.0 | \n",
" 27.0 | \n",
" 190.0 | \n",
" 4.0 | \n",
" 2.0 | \n",
" 21.0 | \n",
" 27.0 | \n",
" 44.0 | \n",
" 29.0 | \n",
" 1.64 | \n",
" 19.0 | \n",
" 6.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 1.0 | \n",
" 2.0 | \n",
" 0.11 | \n",
" 0.0 | \n",
" 2.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 30.0 | \n",
" 19.0 | \n",
" 14.0 | \n",
" 12.0 | \n",
" 4.0 | \n",
" 12.0 | \n",
" 42.9 | \n",
" 16.0 | \n",
" 68.0 | \n",
" 31.5 | \n",
" 129.0 | \n",
" 59.0 | \n",
" 28.0 | \n",
" 0.0 | \n",
" 39.0 | \n",
" 49.0 | \n",
" 60.0 | \n",
" 1.0 | \n",
" 1266.0 | \n",
" 78.0 | \n",
" 36.0 | \n",
" 63.6 | \n",
" 7.0 | \n",
" 1.0 | \n",
" 723.0 | \n",
" 8.0 | \n",
" 11.0 | \n",
" 13.0 | \n",
" 797.0 | \n",
" 715.0 | \n",
" 89.7 | \n",
" 43.0 | \n",
" 79 | \n",
" 46.5 | \n",
" 85.0 | \n",
" 16.0 | \n",
" 2 | \n",
" 30.0 | \n",
" 7 | \n",
" 1.30 | \n",
" 21.0 | \n",
" 26.0 | \n",
" -5.0 | \n",
" -0.28 | \n",
" -0.38 | \n",
" 20.1 | \n",
" 25.3 | \n",
" -5.3 | \n",
" -0.30 | \n",
" 0.12 | \n",
" 0.0 | \n",
" 2 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 169.0 | \n",
" 22.0 | \n",
" 14.0 | \n",
" 61.1 | \n",
" 2018/2019 | \n",
" West Ham | \n",
" England | \n",
" aaron cresswell | \n",
" aaron | \n",
" cresswell | \n",
" a | \n",
" england | \n",
" ENG | \n",
" England | \n",
" DF | \n",
" Defender | \n",
" Outfielder | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" aaron cresswell | \n",
" aaron | \n",
" cresswell | \n",
" a | \n",
" england | \n",
" Aaron Cresswell | \n",
" https://fbref.com/en/players/4f974391/Aaron-Cr... | \n",
" https://www.transfermarkt.com/aaron-cresswell/... | \n",
" Left-Back | \n",
" 92571 | \n",
" 4f974391 | \n",
" aaron cresswell | \n",
" West Ham United | \n",
" west ham united | \n",
" GB1 | \n",
" 31.0 | \n",
" 9000000.0 | \n",
" 10000000.0 | \n",
" 1989-12-15 | \n",
" Liverpool | \n",
" Defender - Left-Back | \n",
" LB | \n",
" Defender | \n",
" 170.0 | \n",
" left | \n",
" England | \n",
" NaN | \n",
" Unique Sports Management | \n",
" 15.0 | \n",
" 12.0 | \n",
" England | \n",
" england | \n",
" 5000000.0 | \n",
" 2014-07-03 | \n",
" 2023-06-30 | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" aaron cresswell | \n",
" aaron | \n",
" cresswell | \n",
" a | \n",
" england | \n",
" 31.0 | \n",
" 24.0 | \n",
" 7.0 | \n",
" 1.0 | \n",
" 4500000.0 | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" Nation Pos Squad Comp Age birth_year MP Starts Min \\\n",
"0 ie IRL FW Brighton Premier League 19 2000.0 24 14 1258.0 \n",
"1 ie IRL FW Brighton Premier League 20 2000.0 17 9 791.0 \n",
"2 ie IRL FW Brighton Premier League 21 2000.0 1 0 45.0 \n",
"3 eng ENG DF West Ham Premier League 27 1989.0 36 35 3069.0 \n",
"4 eng ENG DF West Ham Premier League 28 1989.0 20 18 1589.0 \n",
"\n",
" 90s Gls Ast G-PK PK PKatt CrdY CrdR Gls.1 Ast.1 G+A G-PK.1 \\\n",
"0 14.0 3 1 3 0 0 0 0 0.21 0.07 0.29 0.21 \n",
"1 8.8 2 1 2 0 0 0 0 0.23 0.11 0.34 0.23 \n",
"2 0.5 0 0 0 0 0 0 0 0.00 0.00 0.00 0.00 \n",
"3 34.1 1 3 1 0 0 7 0 0.03 0.09 0.12 0.03 \n",
"4 17.7 0 1 0 0 0 1 0 0.00 0.06 0.06 0.00 \n",
"\n",
" G+A-PK xG npxG xA npxG+xA xG.1 xA.1 xG+xA npxG.1 npxG+xA.1 \\\n",
"0 0.29 3.2 3.2 0.3 3.5 0.23 0.02 0.25 0.23 0.25 \n",
"1 0.34 3.5 3.5 0.2 3.7 0.40 0.02 0.42 0.40 0.42 \n",
"2 0.00 0.4 0.4 0.0 0.4 0.85 0.00 0.85 0.85 0.85 \n",
"3 0.12 0.8 0.8 2.8 3.6 0.02 0.08 0.10 0.02 0.10 \n",
"4 0.06 0.5 0.5 0.9 1.4 0.03 0.05 0.08 0.03 0.08 \n",
"\n",
" Matches Sh SoT SoT% Sh/90 SoT/90 G/Sh G/SoT Dist FK npxG/Sh \\\n",
"0 Matches 38.0 13.0 34.2 2.72 0.93 0.08 0.23 15.9 0.0 0.08 \n",
"1 Matches 23.0 8.0 34.8 2.62 0.91 0.09 0.25 13.7 0.0 0.15 \n",
"2 Matches 1.0 0.0 0.0 2.00 0.00 0.00 NaN 9.0 0.0 0.42 \n",
"3 Matches 21.0 6.0 28.6 0.62 0.18 0.05 0.17 28.1 8.0 0.04 \n",
"4 Matches 11.0 0.0 0.0 0.62 0.00 0.00 NaN 23.5 2.0 0.04 \n",
"\n",
" G-xG np:G-xG Cmp Att Cmp% TotDist PrgDist Cmp.1 Att.1 \\\n",
"0 -0.2 -0.2 126.0 163.0 77.3 1739.0 242.0 76.0 92.0 \n",
"1 -1.5 -1.5 79.0 101.0 78.2 1147.0 165.0 45.0 56.0 \n",
"2 -0.4 -0.4 2.0 3.0 66.7 14.0 0.0 2.0 2.0 \n",
"3 0.2 0.2 1224.0 1708.0 71.7 23519.0 10212.0 560.0 623.0 \n",
"4 -0.5 -0.5 842.0 1070.0 78.7 13627.0 5572.0 453.0 501.0 \n",
"\n",
" Cmp%.1 Cmp.2 Att.2 Cmp%.2 Cmp.3 Att.3 Cmp%.3 A-xA KP 1/3 \\\n",
"0 82.6 31.0 39.0 79.5 7.0 11.0 63.6 0.7 6.0 6.0 \n",
"1 80.4 26.0 30.0 86.7 4.0 5.0 80.0 0.8 5.0 2.0 \n",
"2 100.0 0.0 1.0 0.0 0.0 0.0 NaN 0.0 0.0 0.0 \n",
"3 89.9 472.0 587.0 80.4 183.0 449.0 40.8 0.2 35.0 117.0 \n",
"4 90.4 307.0 371.0 82.7 64.0 140.0 45.7 0.1 16.0 55.0 \n",
"\n",
" PPA CrsPA Prog Live Dead TB Press Sw Crs CK In Out \\\n",
"0 2.0 0.0 10.0 148.0 15.0 1.0 50.0 0.0 7.0 0.0 0.0 0.0 \n",
"1 1.0 0.0 3.0 91.0 10.0 0.0 22.0 1.0 2.0 0.0 0.0 0.0 \n",
"2 0.0 0.0 0.0 3.0 0.0 0.0 1.0 0.0 1.0 0.0 0.0 0.0 \n",
"3 21.0 14.0 96.0 1343.0 365.0 1.0 222.0 83.0 93.0 67.0 35.0 15.0 \n",
"4 15.0 5.0 65.0 854.0 216.0 0.0 168.0 18.0 46.0 10.0 0.0 2.0 \n",
"\n",
" Str Ground Low High Left Right Head TI Other Off Out.1 \\\n",
"0 0.0 90.0 52.0 21.0 27.0 107.0 13.0 1.0 6.0 0.0 1.0 \n",
"1 0.0 64.0 26.0 11.0 11.0 74.0 5.0 0.0 3.0 0.0 0.0 \n",
"2 0.0 2.0 1.0 0.0 0.0 2.0 0.0 0.0 1.0 0.0 0.0 \n",
"3 9.0 893.0 293.0 522.0 1329.0 78.0 59.0 210.0 5.0 15.0 44.0 \n",
"4 0.0 642.0 235.0 193.0 787.0 51.0 27.0 190.0 4.0 2.0 21.0 \n",
"\n",
" Int Blocks SCA SCA90 PassLive PassDead Drib Fld Def GCA GCA90 \\\n",
"0 4.0 10.0 25.0 1.79 7.0 0.0 3.0 9.0 3.0 5.0 0.36 \n",
"1 2.0 4.0 12.0 1.37 7.0 0.0 3.0 2.0 0.0 1.0 0.11 \n",
"2 0.0 0.0 1.0 2.00 1.0 0.0 0.0 0.0 0.0 0.0 0.00 \n",
"3 39.0 52.0 62.0 1.82 35.0 21.0 1.0 3.0 0.0 9.0 0.26 \n",
"4 27.0 44.0 29.0 1.64 19.0 6.0 0.0 0.0 1.0 2.0 0.11 \n",
"\n",
" PassLive.1 PassDead.1 Drib.1 Sh.1 Fld.1 Def.1 Tkl TklW Def 3rd \\\n",
"0 1.0 0.0 1.0 1.0 2.0 0.0 12.0 8.0 1.0 \n",
"1 1.0 0.0 0.0 0.0 0.0 0.0 7.0 5.0 2.0 \n",
"2 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 \n",
"3 6.0 3.0 0.0 0.0 0.0 0.0 38.0 18.0 15.0 \n",
"4 0.0 2.0 0.0 0.0 0.0 0.0 30.0 19.0 14.0 \n",
"\n",
" Mid 3rd Att 3rd Tkl.1 Tkl% Past Succ % Def 3rd.1 Mid 3rd.1 \\\n",
"0 5.0 6.0 3.0 25.0 9.0 69.0 29.5 14.0 94.0 \n",
"1 4.0 1.0 1.0 20.0 4.0 40.0 32.3 7.0 58.0 \n",
"2 0.0 0.0 0.0 NaN 0.0 1.0 8.3 1.0 6.0 \n",
"3 18.0 5.0 17.0 53.1 15.0 115.0 32.1 181.0 123.0 \n",
"4 12.0 4.0 12.0 42.9 16.0 68.0 31.5 129.0 59.0 \n",
"\n",
" Att 3rd.1 ShSv Pass Tkl+Int Clr Err Touches Def Pen Att Pen \\\n",
"0 126.0 0.0 7.0 17.0 1.0 0.0 349.0 2.0 61.0 \n",
"1 59.0 0.0 8.0 7.0 1.0 0.0 201.0 1.0 38.0 \n",
"2 5.0 0.0 0.0 0.0 0.0 0.0 8.0 0.0 2.0 \n",
"3 54.0 0.0 38.0 90.0 133.0 0.0 2050.0 125.0 17.0 \n",
"4 28.0 0.0 39.0 49.0 60.0 1.0 1266.0 78.0 36.0 \n",
"\n",
" Succ% #Pl Megs Carries CPA Mis Dis Targ Rec Rec% Prog.1 \\\n",
"0 37.5 6.0 1.0 228.0 12.0 42.0 34.0 535.0 235.0 43.9 99.0 \n",
"1 80.0 8.0 0.0 124.0 4.0 29.0 15.0 357.0 143.0 40.1 64.0 \n",
"2 NaN 0.0 0.0 5.0 0.0 0.0 1.0 20.0 4.0 20.0 2.0 \n",
"3 33.3 7.0 0.0 1071.0 2.0 18.0 19.0 1171.0 1094.0 93.4 31.0 \n",
"4 63.6 7.0 1.0 723.0 8.0 11.0 13.0 797.0 715.0 89.7 43.0 \n",
"\n",
" Mn/MP Min% Mn/Start Compl Subs Mn/Sub unSub PPM onG onGA +/- \\\n",
"0 52 36.8 72.0 0.0 10 26.0 4 1.13 18.0 22.0 -4.0 \n",
"1 47 23.1 68.0 NaN 8 23.0 11 0.88 12.0 17.0 -5.0 \n",
"2 45 16.7 NaN 0.0 1 45.0 1 3.00 0.0 0.0 0.0 \n",
"3 85 89.7 NaN 30.0 1 NaN 1 1.14 45.0 60.0 -15.0 \n",
"4 79 46.5 85.0 16.0 2 30.0 7 1.30 21.0 26.0 -5.0 \n",
"\n",
" +/-90 On-Off onxG onxGA xG+/- xG+/-90 On-Off.1 2CrdY Fls PKwon \\\n",
"0 -0.29 0.17 15.6 19.8 -4.2 -0.30 0.08 0.0 16 2.0 \n",
"1 -0.57 -0.53 13.8 7.8 6.0 0.69 0.42 0.0 5 1.0 \n",
"2 0.00 -0.40 1.0 0.7 0.3 0.68 0.74 0.0 0 0.0 \n",
"3 -0.44 0.84 38.0 51.5 -13.5 -0.40 1.09 0.0 20 0.0 \n",
"4 -0.28 -0.38 20.1 25.3 -5.3 -0.30 0.12 0.0 2 0.0 \n",
"\n",
" PKcon OG Recov Won Lost Won% season Team Name Team Country \\\n",
"0 0.0 0.0 54.0 14.0 48.0 22.6 2019/2020 Brighton England \n",
"1 0.0 0.0 28.0 11.0 30.0 26.8 2020/2021 Brighton England \n",
"2 0.0 0.0 3.0 0.0 2.0 0.0 2021/2022 Brighton England \n",
"3 0.0 0.0 277.0 70.0 57.0 55.1 2017/2018 West Ham England \n",
"4 0.0 0.0 169.0 22.0 14.0 61.1 2018/2019 West Ham England \n",
"\n",
" Player Lower First Name Lower Last Name Lower First Initial Lower \\\n",
"0 aaron connolly aaron connolly a \n",
"1 aaron connolly aaron connolly a \n",
"2 aaron connolly aaron connolly a \n",
"3 aaron cresswell aaron cresswell a \n",
"4 aaron cresswell aaron cresswell a \n",
"\n",
" Team Country Lower Nationality Code Nationality Cleaned Primary Pos \\\n",
"0 england IRL Ireland FW \n",
"1 england IRL Ireland FW \n",
"2 england IRL Ireland FW \n",
"3 england ENG England DF \n",
"4 england ENG England DF \n",
"\n",
" Position Grouped outfielder_goalkeeper GA GA90 SoTA Saves Save% W \\\n",
"0 Forward Outfielder NaN NaN NaN NaN NaN NaN \n",
"1 Forward Outfielder NaN NaN NaN NaN NaN NaN \n",
"2 Forward Outfielder NaN NaN NaN NaN NaN NaN \n",
"3 Defender Outfielder NaN NaN NaN NaN NaN NaN \n",
"4 Defender Outfielder NaN NaN NaN NaN NaN NaN \n",
"\n",
" D L CS CS% PKA PKsv PKm Save%.1 PSxG PSxG/SoT PSxG+/- /90 \\\n",
"0 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN \n",
"1 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN \n",
"2 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN \n",
"3 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN \n",
"4 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN \n",
"\n",
" Thr Launch% AvgLen Launch%.1 AvgLen.1 Opp Stp Stp% #OPA #OPA/90 \\\n",
"0 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN \n",
"1 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN \n",
"2 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN \n",
"3 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN \n",
"4 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN \n",
"\n",
" AvgDist player_name_lower first_name_lower last_name_lower \\\n",
"0 NaN aaron connolly aaron connolly \n",
"1 NaN aaron connolly aaron connolly \n",
"2 NaN aaron connolly aaron connolly \n",
"3 NaN aaron cresswell aaron cresswell \n",
"4 NaN aaron cresswell aaron cresswell \n",
"\n",
" first_initial_lower country_lower player_name_fbref \\\n",
"0 a ireland Aaron Connolly \n",
"1 a ireland Aaron Connolly \n",
"2 a ireland Aaron Connolly \n",
"3 a england Aaron Cresswell \n",
"4 a england Aaron Cresswell \n",
"\n",
" url_fbref \\\n",
"0 https://fbref.com/en/players/27c01749/Aaron-Co... \n",
"1 https://fbref.com/en/players/27c01749/Aaron-Co... \n",
"2 https://fbref.com/en/players/27c01749/Aaron-Co... \n",
"3 https://fbref.com/en/players/4f974391/Aaron-Cr... \n",
"4 https://fbref.com/en/players/4f974391/Aaron-Cr... \n",
"\n",
" url_tm TmPos tm_id \\\n",
"0 https://www.transfermarkt.com/aaron-connolly/p... Centre-Forward 434207 \n",
"1 https://www.transfermarkt.com/aaron-connolly/p... Centre-Forward 434207 \n",
"2 https://www.transfermarkt.com/aaron-connolly/p... Centre-Forward 434207 \n",
"3 https://www.transfermarkt.com/aaron-cresswell/... Left-Back 92571 \n",
"4 https://www.transfermarkt.com/aaron-cresswell/... Left-Back 92571 \n",
"\n",
" fbref_id player_name_tm club current_club \\\n",
"0 27c01749 aaron connolly Brighton Hove Albion brighton & hove albion \n",
"1 27c01749 aaron connolly Brighton Hove Albion brighton & hove albion \n",
"2 27c01749 aaron connolly Brighton Hove Albion brighton & hove albion \n",
"3 4f974391 aaron cresswell West Ham United west ham united \n",
"4 4f974391 aaron cresswell West Ham United west ham united \n",
"\n",
" league_code current_age market_value_gbp market_value_eur dob \\\n",
"0 GB1 21.0 4050000.0 4500000.0 2000-01-28 \n",
"1 GB1 21.0 6300000.0 7000000.0 2000-01-28 \n",
"2 GB1 21.0 6300000.0 7000000.0 2000-01-28 \n",
"3 GB1 31.0 10800000.0 12000000.0 1989-12-15 \n",
"4 GB1 31.0 9000000.0 10000000.0 1989-12-15 \n",
"\n",
" pob position position_code position_grouped height \\\n",
"0 Galway attack - Centre-Forward ST Forward 175.0 \n",
"1 Galway attack - Centre-Forward ST Forward 175.0 \n",
"2 Galway attack - Centre-Forward ST Forward 175.0 \n",
"3 Liverpool Defender - Left-Back LB Defender 170.0 \n",
"4 Liverpool Defender - Left-Back LB Defender 170.0 \n",
"\n",
" foot citizenship second_citizenship player_agent birth_day \\\n",
"0 right Ireland NaN PLG 28.0 \n",
"1 right Ireland NaN PLG 28.0 \n",
"2 right Ireland NaN PLG 28.0 \n",
"3 left England NaN Unique Sports Management 15.0 \n",
"4 left England NaN Unique Sports Management 15.0 \n",
"\n",
" birth_month cob current_club_country market_value_euros joined \\\n",
"0 1.0 Ireland england 7000000.0 2019-07-01 \n",
"1 1.0 Ireland england 7000000.0 2019-07-01 \n",
"2 1.0 Ireland england 7000000.0 2019-07-01 \n",
"3 12.0 England england 5000000.0 2014-07-03 \n",
"4 12.0 England england 5000000.0 2014-07-03 \n",
"\n",
" contract_expires contract_option on_loan_from on_loan_from_country \\\n",
"0 2024-06-30 NaN NaN NaN \n",
"1 2024-06-30 NaN NaN NaN \n",
"2 2024-06-30 NaN NaN NaN \n",
"3 2023-06-30 NaN NaN NaN \n",
"4 2023-06-30 NaN NaN NaN \n",
"\n",
" loan_contract_expiry name_lower firstname_lower lastname_lower \\\n",
"0 NaN aaron connolly aaron connolly \n",
"1 NaN aaron connolly aaron connolly \n",
"2 NaN aaron connolly aaron connolly \n",
"3 NaN aaron cresswell aaron cresswell \n",
"4 NaN aaron cresswell aaron cresswell \n",
"\n",
" firstinitial_lower league_country_lower age age_when_joining \\\n",
"0 a england 21.0 19.0 \n",
"1 a england 21.0 19.0 \n",
"2 a england 21.0 19.0 \n",
"3 a england 31.0 24.0 \n",
"4 a england 31.0 24.0 \n",
"\n",
" years_since_joining years_until_contract_expiry market_value_pounds \\\n",
"0 2.0 2.0 6300000.0 \n",
"1 2.0 2.0 6300000.0 \n",
"2 2.0 2.0 6300000.0 \n",
"3 7.0 1.0 4500000.0 \n",
"4 7.0 1.0 4500000.0 \n",
"\n",
" club_name club_involved_name fee transfer_movement \\\n",
"0 Brighton & Hove Albion Brighton U23 - in \n",
"1 NaN NaN NaN NaN \n",
"2 NaN NaN NaN NaN \n",
"3 NaN NaN NaN NaN \n",
"4 NaN NaN NaN NaN \n",
"\n",
" transfer_period fee_cleaned league_name \n",
"0 Summer 0.0 Premier League \n",
"1 NaN NaN NaN \n",
"2 NaN NaN NaN \n",
"3 NaN NaN NaN \n",
"4 NaN NaN NaN "
]
},
"execution_count": 99,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# Display DataFrame\n",
"df_merge_fbref_tm.head()"
]
},
{
"cell_type": "code",
"execution_count": 100,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" player_name_fbref | \n",
" fbref_id | \n",
" url_fbref | \n",
" first_initial_lower | \n",
" first_name_lower | \n",
" last_name_lower | \n",
" birth_year | \n",
" country_lower | \n",
" outfielder_goalkeeper | \n",
" season | \n",
" player_name_tm | \n",
" url_tm | \n",
" tm_id | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" Aaron Connolly | \n",
" 27c01749 | \n",
" https://fbref.com/en/players/27c01749/Aaron-Co... | \n",
" a | \n",
" aaron | \n",
" connolly | \n",
" 2000.0 | \n",
" ireland | \n",
" Outfielder | \n",
" 2019/2020 | \n",
" aaron connolly | \n",
" https://www.transfermarkt.com/aaron-connolly/p... | \n",
" 434207 | \n",
"
\n",
" \n",
" 1 | \n",
" Aaron Connolly | \n",
" 27c01749 | \n",
" https://fbref.com/en/players/27c01749/Aaron-Co... | \n",
" a | \n",
" aaron | \n",
" connolly | \n",
" 2000.0 | \n",
" ireland | \n",
" Outfielder | \n",
" 2020/2021 | \n",
" aaron connolly | \n",
" https://www.transfermarkt.com/aaron-connolly/p... | \n",
" 434207 | \n",
"
\n",
" \n",
" 2 | \n",
" Aaron Connolly | \n",
" 27c01749 | \n",
" https://fbref.com/en/players/27c01749/Aaron-Co... | \n",
" a | \n",
" aaron | \n",
" connolly | \n",
" 2000.0 | \n",
" ireland | \n",
" Outfielder | \n",
" 2021/2022 | \n",
" aaron connolly | \n",
" https://www.transfermarkt.com/aaron-connolly/p... | \n",
" 434207 | \n",
"
\n",
" \n",
" 3 | \n",
" Aaron Cresswell | \n",
" 4f974391 | \n",
" https://fbref.com/en/players/4f974391/Aaron-Cr... | \n",
" a | \n",
" aaron | \n",
" cresswell | \n",
" 1989.0 | \n",
" england | \n",
" Outfielder | \n",
" 2017/2018 | \n",
" aaron cresswell | \n",
" https://www.transfermarkt.com/aaron-cresswell/... | \n",
" 92571 | \n",
"
\n",
" \n",
" 4 | \n",
" Aaron Cresswell | \n",
" 4f974391 | \n",
" https://fbref.com/en/players/4f974391/Aaron-Cr... | \n",
" a | \n",
" aaron | \n",
" cresswell | \n",
" 1989.0 | \n",
" england | \n",
" Outfielder | \n",
" 2018/2019 | \n",
" aaron cresswell | \n",
" https://www.transfermarkt.com/aaron-cresswell/... | \n",
" 92571 | \n",
"
\n",
" \n",
" 5 | \n",
" Aaron Cresswell | \n",
" 4f974391 | \n",
" https://fbref.com/en/players/4f974391/Aaron-Cr... | \n",
" a | \n",
" aaron | \n",
" cresswell | \n",
" 1989.0 | \n",
" england | \n",
" Outfielder | \n",
" 2019/2020 | \n",
" aaron cresswell | \n",
" https://www.transfermarkt.com/aaron-cresswell/... | \n",
" 92571 | \n",
"
\n",
" \n",
" 6 | \n",
" Aaron Cresswell | \n",
" 4f974391 | \n",
" https://fbref.com/en/players/4f974391/Aaron-Cr... | \n",
" a | \n",
" aaron | \n",
" cresswell | \n",
" 1989.0 | \n",
" england | \n",
" Outfielder | \n",
" 2020/2021 | \n",
" aaron cresswell | \n",
" https://www.transfermarkt.com/aaron-cresswell/... | \n",
" 92571 | \n",
"
\n",
" \n",
" 7 | \n",
" Aaron Cresswell | \n",
" 4f974391 | \n",
" https://fbref.com/en/players/4f974391/Aaron-Cr... | \n",
" a | \n",
" aaron | \n",
" cresswell | \n",
" 1989.0 | \n",
" england | \n",
" Outfielder | \n",
" 2021/2022 | \n",
" aaron cresswell | \n",
" https://www.transfermarkt.com/aaron-cresswell/... | \n",
" 92571 | \n",
"
\n",
" \n",
" 8 | \n",
" Aaron Hickey | \n",
" 1780bb4a | \n",
" https://fbref.com/en/players/1780bb4a/Aaron-Hi... | \n",
" a | \n",
" aaron | \n",
" hickey | \n",
" 2002.0 | \n",
" scotland | \n",
" Outfielder | \n",
" 2020/2021 | \n",
" aaron hickey | \n",
" https://www.transfermarkt.com/aaron-hickey/pro... | \n",
" 591949 | \n",
"
\n",
" \n",
" 9 | \n",
" Aaron Hickey | \n",
" 1780bb4a | \n",
" https://fbref.com/en/players/1780bb4a/Aaron-Hi... | \n",
" a | \n",
" aaron | \n",
" hickey | \n",
" 2002.0 | \n",
" scotland | \n",
" Outfielder | \n",
" 2021/2022 | \n",
" aaron hickey | \n",
" https://www.transfermarkt.com/aaron-hickey/pro... | \n",
" 591949 | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" player_name_fbref fbref_id \\\n",
"0 Aaron Connolly 27c01749 \n",
"1 Aaron Connolly 27c01749 \n",
"2 Aaron Connolly 27c01749 \n",
"3 Aaron Cresswell 4f974391 \n",
"4 Aaron Cresswell 4f974391 \n",
"5 Aaron Cresswell 4f974391 \n",
"6 Aaron Cresswell 4f974391 \n",
"7 Aaron Cresswell 4f974391 \n",
"8 Aaron Hickey 1780bb4a \n",
"9 Aaron Hickey 1780bb4a \n",
"\n",
" url_fbref first_initial_lower \\\n",
"0 https://fbref.com/en/players/27c01749/Aaron-Co... a \n",
"1 https://fbref.com/en/players/27c01749/Aaron-Co... a \n",
"2 https://fbref.com/en/players/27c01749/Aaron-Co... a \n",
"3 https://fbref.com/en/players/4f974391/Aaron-Cr... a \n",
"4 https://fbref.com/en/players/4f974391/Aaron-Cr... a \n",
"5 https://fbref.com/en/players/4f974391/Aaron-Cr... a \n",
"6 https://fbref.com/en/players/4f974391/Aaron-Cr... a \n",
"7 https://fbref.com/en/players/4f974391/Aaron-Cr... a \n",
"8 https://fbref.com/en/players/1780bb4a/Aaron-Hi... a \n",
"9 https://fbref.com/en/players/1780bb4a/Aaron-Hi... a \n",
"\n",
" first_name_lower last_name_lower birth_year country_lower \\\n",
"0 aaron connolly 2000.0 ireland \n",
"1 aaron connolly 2000.0 ireland \n",
"2 aaron connolly 2000.0 ireland \n",
"3 aaron cresswell 1989.0 england \n",
"4 aaron cresswell 1989.0 england \n",
"5 aaron cresswell 1989.0 england \n",
"6 aaron cresswell 1989.0 england \n",
"7 aaron cresswell 1989.0 england \n",
"8 aaron hickey 2002.0 scotland \n",
"9 aaron hickey 2002.0 scotland \n",
"\n",
" outfielder_goalkeeper season player_name_tm \\\n",
"0 Outfielder 2019/2020 aaron connolly \n",
"1 Outfielder 2020/2021 aaron connolly \n",
"2 Outfielder 2021/2022 aaron connolly \n",
"3 Outfielder 2017/2018 aaron cresswell \n",
"4 Outfielder 2018/2019 aaron cresswell \n",
"5 Outfielder 2019/2020 aaron cresswell \n",
"6 Outfielder 2020/2021 aaron cresswell \n",
"7 Outfielder 2021/2022 aaron cresswell \n",
"8 Outfielder 2020/2021 aaron hickey \n",
"9 Outfielder 2021/2022 aaron hickey \n",
"\n",
" url_tm tm_id \n",
"0 https://www.transfermarkt.com/aaron-connolly/p... 434207 \n",
"1 https://www.transfermarkt.com/aaron-connolly/p... 434207 \n",
"2 https://www.transfermarkt.com/aaron-connolly/p... 434207 \n",
"3 https://www.transfermarkt.com/aaron-cresswell/... 92571 \n",
"4 https://www.transfermarkt.com/aaron-cresswell/... 92571 \n",
"5 https://www.transfermarkt.com/aaron-cresswell/... 92571 \n",
"6 https://www.transfermarkt.com/aaron-cresswell/... 92571 \n",
"7 https://www.transfermarkt.com/aaron-cresswell/... 92571 \n",
"8 https://www.transfermarkt.com/aaron-hickey/pro... 591949 \n",
"9 https://www.transfermarkt.com/aaron-hickey/pro... 591949 "
]
},
"execution_count": 100,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# Display DataFrame\n",
"df_merge_fbref_tm_select.head(10)"
]
},
{
"cell_type": "code",
"execution_count": 101,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"['player_name_fbref',\n",
" 'fbref_id',\n",
" 'url_fbref',\n",
" 'first_initial_lower',\n",
" 'first_name_lower',\n",
" 'last_name_lower',\n",
" 'birth_year',\n",
" 'country_lower',\n",
" 'outfielder_goalkeeper',\n",
" 'season',\n",
" 'player_name_tm',\n",
" 'url_tm',\n",
" 'tm_id']"
]
},
"execution_count": 101,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"lst_fbref_tm_select"
]
},
{
"cell_type": "code",
"execution_count": 102,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"['Def 3rd.1',\n",
" 'PK',\n",
" 'PKwon',\n",
" 'joined',\n",
" 'league_code',\n",
" 'current_club',\n",
" 'Thr',\n",
" '90s',\n",
" 'Carries',\n",
" 'Left',\n",
" 'Lost',\n",
" 'Err',\n",
" 'npxG+xA.1',\n",
" 'age_when_joining',\n",
" 'Cmp',\n",
" 'citizenship',\n",
" 'Stp',\n",
" 'Low',\n",
" 'onxGA',\n",
" 'High',\n",
" 'G-PK.1',\n",
" 'years_until_contract_expiry',\n",
" 'KP',\n",
" 'Dead',\n",
" 'Out',\n",
" 'Nationality Code',\n",
" 'G/SoT',\n",
" 'AvgDist',\n",
" 'Live',\n",
" 'GA90',\n",
" 'league_country_lower',\n",
" 'Drib.1',\n",
" 'Touches',\n",
" 'Sw',\n",
" 'Age',\n",
" 'TotDist',\n",
" 'Ast',\n",
" 'On-Off',\n",
" 'foot',\n",
" 'ShSv',\n",
" 'current_club_country',\n",
" 'Mis',\n",
" 'Starts',\n",
" 'second_citizenship',\n",
" 'Fld.1',\n",
" 'Mn/Start',\n",
" 'onxG',\n",
" 'Cmp.1',\n",
" 'Att.2',\n",
" 'transfer_period',\n",
" 'Gls',\n",
" 'G-PK',\n",
" '+/-',\n",
" 'Att 3rd',\n",
" 'OG',\n",
" 'TmPos',\n",
" 'In',\n",
" 'G/Sh',\n",
" 'SoTA',\n",
" 'npxG+xA',\n",
" 'Press',\n",
" 'age',\n",
" 'Other',\n",
" 'club',\n",
" 'PassDead.1',\n",
" 'Launch%.1',\n",
" 'Att.3',\n",
" 'On-Off.1',\n",
" 'CrdR',\n",
" 'xG+xA',\n",
" 'FK',\n",
" 'PSxG',\n",
" 'name_lower',\n",
" 'PassLive.1',\n",
" 'Targ',\n",
" 'onG',\n",
" 'Mid 3rd.1',\n",
" 'Launch%',\n",
" 'transfer_movement',\n",
" 'Tkl.1',\n",
" 'market_value_gbp',\n",
" 'unSub',\n",
" 'CPA',\n",
" 'MP',\n",
" 'Dis',\n",
" '#OPA/90',\n",
" 'Att Pen',\n",
" 'Recov',\n",
" 'np:G-xG',\n",
" 'Att',\n",
" 'contract_expires',\n",
" 'contract_option',\n",
" 'loan_contract_expiry',\n",
" 'league_name',\n",
" 'firstname_lower',\n",
" 'Dist',\n",
" 'player_name_lower',\n",
" 'lastname_lower',\n",
" 'Nation',\n",
" 'Won%',\n",
" '1/3',\n",
" 'PKm',\n",
" 'Mid 3rd',\n",
" 'xG+/-90',\n",
" 'CK',\n",
" 'L',\n",
" 'G+A-PK',\n",
" 'CS',\n",
" 'CS%',\n",
" 'SoT%',\n",
" 'Mn/Sub',\n",
" '+/-90',\n",
" 'market_value_eur',\n",
" 'Subs',\n",
" 'Position Grouped',\n",
" 'PSxG+/-',\n",
" 'Prog',\n",
" 'Ground',\n",
" 'on_loan_from_country',\n",
" 'xG+/-',\n",
" 'PKcon',\n",
" 'Succ',\n",
" 'TB',\n",
" 'SCA',\n",
" 'fee',\n",
" 'on_loan_from',\n",
" 'market_value_pounds',\n",
" 'Team Name',\n",
" 'market_value_euros',\n",
" 'Def',\n",
" 'Primary Pos',\n",
" 'Clr',\n",
" 'club_involved_name',\n",
" 'PSxG/SoT',\n",
" 'Drib',\n",
" 'player_agent',\n",
" 'CrdY',\n",
" 'Cmp.3',\n",
" 'Last Name Lower',\n",
" 'pob',\n",
" 'Att.1',\n",
" 'Out.1',\n",
" 'PassLive',\n",
" 'Succ%',\n",
" 'AvgLen.1',\n",
" 'GCA90',\n",
" 'xG',\n",
" 'club_name',\n",
" 'Fld',\n",
" 'SCA90',\n",
" 'dob',\n",
" 'birth_month',\n",
" 'Tkl%',\n",
" 'Sh',\n",
" 'Team Country',\n",
" 'npxG.1',\n",
" 'Pos',\n",
" 'Cmp%',\n",
" 'Save%.1',\n",
" 'Save%',\n",
" 'Comp',\n",
" 'Nationality Cleaned',\n",
" 'First Initial Lower',\n",
" 'Cmp.2',\n",
" 'Matches',\n",
" 'Opp',\n",
" 'Ast.1',\n",
" 'xA',\n",
" 'PPM',\n",
" 'Min%',\n",
" 'G-xG',\n",
" 'Past',\n",
" '%',\n",
" 'Def Pen',\n",
" 'Off',\n",
" 'birth_day',\n",
" 'Sh/90',\n",
" 'firstinitial_lower',\n",
" '/90',\n",
" 'Head',\n",
" '2CrdY',\n",
" 'PKA',\n",
" '#Pl',\n",
" 'position_grouped',\n",
" 'SoT',\n",
" 'TI',\n",
" 'Blocks',\n",
" 'SoT/90',\n",
" 'npxG',\n",
" 'First Name Lower',\n",
" 'GCA',\n",
" 'years_since_joining',\n",
" 'cob',\n",
" 'Mn/MP',\n",
" 'Def.1',\n",
" 'position_code',\n",
" 'Prog.1',\n",
" 'PKatt',\n",
" 'AvgLen',\n",
" 'G+A',\n",
" 'PKsv',\n",
" 'Pass',\n",
" 'npxG/Sh',\n",
" 'A-xA',\n",
" 'Crs',\n",
" 'Gls.1',\n",
" 'PassDead',\n",
" '#OPA',\n",
" 'D',\n",
" 'PrgDist',\n",
" 'Stp%',\n",
" 'Squad',\n",
" 'Rec%',\n",
" 'fee_cleaned',\n",
" 'W',\n",
" 'Player Lower',\n",
" 'Megs',\n",
" 'xG.1',\n",
" 'Str',\n",
" 'Tkl+Int',\n",
" 'Cmp%.2',\n",
" 'GA',\n",
" 'Saves',\n",
" 'Rec',\n",
" 'Sh.1',\n",
" 'Fls',\n",
" 'Team Country Lower',\n",
" 'Cmp%.3',\n",
" 'Tkl',\n",
" 'Int',\n",
" 'Att 3rd.1',\n",
" 'Def 3rd',\n",
" 'Min',\n",
" 'Cmp%.1',\n",
" 'position',\n",
" 'TklW',\n",
" 'Compl',\n",
" 'height',\n",
" 'xA.1',\n",
" 'current_age',\n",
" 'onGA',\n",
" 'Won',\n",
" 'CrsPA',\n",
" 'PPA',\n",
" 'Right']"
]
},
"execution_count": 102,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"lst_fbref_tm_non_select"
]
},
{
"cell_type": "code",
"execution_count": 103,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" Nation | \n",
" Pos | \n",
" Squad | \n",
" Comp | \n",
" Age | \n",
" birth_year | \n",
" MP | \n",
" Starts | \n",
" Min | \n",
" 90s | \n",
" Gls | \n",
" Ast | \n",
" G-PK | \n",
" PK | \n",
" PKatt | \n",
" CrdY | \n",
" CrdR | \n",
" Gls.1 | \n",
" Ast.1 | \n",
" G+A | \n",
" G-PK.1 | \n",
" G+A-PK | \n",
" xG | \n",
" npxG | \n",
" xA | \n",
" npxG+xA | \n",
" xG.1 | \n",
" xA.1 | \n",
" xG+xA | \n",
" npxG.1 | \n",
" npxG+xA.1 | \n",
" Matches | \n",
" Sh | \n",
" SoT | \n",
" SoT% | \n",
" Sh/90 | \n",
" SoT/90 | \n",
" G/Sh | \n",
" G/SoT | \n",
" Dist | \n",
" FK | \n",
" npxG/Sh | \n",
" G-xG | \n",
" np:G-xG | \n",
" Cmp | \n",
" Att | \n",
" Cmp% | \n",
" TotDist | \n",
" PrgDist | \n",
" Cmp.1 | \n",
" Att.1 | \n",
" Cmp%.1 | \n",
" Cmp.2 | \n",
" Att.2 | \n",
" Cmp%.2 | \n",
" Cmp.3 | \n",
" Att.3 | \n",
" Cmp%.3 | \n",
" A-xA | \n",
" KP | \n",
" 1/3 | \n",
" PPA | \n",
" CrsPA | \n",
" Prog | \n",
" Live | \n",
" Dead | \n",
" TB | \n",
" Press | \n",
" Sw | \n",
" Crs | \n",
" CK | \n",
" In | \n",
" Out | \n",
" Str | \n",
" Ground | \n",
" Low | \n",
" High | \n",
" Left | \n",
" Right | \n",
" Head | \n",
" TI | \n",
" Other | \n",
" Off | \n",
" Out.1 | \n",
" Int | \n",
" Blocks | \n",
" SCA | \n",
" SCA90 | \n",
" PassLive | \n",
" PassDead | \n",
" Drib | \n",
" Fld | \n",
" Def | \n",
" GCA | \n",
" GCA90 | \n",
" PassLive.1 | \n",
" PassDead.1 | \n",
" Drib.1 | \n",
" Sh.1 | \n",
" Fld.1 | \n",
" Def.1 | \n",
" Tkl | \n",
" TklW | \n",
" Def 3rd | \n",
" Mid 3rd | \n",
" Att 3rd | \n",
" Tkl.1 | \n",
" Tkl% | \n",
" Past | \n",
" Succ | \n",
" % | \n",
" Def 3rd.1 | \n",
" Mid 3rd.1 | \n",
" Att 3rd.1 | \n",
" ShSv | \n",
" Pass | \n",
" Tkl+Int | \n",
" Clr | \n",
" Err | \n",
" Touches | \n",
" Def Pen | \n",
" Att Pen | \n",
" Succ% | \n",
" #Pl | \n",
" Megs | \n",
" Carries | \n",
" CPA | \n",
" Mis | \n",
" Dis | \n",
" Targ | \n",
" Rec | \n",
" Rec% | \n",
" Prog.1 | \n",
" Mn/MP | \n",
" Min% | \n",
" Mn/Start | \n",
" Compl | \n",
" Subs | \n",
" Mn/Sub | \n",
" unSub | \n",
" PPM | \n",
" onG | \n",
" onGA | \n",
" +/- | \n",
" +/-90 | \n",
" On-Off | \n",
" onxG | \n",
" onxGA | \n",
" xG+/- | \n",
" xG+/-90 | \n",
" On-Off.1 | \n",
" 2CrdY | \n",
" Fls | \n",
" PKwon | \n",
" PKcon | \n",
" OG | \n",
" Recov | \n",
" Won | \n",
" Lost | \n",
" Won% | \n",
" season | \n",
" Team Name | \n",
" Team Country | \n",
" Player Lower | \n",
" First Name Lower | \n",
" Last Name Lower | \n",
" First Initial Lower | \n",
" Team Country Lower | \n",
" Nationality Code | \n",
" Nationality Cleaned | \n",
" Primary Pos | \n",
" Position Grouped | \n",
" outfielder_goalkeeper | \n",
" GA | \n",
" GA90 | \n",
" SoTA | \n",
" Saves | \n",
" Save% | \n",
" W | \n",
" D | \n",
" L | \n",
" CS | \n",
" CS% | \n",
" PKA | \n",
" PKsv | \n",
" PKm | \n",
" Save%.1 | \n",
" PSxG | \n",
" PSxG/SoT | \n",
" PSxG+/- | \n",
" /90 | \n",
" Thr | \n",
" Launch% | \n",
" AvgLen | \n",
" Launch%.1 | \n",
" AvgLen.1 | \n",
" Opp | \n",
" Stp | \n",
" Stp% | \n",
" #OPA | \n",
" #OPA/90 | \n",
" AvgDist | \n",
" player_name_lower | \n",
" first_name_lower | \n",
" last_name_lower | \n",
" first_initial_lower | \n",
" country_lower | \n",
" player_name_fbref | \n",
" url_fbref | \n",
" url_tm | \n",
" TmPos | \n",
" tm_id | \n",
" fbref_id | \n",
" player_name_tm | \n",
" club | \n",
" current_club | \n",
" league_code | \n",
" current_age | \n",
" market_value_gbp | \n",
" market_value_eur | \n",
" dob | \n",
" pob | \n",
" position | \n",
" position_code | \n",
" position_grouped | \n",
" height | \n",
" foot | \n",
" citizenship | \n",
" second_citizenship | \n",
" player_agent | \n",
" birth_day | \n",
" birth_month | \n",
" cob | \n",
" current_club_country | \n",
" market_value_euros | \n",
" joined | \n",
" contract_expires | \n",
" contract_option | \n",
" on_loan_from | \n",
" on_loan_from_country | \n",
" loan_contract_expiry | \n",
" name_lower | \n",
" firstname_lower | \n",
" lastname_lower | \n",
" firstinitial_lower | \n",
" league_country_lower | \n",
" age | \n",
" age_when_joining | \n",
" years_since_joining | \n",
" years_until_contract_expiry | \n",
" market_value_pounds | \n",
" club_name | \n",
" club_involved_name | \n",
" fee | \n",
" transfer_movement | \n",
" transfer_period | \n",
" fee_cleaned | \n",
" league_name | \n",
"
\n",
" \n",
" \n",
" \n",
" 4097 | \n",
" es ESP | \n",
" DF | \n",
" Barcelona | \n",
" La Liga | \n",
" 30 | \n",
" 1987.0 | \n",
" 30 | \n",
" 29 | \n",
" 2631.0 | \n",
" 29.2 | \n",
" 2 | \n",
" 0 | \n",
" 2 | \n",
" 0 | \n",
" 0 | \n",
" 8 | \n",
" 0 | \n",
" 0.07 | \n",
" 0.00 | \n",
" 0.07 | \n",
" 0.07 | \n",
" 0.07 | \n",
" 3.0 | \n",
" 3.0 | \n",
" 0.9 | \n",
" 3.8 | \n",
" 0.10 | \n",
" 0.03 | \n",
" 0.13 | \n",
" 0.10 | \n",
" 0.13 | \n",
" Matches | \n",
" 18.0 | \n",
" 5.0 | \n",
" 27.8 | \n",
" 0.62 | \n",
" 0.17 | \n",
" 0.11 | \n",
" 0.40 | \n",
" 9.2 | \n",
" 0.0 | \n",
" 0.16 | \n",
" -1.0 | \n",
" -1.0 | \n",
" 1606.0 | \n",
" 1810.0 | \n",
" 88.7 | \n",
" 34428.0 | \n",
" 10291.0 | \n",
" 460.0 | \n",
" 499.0 | \n",
" 92.2 | \n",
" 841.0 | \n",
" 904.0 | \n",
" 93.0 | \n",
" 293.0 | \n",
" 380.0 | \n",
" 77.1 | \n",
" -0.9 | \n",
" 6.0 | \n",
" 123.0 | \n",
" 4.0 | \n",
" 0.0 | \n",
" 90.0 | \n",
" 1764.0 | \n",
" 46.0 | \n",
" 0.0 | \n",
" 263.0 | \n",
" 70.0 | \n",
" 2.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 1436.0 | \n",
" 120.0 | \n",
" 254.0 | \n",
" 95.0 | \n",
" 1552.0 | \n",
" 106.0 | \n",
" 10.0 | \n",
" 8.0 | \n",
" 1.0 | \n",
" 28.0 | \n",
" 19.0 | \n",
" 11.0 | \n",
" 17.0 | \n",
" 0.58 | \n",
" 13.0 | \n",
" 0.0 | \n",
" 1.0 | \n",
" 2.0 | \n",
" 0.0 | \n",
" 1.0 | \n",
" 0.03 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 1.0 | \n",
" 0.0 | \n",
" 30.0 | \n",
" 22.0 | \n",
" 22.0 | \n",
" 8.0 | \n",
" 0.0 | \n",
" 12.0 | \n",
" 34.3 | \n",
" 23.0 | \n",
" 78.0 | \n",
" 32.5 | \n",
" 144.0 | \n",
" 80.0 | \n",
" 16.0 | \n",
" 2.0 | \n",
" 26.0 | \n",
" 62.0 | \n",
" 103.0 | \n",
" 5.0 | \n",
" 2075.0 | \n",
" 318.0 | \n",
" 28.0 | \n",
" 60.0 | \n",
" 6.0 | \n",
" 0.0 | \n",
" 1419.0 | \n",
" 0.0 | \n",
" 4.0 | \n",
" 7.0 | \n",
" 1385.0 | \n",
" 1341.0 | \n",
" 96.8 | \n",
" 27.0 | \n",
" 88 | \n",
" 76.9 | \n",
" NaN | \n",
" 27.0 | \n",
" 1 | \n",
" NaN | \n",
" 6 | \n",
" 2.57 | \n",
" 81.0 | \n",
" 23.0 | \n",
" 58.0 | \n",
" 1.98 | \n",
" 0.62 | \n",
" 65.0 | \n",
" 30.0 | \n",
" 35.1 | \n",
" 1.20 | \n",
" 0.96 | \n",
" 0.0 | \n",
" 23 | \n",
" 1.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 353.0 | \n",
" 54.0 | \n",
" 19.0 | \n",
" 74.0 | \n",
" 2017/2018 | \n",
" Barcelona | \n",
" Spain | \n",
" gerard piqua | \n",
" gerard | \n",
" piqua | \n",
" g | \n",
" spain | \n",
" ESP | \n",
" Spain | \n",
" DF | \n",
" Defender | \n",
" Outfielder | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" gerard piqua | \n",
" gerard | \n",
" piqua | \n",
" g | \n",
" spain | \n",
" Gerard Piqué | \n",
" https://fbref.com/en/players/adfc9123/Gerard-P... | \n",
" https://www.transfermarkt.com/gerard-pique/pro... | \n",
" Centre-Back | \n",
" 18944 | \n",
" adfc9123 | \n",
" gerard piqué | \n",
" FC Barcelona | \n",
" fc barcelona | \n",
" ES1 | \n",
" 34.0 | \n",
" 36000000.0 | \n",
" 40000000.0 | \n",
" 1987-02-02 | \n",
" Barcelona | \n",
" Defender - Centre-Back | \n",
" CB | \n",
" Defender | \n",
" 194.0 | \n",
" right | \n",
" Spain | \n",
" NaN | \n",
" AC Talent | \n",
" 2.0 | \n",
" 2.0 | \n",
" Spain | \n",
" spain | \n",
" 10000000.0 | \n",
" 2008-07-01 | \n",
" 2024-06-30 | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" gerard pique | \n",
" gerard | \n",
" pique | \n",
" g | \n",
" spain | \n",
" 34.0 | \n",
" 21.0 | \n",
" 13.0 | \n",
" 2.0 | \n",
" 9000000.0 | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
"
\n",
" \n",
" 4098 | \n",
" es ESP | \n",
" DF | \n",
" Barcelona | \n",
" La Liga | \n",
" 31 | \n",
" 1987.0 | \n",
" 35 | \n",
" 35 | \n",
" 3150.0 | \n",
" 35.0 | \n",
" 4 | \n",
" 2 | \n",
" 4 | \n",
" 0 | \n",
" 0 | \n",
" 6 | \n",
" 0 | \n",
" 0.11 | \n",
" 0.06 | \n",
" 0.17 | \n",
" 0.11 | \n",
" 0.17 | \n",
" 3.7 | \n",
" 3.7 | \n",
" 1.5 | \n",
" 5.2 | \n",
" 0.11 | \n",
" 0.04 | \n",
" 0.15 | \n",
" 0.11 | \n",
" 0.15 | \n",
" Matches | \n",
" 20.0 | \n",
" 11.0 | \n",
" 55.0 | \n",
" 0.57 | \n",
" 0.31 | \n",
" 0.20 | \n",
" 0.36 | \n",
" 7.3 | \n",
" 0.0 | \n",
" 0.19 | \n",
" 0.3 | \n",
" 0.3 | \n",
" 2230.0 | \n",
" 2429.0 | \n",
" 91.8 | \n",
" 46352.0 | \n",
" 14931.0 | \n",
" 666.0 | \n",
" 710.0 | \n",
" 93.8 | \n",
" 1209.0 | \n",
" 1277.0 | \n",
" 94.7 | \n",
" 343.0 | \n",
" 420.0 | \n",
" 81.7 | \n",
" 0.5 | \n",
" 8.0 | \n",
" 156.0 | \n",
" 5.0 | \n",
" 0.0 | \n",
" 103.0 | \n",
" 2347.0 | \n",
" 82.0 | \n",
" 3.0 | \n",
" 296.0 | \n",
" 58.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 1937.0 | \n",
" 190.0 | \n",
" 302.0 | \n",
" 97.0 | \n",
" 2125.0 | \n",
" 126.0 | \n",
" 12.0 | \n",
" 13.0 | \n",
" 5.0 | \n",
" 22.0 | \n",
" 14.0 | \n",
" 13.0 | \n",
" 25.0 | \n",
" 0.71 | \n",
" 17.0 | \n",
" 0.0 | \n",
" 2.0 | \n",
" 1.0 | \n",
" 1.0 | \n",
" 6.0 | \n",
" 0.17 | \n",
" 2.0 | \n",
" 0.0 | \n",
" 1.0 | \n",
" 2.0 | \n",
" 1.0 | \n",
" 0.0 | \n",
" 45.0 | \n",
" 27.0 | \n",
" 29.0 | \n",
" 15.0 | \n",
" 1.0 | \n",
" 20.0 | \n",
" 54.1 | \n",
" 17.0 | \n",
" 87.0 | \n",
" 31.9 | \n",
" 160.0 | \n",
" 101.0 | \n",
" 12.0 | \n",
" 2.0 | \n",
" 37.0 | \n",
" 77.0 | \n",
" 156.0 | \n",
" 2.0 | \n",
" 2760.0 | \n",
" 385.0 | \n",
" 32.0 | \n",
" 76.2 | \n",
" 16.0 | \n",
" 0.0 | \n",
" 1915.0 | \n",
" 1.0 | \n",
" 11.0 | \n",
" 9.0 | \n",
" 1963.0 | \n",
" 1889.0 | \n",
" 96.2 | \n",
" 27.0 | \n",
" 90 | \n",
" 92.1 | \n",
" 90.0 | \n",
" 35.0 | \n",
" 0 | \n",
" NaN | \n",
" 1 | \n",
" 2.43 | \n",
" 86.0 | \n",
" 30.0 | \n",
" 56.0 | \n",
" 1.60 | \n",
" 2.27 | \n",
" 69.9 | \n",
" 35.6 | \n",
" 34.2 | \n",
" 0.98 | \n",
" 1.29 | \n",
" 0.0 | \n",
" 24 | \n",
" 1.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 473.0 | \n",
" 91.0 | \n",
" 33.0 | \n",
" 73.4 | \n",
" 2018/2019 | \n",
" Barcelona | \n",
" Spain | \n",
" gerard piqua | \n",
" gerard | \n",
" piqua | \n",
" g | \n",
" spain | \n",
" ESP | \n",
" Spain | \n",
" DF | \n",
" Defender | \n",
" Outfielder | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" gerard piqua | \n",
" gerard | \n",
" piqua | \n",
" g | \n",
" spain | \n",
" Gerard Piqué | \n",
" https://fbref.com/en/players/adfc9123/Gerard-P... | \n",
" https://www.transfermarkt.com/gerard-pique/pro... | \n",
" Centre-Back | \n",
" 18944 | \n",
" adfc9123 | \n",
" gerard piqué | \n",
" FC Barcelona | \n",
" fc barcelona | \n",
" ES1 | \n",
" 34.0 | \n",
" 36000000.0 | \n",
" 40000000.0 | \n",
" 1987-02-02 | \n",
" Barcelona | \n",
" Defender - Centre-Back | \n",
" CB | \n",
" Defender | \n",
" 194.0 | \n",
" right | \n",
" Spain | \n",
" NaN | \n",
" AC Talent | \n",
" 2.0 | \n",
" 2.0 | \n",
" Spain | \n",
" spain | \n",
" 10000000.0 | \n",
" 2008-07-01 | \n",
" 2024-06-30 | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" gerard pique | \n",
" gerard | \n",
" pique | \n",
" g | \n",
" spain | \n",
" 34.0 | \n",
" 21.0 | \n",
" 13.0 | \n",
" 2.0 | \n",
" 9000000.0 | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
"
\n",
" \n",
" 4099 | \n",
" es ESP | \n",
" DF | \n",
" Barcelona | \n",
" La Liga | \n",
" 32 | \n",
" 1987.0 | \n",
" 35 | \n",
" 35 | \n",
" 3092.0 | \n",
" 34.4 | \n",
" 1 | \n",
" 0 | \n",
" 1 | \n",
" 0 | \n",
" 0 | \n",
" 15 | \n",
" 0 | \n",
" 0.03 | \n",
" 0.00 | \n",
" 0.03 | \n",
" 0.03 | \n",
" 0.03 | \n",
" 2.3 | \n",
" 2.3 | \n",
" 0.6 | \n",
" 2.9 | \n",
" 0.07 | \n",
" 0.02 | \n",
" 0.08 | \n",
" 0.07 | \n",
" 0.08 | \n",
" Matches | \n",
" 15.0 | \n",
" 6.0 | \n",
" 40.0 | \n",
" 0.44 | \n",
" 0.17 | \n",
" 0.07 | \n",
" 0.17 | \n",
" 8.4 | \n",
" 1.0 | \n",
" 0.15 | \n",
" -1.3 | \n",
" -1.3 | \n",
" 2469.0 | \n",
" 2659.0 | \n",
" 92.9 | \n",
" 53752.0 | \n",
" 14795.0 | \n",
" 645.0 | \n",
" 682.0 | \n",
" 94.6 | \n",
" 1381.0 | \n",
" 1437.0 | \n",
" 96.1 | \n",
" 427.0 | \n",
" 506.0 | \n",
" 84.4 | \n",
" -0.6 | \n",
" 5.0 | \n",
" 192.0 | \n",
" 3.0 | \n",
" 0.0 | \n",
" 116.0 | \n",
" 2548.0 | \n",
" 111.0 | \n",
" 2.0 | \n",
" 275.0 | \n",
" 79.0 | \n",
" 3.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 2121.0 | \n",
" 227.0 | \n",
" 311.0 | \n",
" 113.0 | \n",
" 2364.0 | \n",
" 99.0 | \n",
" 9.0 | \n",
" 13.0 | \n",
" 1.0 | \n",
" 25.0 | \n",
" 14.0 | \n",
" 14.0 | \n",
" 12.0 | \n",
" 0.35 | \n",
" 12.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 1.0 | \n",
" 0.03 | \n",
" 1.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 37.0 | \n",
" 22.0 | \n",
" 21.0 | \n",
" 16.0 | \n",
" 0.0 | \n",
" 14.0 | \n",
" 48.3 | \n",
" 15.0 | \n",
" 83.0 | \n",
" 34.0 | \n",
" 128.0 | \n",
" 109.0 | \n",
" 7.0 | \n",
" 2.0 | \n",
" 40.0 | \n",
" 73.0 | \n",
" 182.0 | \n",
" 1.0 | \n",
" 2996.0 | \n",
" 427.0 | \n",
" 28.0 | \n",
" 100.0 | \n",
" 9.0 | \n",
" 0.0 | \n",
" 2084.0 | \n",
" 0.0 | \n",
" 9.0 | \n",
" 7.0 | \n",
" 2211.0 | \n",
" 2171.0 | \n",
" 98.2 | \n",
" 21.0 | \n",
" 88 | \n",
" 90.4 | \n",
" 88.0 | \n",
" 31.0 | \n",
" 0 | \n",
" NaN | \n",
" 0 | \n",
" 2.09 | \n",
" 71.0 | \n",
" 36.0 | \n",
" 35.0 | \n",
" 1.02 | \n",
" -2.55 | \n",
" 56.2 | \n",
" 33.8 | \n",
" 22.4 | \n",
" 0.65 | \n",
" -1.49 | \n",
" 0.0 | \n",
" 32 | \n",
" 0.0 | \n",
" 2.0 | \n",
" 0.0 | \n",
" 391.0 | \n",
" 128.0 | \n",
" 40.0 | \n",
" 76.2 | \n",
" 2019/2020 | \n",
" Barcelona | \n",
" Spain | \n",
" gerard piqua | \n",
" gerard | \n",
" piqua | \n",
" g | \n",
" spain | \n",
" ESP | \n",
" Spain | \n",
" DF | \n",
" Defender | \n",
" Outfielder | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" gerard piqua | \n",
" gerard | \n",
" piqua | \n",
" g | \n",
" spain | \n",
" Gerard Piqué | \n",
" https://fbref.com/en/players/adfc9123/Gerard-P... | \n",
" https://www.transfermarkt.com/gerard-pique/pro... | \n",
" Centre-Back | \n",
" 18944 | \n",
" adfc9123 | \n",
" gerard piqué | \n",
" FC Barcelona | \n",
" fc barcelona | \n",
" ES1 | \n",
" 34.0 | \n",
" 22500000.0 | \n",
" 25000000.0 | \n",
" 1987-02-02 | \n",
" Barcelona | \n",
" Defender - Centre-Back | \n",
" CB | \n",
" Defender | \n",
" 194.0 | \n",
" right | \n",
" Spain | \n",
" NaN | \n",
" AC Talent | \n",
" 2.0 | \n",
" 2.0 | \n",
" Spain | \n",
" spain | \n",
" 10000000.0 | \n",
" 2008-07-01 | \n",
" 2024-06-30 | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" gerard pique | \n",
" gerard | \n",
" pique | \n",
" g | \n",
" spain | \n",
" 34.0 | \n",
" 21.0 | \n",
" 13.0 | \n",
" 2.0 | \n",
" 9000000.0 | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
"
\n",
" \n",
" 4100 | \n",
" es ESP | \n",
" DF | \n",
" Barcelona | \n",
" La Liga | \n",
" 33 | \n",
" 1987.0 | \n",
" 18 | \n",
" 18 | \n",
" 1481.0 | \n",
" 16.5 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 4 | \n",
" 0 | \n",
" 0.00 | \n",
" 0.00 | \n",
" 0.00 | \n",
" 0.00 | \n",
" 0.00 | \n",
" 0.6 | \n",
" 0.6 | \n",
" 0.5 | \n",
" 1.1 | \n",
" 0.04 | \n",
" 0.03 | \n",
" 0.07 | \n",
" 0.04 | \n",
" 0.07 | \n",
" Matches | \n",
" 8.0 | \n",
" 2.0 | \n",
" 25.0 | \n",
" 0.49 | \n",
" 0.12 | \n",
" 0.00 | \n",
" 0.00 | \n",
" 9.3 | \n",
" 0.0 | \n",
" 0.08 | \n",
" -0.6 | \n",
" -0.6 | \n",
" 1173.0 | \n",
" 1247.0 | \n",
" 94.1 | \n",
" 24743.0 | \n",
" 6069.0 | \n",
" 321.0 | \n",
" 340.0 | \n",
" 94.4 | \n",
" 666.0 | \n",
" 690.0 | \n",
" 96.5 | \n",
" 173.0 | \n",
" 197.0 | \n",
" 87.8 | \n",
" -0.5 | \n",
" 2.0 | \n",
" 82.0 | \n",
" 1.0 | \n",
" 0.0 | \n",
" 35.0 | \n",
" 1204.0 | \n",
" 43.0 | \n",
" 0.0 | \n",
" 91.0 | \n",
" 32.0 | \n",
" 1.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 1033.0 | \n",
" 93.0 | \n",
" 121.0 | \n",
" 72.0 | \n",
" 1079.0 | \n",
" 45.0 | \n",
" 5.0 | \n",
" 10.0 | \n",
" 1.0 | \n",
" 14.0 | \n",
" 6.0 | \n",
" 4.0 | \n",
" 5.0 | \n",
" 0.30 | \n",
" 5.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 1.0 | \n",
" 0.06 | \n",
" 1.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 21.0 | \n",
" 13.0 | \n",
" 13.0 | \n",
" 7.0 | \n",
" 1.0 | \n",
" 9.0 | \n",
" 64.3 | \n",
" 5.0 | \n",
" 46.0 | \n",
" 40.4 | \n",
" 51.0 | \n",
" 62.0 | \n",
" 1.0 | \n",
" 0.0 | \n",
" 13.0 | \n",
" 36.0 | \n",
" 65.0 | \n",
" 0.0 | \n",
" 1368.0 | \n",
" 161.0 | \n",
" 14.0 | \n",
" 100.0 | \n",
" 1.0 | \n",
" 0.0 | \n",
" 961.0 | \n",
" 0.0 | \n",
" 2.0 | \n",
" 3.0 | \n",
" 1046.0 | \n",
" 1015.0 | \n",
" 97.0 | \n",
" 7.0 | \n",
" 82 | \n",
" 43.3 | \n",
" 82.0 | \n",
" 13.0 | \n",
" 0 | \n",
" NaN | \n",
" 1 | \n",
" 1.53 | \n",
" 34.0 | \n",
" 22.0 | \n",
" 12.0 | \n",
" 0.73 | \n",
" -0.90 | \n",
" 32.9 | \n",
" 16.1 | \n",
" 16.8 | \n",
" 1.02 | \n",
" -0.02 | \n",
" 0.0 | \n",
" 13 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 182.0 | \n",
" 66.0 | \n",
" 21.0 | \n",
" 75.9 | \n",
" 2020/2021 | \n",
" Barcelona | \n",
" Spain | \n",
" gerard piqua | \n",
" gerard | \n",
" piqua | \n",
" g | \n",
" spain | \n",
" ESP | \n",
" Spain | \n",
" DF | \n",
" Defender | \n",
" Outfielder | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" gerard piqua | \n",
" gerard | \n",
" piqua | \n",
" g | \n",
" spain | \n",
" Gerard Piqué | \n",
" https://fbref.com/en/players/adfc9123/Gerard-P... | \n",
" https://www.transfermarkt.com/gerard-pique/pro... | \n",
" Centre-Back | \n",
" 18944 | \n",
" adfc9123 | \n",
" gerard piqué | \n",
" FC Barcelona | \n",
" fc barcelona | \n",
" ES1 | \n",
" 34.0 | \n",
" 13500000.0 | \n",
" 15000000.0 | \n",
" 1987-02-02 | \n",
" Barcelona | \n",
" Defender - Centre-Back | \n",
" CB | \n",
" Defender | \n",
" 194.0 | \n",
" right | \n",
" Spain | \n",
" NaN | \n",
" AC Talent | \n",
" 2.0 | \n",
" 2.0 | \n",
" Spain | \n",
" spain | \n",
" 10000000.0 | \n",
" 2008-07-01 | \n",
" 2024-06-30 | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" gerard pique | \n",
" gerard | \n",
" pique | \n",
" g | \n",
" spain | \n",
" 34.0 | \n",
" 21.0 | \n",
" 13.0 | \n",
" 2.0 | \n",
" 9000000.0 | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
"
\n",
" \n",
" 4101 | \n",
" es ESP | \n",
" DF | \n",
" Barcelona | \n",
" La Liga | \n",
" 34 | \n",
" 1987.0 | \n",
" 2 | \n",
" 2 | \n",
" 120.0 | \n",
" 1.3 | \n",
" 1 | \n",
" 0 | \n",
" 1 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0.75 | \n",
" 0.00 | \n",
" 0.75 | \n",
" 0.75 | \n",
" 0.75 | \n",
" 0.2 | \n",
" 0.2 | \n",
" 0.0 | \n",
" 0.2 | \n",
" 0.15 | \n",
" 0.00 | \n",
" 0.15 | \n",
" 0.15 | \n",
" 0.15 | \n",
" Matches | \n",
" 1.0 | \n",
" 1.0 | \n",
" 100.0 | \n",
" 0.75 | \n",
" 0.75 | \n",
" 1.00 | \n",
" 1.00 | \n",
" 8.0 | \n",
" 0.0 | \n",
" 0.19 | \n",
" 0.8 | \n",
" 0.8 | \n",
" 94.0 | \n",
" 97.0 | \n",
" 96.9 | \n",
" 2030.0 | \n",
" 415.0 | \n",
" 26.0 | \n",
" 28.0 | \n",
" 92.9 | \n",
" 51.0 | \n",
" 51.0 | \n",
" 100.0 | \n",
" 17.0 | \n",
" 18.0 | \n",
" 94.4 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 3.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 2.0 | \n",
" 89.0 | \n",
" 8.0 | \n",
" 0.0 | \n",
" 9.0 | \n",
" 5.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 85.0 | \n",
" 5.0 | \n",
" 7.0 | \n",
" 11.0 | \n",
" 80.0 | \n",
" 1.0 | \n",
" 0.0 | \n",
" 1.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 1.0 | \n",
" 0.75 | \n",
" 1.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.00 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 1.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 1.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" NaN | \n",
" 0.0 | \n",
" 2.0 | \n",
" 25.0 | \n",
" 4.0 | \n",
" 4.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 2.0 | \n",
" 4.0 | \n",
" 10.0 | \n",
" 0.0 | \n",
" 112.0 | \n",
" 24.0 | \n",
" 1.0 | \n",
" NaN | \n",
" 0.0 | \n",
" 0.0 | \n",
" 69.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 82.0 | \n",
" 79.0 | \n",
" 96.3 | \n",
" 0.0 | \n",
" 60 | \n",
" 44.4 | \n",
" 60.0 | \n",
" 1.0 | \n",
" 0 | \n",
" NaN | \n",
" 0 | \n",
" 2.00 | \n",
" 4.0 | \n",
" 2.0 | \n",
" 2.0 | \n",
" 1.50 | \n",
" 0.90 | \n",
" 3.3 | \n",
" 1.5 | \n",
" 1.8 | \n",
" 1.35 | \n",
" 1.00 | \n",
" 0.0 | \n",
" 1 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 9.0 | \n",
" 5.0 | \n",
" 1.0 | \n",
" 83.3 | \n",
" 2021/2022 | \n",
" Barcelona | \n",
" Spain | \n",
" gerard piqua | \n",
" gerard | \n",
" piqua | \n",
" g | \n",
" spain | \n",
" ESP | \n",
" Spain | \n",
" DF | \n",
" Defender | \n",
" Outfielder | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" gerard piqua | \n",
" gerard | \n",
" piqua | \n",
" g | \n",
" spain | \n",
" Gerard Piqué | \n",
" https://fbref.com/en/players/adfc9123/Gerard-P... | \n",
" https://www.transfermarkt.com/gerard-pique/pro... | \n",
" Centre-Back | \n",
" 18944 | \n",
" adfc9123 | \n",
" gerard piqué | \n",
" FC Barcelona | \n",
" fc barcelona | \n",
" ES1 | \n",
" 34.0 | \n",
" 9000000.0 | \n",
" 10000000.0 | \n",
" 1987-02-02 | \n",
" Barcelona | \n",
" Defender - Centre-Back | \n",
" CB | \n",
" Defender | \n",
" 194.0 | \n",
" right | \n",
" Spain | \n",
" NaN | \n",
" AC Talent | \n",
" 2.0 | \n",
" 2.0 | \n",
" Spain | \n",
" spain | \n",
" 10000000.0 | \n",
" 2008-07-01 | \n",
" 2024-06-30 | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" gerard pique | \n",
" gerard | \n",
" pique | \n",
" g | \n",
" spain | \n",
" 34.0 | \n",
" 21.0 | \n",
" 13.0 | \n",
" 2.0 | \n",
" 9000000.0 | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" Nation Pos Squad Comp Age birth_year MP Starts Min \\\n",
"4097 es ESP DF Barcelona La Liga 30 1987.0 30 29 2631.0 \n",
"4098 es ESP DF Barcelona La Liga 31 1987.0 35 35 3150.0 \n",
"4099 es ESP DF Barcelona La Liga 32 1987.0 35 35 3092.0 \n",
"4100 es ESP DF Barcelona La Liga 33 1987.0 18 18 1481.0 \n",
"4101 es ESP DF Barcelona La Liga 34 1987.0 2 2 120.0 \n",
"\n",
" 90s Gls Ast G-PK PK PKatt CrdY CrdR Gls.1 Ast.1 G+A G-PK.1 \\\n",
"4097 29.2 2 0 2 0 0 8 0 0.07 0.00 0.07 0.07 \n",
"4098 35.0 4 2 4 0 0 6 0 0.11 0.06 0.17 0.11 \n",
"4099 34.4 1 0 1 0 0 15 0 0.03 0.00 0.03 0.03 \n",
"4100 16.5 0 0 0 0 0 4 0 0.00 0.00 0.00 0.00 \n",
"4101 1.3 1 0 1 0 0 0 0 0.75 0.00 0.75 0.75 \n",
"\n",
" G+A-PK xG npxG xA npxG+xA xG.1 xA.1 xG+xA npxG.1 npxG+xA.1 \\\n",
"4097 0.07 3.0 3.0 0.9 3.8 0.10 0.03 0.13 0.10 0.13 \n",
"4098 0.17 3.7 3.7 1.5 5.2 0.11 0.04 0.15 0.11 0.15 \n",
"4099 0.03 2.3 2.3 0.6 2.9 0.07 0.02 0.08 0.07 0.08 \n",
"4100 0.00 0.6 0.6 0.5 1.1 0.04 0.03 0.07 0.04 0.07 \n",
"4101 0.75 0.2 0.2 0.0 0.2 0.15 0.00 0.15 0.15 0.15 \n",
"\n",
" Matches Sh SoT SoT% Sh/90 SoT/90 G/Sh G/SoT Dist FK \\\n",
"4097 Matches 18.0 5.0 27.8 0.62 0.17 0.11 0.40 9.2 0.0 \n",
"4098 Matches 20.0 11.0 55.0 0.57 0.31 0.20 0.36 7.3 0.0 \n",
"4099 Matches 15.0 6.0 40.0 0.44 0.17 0.07 0.17 8.4 1.0 \n",
"4100 Matches 8.0 2.0 25.0 0.49 0.12 0.00 0.00 9.3 0.0 \n",
"4101 Matches 1.0 1.0 100.0 0.75 0.75 1.00 1.00 8.0 0.0 \n",
"\n",
" npxG/Sh G-xG np:G-xG Cmp Att Cmp% TotDist PrgDist Cmp.1 \\\n",
"4097 0.16 -1.0 -1.0 1606.0 1810.0 88.7 34428.0 10291.0 460.0 \n",
"4098 0.19 0.3 0.3 2230.0 2429.0 91.8 46352.0 14931.0 666.0 \n",
"4099 0.15 -1.3 -1.3 2469.0 2659.0 92.9 53752.0 14795.0 645.0 \n",
"4100 0.08 -0.6 -0.6 1173.0 1247.0 94.1 24743.0 6069.0 321.0 \n",
"4101 0.19 0.8 0.8 94.0 97.0 96.9 2030.0 415.0 26.0 \n",
"\n",
" Att.1 Cmp%.1 Cmp.2 Att.2 Cmp%.2 Cmp.3 Att.3 Cmp%.3 A-xA KP \\\n",
"4097 499.0 92.2 841.0 904.0 93.0 293.0 380.0 77.1 -0.9 6.0 \n",
"4098 710.0 93.8 1209.0 1277.0 94.7 343.0 420.0 81.7 0.5 8.0 \n",
"4099 682.0 94.6 1381.0 1437.0 96.1 427.0 506.0 84.4 -0.6 5.0 \n",
"4100 340.0 94.4 666.0 690.0 96.5 173.0 197.0 87.8 -0.5 2.0 \n",
"4101 28.0 92.9 51.0 51.0 100.0 17.0 18.0 94.4 0.0 0.0 \n",
"\n",
" 1/3 PPA CrsPA Prog Live Dead TB Press Sw Crs CK \\\n",
"4097 123.0 4.0 0.0 90.0 1764.0 46.0 0.0 263.0 70.0 2.0 0.0 \n",
"4098 156.0 5.0 0.0 103.0 2347.0 82.0 3.0 296.0 58.0 0.0 0.0 \n",
"4099 192.0 3.0 0.0 116.0 2548.0 111.0 2.0 275.0 79.0 3.0 0.0 \n",
"4100 82.0 1.0 0.0 35.0 1204.0 43.0 0.0 91.0 32.0 1.0 0.0 \n",
"4101 3.0 0.0 0.0 2.0 89.0 8.0 0.0 9.0 5.0 0.0 0.0 \n",
"\n",
" In Out Str Ground Low High Left Right Head TI Other \\\n",
"4097 0.0 0.0 0.0 1436.0 120.0 254.0 95.0 1552.0 106.0 10.0 8.0 \n",
"4098 0.0 0.0 0.0 1937.0 190.0 302.0 97.0 2125.0 126.0 12.0 13.0 \n",
"4099 0.0 0.0 0.0 2121.0 227.0 311.0 113.0 2364.0 99.0 9.0 13.0 \n",
"4100 0.0 0.0 0.0 1033.0 93.0 121.0 72.0 1079.0 45.0 5.0 10.0 \n",
"4101 0.0 0.0 0.0 85.0 5.0 7.0 11.0 80.0 1.0 0.0 1.0 \n",
"\n",
" Off Out.1 Int Blocks SCA SCA90 PassLive PassDead Drib Fld \\\n",
"4097 1.0 28.0 19.0 11.0 17.0 0.58 13.0 0.0 1.0 2.0 \n",
"4098 5.0 22.0 14.0 13.0 25.0 0.71 17.0 0.0 2.0 1.0 \n",
"4099 1.0 25.0 14.0 14.0 12.0 0.35 12.0 0.0 0.0 0.0 \n",
"4100 1.0 14.0 6.0 4.0 5.0 0.30 5.0 0.0 0.0 0.0 \n",
"4101 0.0 0.0 0.0 0.0 1.0 0.75 1.0 0.0 0.0 0.0 \n",
"\n",
" Def GCA GCA90 PassLive.1 PassDead.1 Drib.1 Sh.1 Fld.1 Def.1 \\\n",
"4097 0.0 1.0 0.03 0.0 0.0 0.0 0.0 1.0 0.0 \n",
"4098 1.0 6.0 0.17 2.0 0.0 1.0 2.0 1.0 0.0 \n",
"4099 0.0 1.0 0.03 1.0 0.0 0.0 0.0 0.0 0.0 \n",
"4100 0.0 1.0 0.06 1.0 0.0 0.0 0.0 0.0 0.0 \n",
"4101 0.0 0.0 0.00 0.0 0.0 0.0 0.0 0.0 0.0 \n",
"\n",
" Tkl TklW Def 3rd Mid 3rd Att 3rd Tkl.1 Tkl% Past Succ % \\\n",
"4097 30.0 22.0 22.0 8.0 0.0 12.0 34.3 23.0 78.0 32.5 \n",
"4098 45.0 27.0 29.0 15.0 1.0 20.0 54.1 17.0 87.0 31.9 \n",
"4099 37.0 22.0 21.0 16.0 0.0 14.0 48.3 15.0 83.0 34.0 \n",
"4100 21.0 13.0 13.0 7.0 1.0 9.0 64.3 5.0 46.0 40.4 \n",
"4101 1.0 0.0 0.0 1.0 0.0 0.0 NaN 0.0 2.0 25.0 \n",
"\n",
" Def 3rd.1 Mid 3rd.1 Att 3rd.1 ShSv Pass Tkl+Int Clr Err \\\n",
"4097 144.0 80.0 16.0 2.0 26.0 62.0 103.0 5.0 \n",
"4098 160.0 101.0 12.0 2.0 37.0 77.0 156.0 2.0 \n",
"4099 128.0 109.0 7.0 2.0 40.0 73.0 182.0 1.0 \n",
"4100 51.0 62.0 1.0 0.0 13.0 36.0 65.0 0.0 \n",
"4101 4.0 4.0 0.0 0.0 2.0 4.0 10.0 0.0 \n",
"\n",
" Touches Def Pen Att Pen Succ% #Pl Megs Carries CPA Mis Dis \\\n",
"4097 2075.0 318.0 28.0 60.0 6.0 0.0 1419.0 0.0 4.0 7.0 \n",
"4098 2760.0 385.0 32.0 76.2 16.0 0.0 1915.0 1.0 11.0 9.0 \n",
"4099 2996.0 427.0 28.0 100.0 9.0 0.0 2084.0 0.0 9.0 7.0 \n",
"4100 1368.0 161.0 14.0 100.0 1.0 0.0 961.0 0.0 2.0 3.0 \n",
"4101 112.0 24.0 1.0 NaN 0.0 0.0 69.0 0.0 0.0 0.0 \n",
"\n",
" Targ Rec Rec% Prog.1 Mn/MP Min% Mn/Start Compl Subs \\\n",
"4097 1385.0 1341.0 96.8 27.0 88 76.9 NaN 27.0 1 \n",
"4098 1963.0 1889.0 96.2 27.0 90 92.1 90.0 35.0 0 \n",
"4099 2211.0 2171.0 98.2 21.0 88 90.4 88.0 31.0 0 \n",
"4100 1046.0 1015.0 97.0 7.0 82 43.3 82.0 13.0 0 \n",
"4101 82.0 79.0 96.3 0.0 60 44.4 60.0 1.0 0 \n",
"\n",
" Mn/Sub unSub PPM onG onGA +/- +/-90 On-Off onxG onxGA \\\n",
"4097 NaN 6 2.57 81.0 23.0 58.0 1.98 0.62 65.0 30.0 \n",
"4098 NaN 1 2.43 86.0 30.0 56.0 1.60 2.27 69.9 35.6 \n",
"4099 NaN 0 2.09 71.0 36.0 35.0 1.02 -2.55 56.2 33.8 \n",
"4100 NaN 1 1.53 34.0 22.0 12.0 0.73 -0.90 32.9 16.1 \n",
"4101 NaN 0 2.00 4.0 2.0 2.0 1.50 0.90 3.3 1.5 \n",
"\n",
" xG+/- xG+/-90 On-Off.1 2CrdY Fls PKwon PKcon OG Recov Won \\\n",
"4097 35.1 1.20 0.96 0.0 23 1.0 0.0 0.0 353.0 54.0 \n",
"4098 34.2 0.98 1.29 0.0 24 1.0 0.0 0.0 473.0 91.0 \n",
"4099 22.4 0.65 -1.49 0.0 32 0.0 2.0 0.0 391.0 128.0 \n",
"4100 16.8 1.02 -0.02 0.0 13 0.0 0.0 0.0 182.0 66.0 \n",
"4101 1.8 1.35 1.00 0.0 1 0.0 0.0 0.0 9.0 5.0 \n",
"\n",
" Lost Won% season Team Name Team Country Player Lower \\\n",
"4097 19.0 74.0 2017/2018 Barcelona Spain gerard piqua \n",
"4098 33.0 73.4 2018/2019 Barcelona Spain gerard piqua \n",
"4099 40.0 76.2 2019/2020 Barcelona Spain gerard piqua \n",
"4100 21.0 75.9 2020/2021 Barcelona Spain gerard piqua \n",
"4101 1.0 83.3 2021/2022 Barcelona Spain gerard piqua \n",
"\n",
" First Name Lower Last Name Lower First Initial Lower Team Country Lower \\\n",
"4097 gerard piqua g spain \n",
"4098 gerard piqua g spain \n",
"4099 gerard piqua g spain \n",
"4100 gerard piqua g spain \n",
"4101 gerard piqua g spain \n",
"\n",
" Nationality Code Nationality Cleaned Primary Pos Position Grouped \\\n",
"4097 ESP Spain DF Defender \n",
"4098 ESP Spain DF Defender \n",
"4099 ESP Spain DF Defender \n",
"4100 ESP Spain DF Defender \n",
"4101 ESP Spain DF Defender \n",
"\n",
" outfielder_goalkeeper GA GA90 SoTA Saves Save% W D L CS CS% \\\n",
"4097 Outfielder NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN \n",
"4098 Outfielder NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN \n",
"4099 Outfielder NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN \n",
"4100 Outfielder NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN \n",
"4101 Outfielder NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN \n",
"\n",
" PKA PKsv PKm Save%.1 PSxG PSxG/SoT PSxG+/- /90 Thr Launch% \\\n",
"4097 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN \n",
"4098 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN \n",
"4099 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN \n",
"4100 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN \n",
"4101 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN \n",
"\n",
" AvgLen Launch%.1 AvgLen.1 Opp Stp Stp% #OPA #OPA/90 AvgDist \\\n",
"4097 NaN NaN NaN NaN NaN NaN NaN NaN NaN \n",
"4098 NaN NaN NaN NaN NaN NaN NaN NaN NaN \n",
"4099 NaN NaN NaN NaN NaN NaN NaN NaN NaN \n",
"4100 NaN NaN NaN NaN NaN NaN NaN NaN NaN \n",
"4101 NaN NaN NaN NaN NaN NaN NaN NaN NaN \n",
"\n",
" player_name_lower first_name_lower last_name_lower first_initial_lower \\\n",
"4097 gerard piqua gerard piqua g \n",
"4098 gerard piqua gerard piqua g \n",
"4099 gerard piqua gerard piqua g \n",
"4100 gerard piqua gerard piqua g \n",
"4101 gerard piqua gerard piqua g \n",
"\n",
" country_lower player_name_fbref \\\n",
"4097 spain Gerard Piqué \n",
"4098 spain Gerard Piqué \n",
"4099 spain Gerard Piqué \n",
"4100 spain Gerard Piqué \n",
"4101 spain Gerard Piqué \n",
"\n",
" url_fbref \\\n",
"4097 https://fbref.com/en/players/adfc9123/Gerard-P... \n",
"4098 https://fbref.com/en/players/adfc9123/Gerard-P... \n",
"4099 https://fbref.com/en/players/adfc9123/Gerard-P... \n",
"4100 https://fbref.com/en/players/adfc9123/Gerard-P... \n",
"4101 https://fbref.com/en/players/adfc9123/Gerard-P... \n",
"\n",
" url_tm TmPos tm_id \\\n",
"4097 https://www.transfermarkt.com/gerard-pique/pro... Centre-Back 18944 \n",
"4098 https://www.transfermarkt.com/gerard-pique/pro... Centre-Back 18944 \n",
"4099 https://www.transfermarkt.com/gerard-pique/pro... Centre-Back 18944 \n",
"4100 https://www.transfermarkt.com/gerard-pique/pro... Centre-Back 18944 \n",
"4101 https://www.transfermarkt.com/gerard-pique/pro... Centre-Back 18944 \n",
"\n",
" fbref_id player_name_tm club current_club league_code \\\n",
"4097 adfc9123 gerard piqué FC Barcelona fc barcelona ES1 \n",
"4098 adfc9123 gerard piqué FC Barcelona fc barcelona ES1 \n",
"4099 adfc9123 gerard piqué FC Barcelona fc barcelona ES1 \n",
"4100 adfc9123 gerard piqué FC Barcelona fc barcelona ES1 \n",
"4101 adfc9123 gerard piqué FC Barcelona fc barcelona ES1 \n",
"\n",
" current_age market_value_gbp market_value_eur dob pob \\\n",
"4097 34.0 36000000.0 40000000.0 1987-02-02 Barcelona \n",
"4098 34.0 36000000.0 40000000.0 1987-02-02 Barcelona \n",
"4099 34.0 22500000.0 25000000.0 1987-02-02 Barcelona \n",
"4100 34.0 13500000.0 15000000.0 1987-02-02 Barcelona \n",
"4101 34.0 9000000.0 10000000.0 1987-02-02 Barcelona \n",
"\n",
" position position_code position_grouped height foot \\\n",
"4097 Defender - Centre-Back CB Defender 194.0 right \n",
"4098 Defender - Centre-Back CB Defender 194.0 right \n",
"4099 Defender - Centre-Back CB Defender 194.0 right \n",
"4100 Defender - Centre-Back CB Defender 194.0 right \n",
"4101 Defender - Centre-Back CB Defender 194.0 right \n",
"\n",
" citizenship second_citizenship player_agent birth_day birth_month \\\n",
"4097 Spain NaN AC Talent 2.0 2.0 \n",
"4098 Spain NaN AC Talent 2.0 2.0 \n",
"4099 Spain NaN AC Talent 2.0 2.0 \n",
"4100 Spain NaN AC Talent 2.0 2.0 \n",
"4101 Spain NaN AC Talent 2.0 2.0 \n",
"\n",
" cob current_club_country market_value_euros joined \\\n",
"4097 Spain spain 10000000.0 2008-07-01 \n",
"4098 Spain spain 10000000.0 2008-07-01 \n",
"4099 Spain spain 10000000.0 2008-07-01 \n",
"4100 Spain spain 10000000.0 2008-07-01 \n",
"4101 Spain spain 10000000.0 2008-07-01 \n",
"\n",
" contract_expires contract_option on_loan_from on_loan_from_country \\\n",
"4097 2024-06-30 NaN NaN NaN \n",
"4098 2024-06-30 NaN NaN NaN \n",
"4099 2024-06-30 NaN NaN NaN \n",
"4100 2024-06-30 NaN NaN NaN \n",
"4101 2024-06-30 NaN NaN NaN \n",
"\n",
" loan_contract_expiry name_lower firstname_lower lastname_lower \\\n",
"4097 NaN gerard pique gerard pique \n",
"4098 NaN gerard pique gerard pique \n",
"4099 NaN gerard pique gerard pique \n",
"4100 NaN gerard pique gerard pique \n",
"4101 NaN gerard pique gerard pique \n",
"\n",
" firstinitial_lower league_country_lower age age_when_joining \\\n",
"4097 g spain 34.0 21.0 \n",
"4098 g spain 34.0 21.0 \n",
"4099 g spain 34.0 21.0 \n",
"4100 g spain 34.0 21.0 \n",
"4101 g spain 34.0 21.0 \n",
"\n",
" years_since_joining years_until_contract_expiry market_value_pounds \\\n",
"4097 13.0 2.0 9000000.0 \n",
"4098 13.0 2.0 9000000.0 \n",
"4099 13.0 2.0 9000000.0 \n",
"4100 13.0 2.0 9000000.0 \n",
"4101 13.0 2.0 9000000.0 \n",
"\n",
" club_name club_involved_name fee transfer_movement transfer_period \\\n",
"4097 NaN NaN NaN NaN NaN \n",
"4098 NaN NaN NaN NaN NaN \n",
"4099 NaN NaN NaN NaN NaN \n",
"4100 NaN NaN NaN NaN NaN \n",
"4101 NaN NaN NaN NaN NaN \n",
"\n",
" fee_cleaned league_name \n",
"4097 NaN NaN \n",
"4098 NaN NaN \n",
"4099 NaN NaN \n",
"4100 NaN NaN \n",
"4101 NaN NaN "
]
},
"execution_count": 103,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"df_merge_fbref_tm[df_merge_fbref_tm['player_name_fbref'].str.contains('Gerard Piqu', na=False)]"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"\n",
"\n",
"#### 5.3.2. Join the Capology dataset"
]
},
{
"cell_type": "code",
"execution_count": 104,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
""
]
},
"execution_count": 104,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# Record Linkage Step 1 - Create an indexer object\n",
"indexer = recordlinkage.Index()\n",
"indexer.block(left_on = ['first_initial_lower', 'outfielder_goalkeeper', 'season'], \n",
" right_on = ['first_initial_lower', 'outfielder_goalkeeper', 'season']\n",
" )"
]
},
{
"cell_type": "code",
"execution_count": 105,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"932588\n"
]
}
],
"source": [
"# Record Linkage Step 2 - Build up all the potential candidates to check:\n",
"candidates = indexer.index(df_merge_fbref_tm, df_capology)\n",
"print(len(candidates))"
]
},
{
"cell_type": "code",
"execution_count": 106,
"metadata": {},
"outputs": [],
"source": [
"# Record Linkage Step 3 - Define how we to perform the comparison logic\n",
"compare = recordlinkage.Compare()\n",
"\n",
"compare.string('first_name_lower',\n",
" 'first_name_lower',\n",
" method='levenshtein',\n",
" threshold=0.60,\n",
" label='first_name'\n",
" )\n",
"\n",
"compare.string('last_name_lower',\n",
" 'last_name_lower',\n",
" method='levenshtein',\n",
" threshold=0.60,\n",
" label='last_name'\n",
" )\n",
"\n",
"compare.string('country_lower',\n",
" 'country_lower',\n",
" method='levenshtein',\n",
" threshold=0.60,\n",
" label='country'\n",
" )\n",
"\n",
"features = compare.compute(candidates, df_merge_fbref_tm, df_capology)"
]
},
{
"cell_type": "code",
"execution_count": 107,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" | \n",
" first_name | \n",
" last_name | \n",
" country | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" 1878 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
"
\n",
" \n",
" 1964 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
"
\n",
" \n",
" 1997 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
"
\n",
" \n",
" 1998 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
"
\n",
" \n",
" 2032 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
"
\n",
" \n",
" ... | \n",
" ... | \n",
" ... | \n",
" ... | \n",
" ... | \n",
"
\n",
" \n",
" 12518 | \n",
" 15803 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
"
\n",
" \n",
" 12523 | \n",
" 15803 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
"
\n",
" \n",
" 12526 | \n",
" 15803 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
"
\n",
" \n",
" 12530 | \n",
" 15803 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
"
\n",
" \n",
" 12533 | \n",
" 15803 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
"
\n",
" \n",
"
\n",
"
932588 rows × 3 columns
\n",
"
"
],
"text/plain": [
" first_name last_name country\n",
"0 1878 0.0 0.0 0.0\n",
" 1964 0.0 0.0 0.0\n",
" 1997 0.0 0.0 0.0\n",
" 1998 0.0 0.0 0.0\n",
" 2032 0.0 0.0 0.0\n",
"... ... ... ...\n",
"12518 15803 0.0 0.0 0.0\n",
"12523 15803 0.0 0.0 0.0\n",
"12526 15803 0.0 0.0 0.0\n",
"12530 15803 0.0 0.0 0.0\n",
"12533 15803 0.0 0.0 0.0\n",
"\n",
"[932588 rows x 3 columns]"
]
},
"execution_count": 107,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# Record Linkage Step 4 - view the potential candidates\n",
"features"
]
},
{
"cell_type": "code",
"execution_count": 108,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"3.0 5025\n",
"2.0 21484\n",
"1.0 157533\n",
"0.0 748546\n",
"dtype: int64"
]
},
"execution_count": 108,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# Sum up the individual scores to see the quality of the matches.\n",
"features.sum(axis=1).value_counts().sort_index(ascending=False)"
]
},
{
"cell_type": "code",
"execution_count": 109,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" level_0 | \n",
" level_1 | \n",
" first_name | \n",
" last_name | \n",
" country | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" 5 | \n",
" 14909 | \n",
" 1.0 | \n",
" 0.0 | \n",
" 1.0 | \n",
"
\n",
" \n",
" 1 | \n",
" 5 | \n",
" 15090 | \n",
" 1.0 | \n",
" 0.0 | \n",
" 1.0 | \n",
"
\n",
" \n",
" 2 | \n",
" 5 | \n",
" 15294 | \n",
" 1.0 | \n",
" 1.0 | \n",
" 1.0 | \n",
"
\n",
" \n",
" 3 | \n",
" 14 | \n",
" 14909 | \n",
" 1.0 | \n",
" 1.0 | \n",
" 1.0 | \n",
"
\n",
" \n",
" 4 | \n",
" 14 | \n",
" 15090 | \n",
" 1.0 | \n",
" 0.0 | \n",
" 1.0 | \n",
"
\n",
" \n",
" ... | \n",
" ... | \n",
" ... | \n",
" ... | \n",
" ... | \n",
" ... | \n",
"
\n",
" \n",
" 26504 | \n",
" 12528 | \n",
" 6473 | \n",
" 1.0 | \n",
" 1.0 | \n",
" 1.0 | \n",
"
\n",
" \n",
" 26505 | \n",
" 12528 | \n",
" 17924 | \n",
" 1.0 | \n",
" 1.0 | \n",
" 1.0 | \n",
"
\n",
" \n",
" 26506 | \n",
" 12516 | \n",
" 6620 | \n",
" 1.0 | \n",
" 1.0 | \n",
" 1.0 | \n",
"
\n",
" \n",
" 26507 | \n",
" 12517 | \n",
" 7787 | \n",
" 1.0 | \n",
" 1.0 | \n",
" 1.0 | \n",
"
\n",
" \n",
" 26508 | \n",
" 12529 | \n",
" 7321 | \n",
" 1.0 | \n",
" 1.0 | \n",
" 1.0 | \n",
"
\n",
" \n",
"
\n",
"
26509 rows × 5 columns
\n",
"
"
],
"text/plain": [
" level_0 level_1 first_name last_name country\n",
"0 5 14909 1.0 0.0 1.0\n",
"1 5 15090 1.0 0.0 1.0\n",
"2 5 15294 1.0 1.0 1.0\n",
"3 14 14909 1.0 1.0 1.0\n",
"4 14 15090 1.0 0.0 1.0\n",
"... ... ... ... ... ...\n",
"26504 12528 6473 1.0 1.0 1.0\n",
"26505 12528 17924 1.0 1.0 1.0\n",
"26506 12516 6620 1.0 1.0 1.0\n",
"26507 12517 7787 1.0 1.0 1.0\n",
"26508 12529 7321 1.0 1.0 1.0\n",
"\n",
"[26509 rows x 5 columns]"
]
},
"execution_count": 109,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# Show records that have match by index number\n",
"potential_matches = features[features.sum(axis=1) >= 2].reset_index()\n",
"potential_matches"
]
},
{
"cell_type": "code",
"execution_count": 110,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" level_0 | \n",
" level_1 | \n",
" first_name | \n",
" last_name | \n",
" country | \n",
" Score | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" 5 | \n",
" 14909 | \n",
" 1.0 | \n",
" 0.0 | \n",
" 1.0 | \n",
" 2.0 | \n",
"
\n",
" \n",
" 1 | \n",
" 5 | \n",
" 15090 | \n",
" 1.0 | \n",
" 0.0 | \n",
" 1.0 | \n",
" 2.0 | \n",
"
\n",
" \n",
" 2 | \n",
" 5 | \n",
" 15294 | \n",
" 1.0 | \n",
" 1.0 | \n",
" 1.0 | \n",
" 3.0 | \n",
"
\n",
" \n",
" 3 | \n",
" 14 | \n",
" 14909 | \n",
" 1.0 | \n",
" 1.0 | \n",
" 1.0 | \n",
" 3.0 | \n",
"
\n",
" \n",
" 4 | \n",
" 14 | \n",
" 15090 | \n",
" 1.0 | \n",
" 0.0 | \n",
" 1.0 | \n",
" 2.0 | \n",
"
\n",
" \n",
" ... | \n",
" ... | \n",
" ... | \n",
" ... | \n",
" ... | \n",
" ... | \n",
" ... | \n",
"
\n",
" \n",
" 26504 | \n",
" 12528 | \n",
" 6473 | \n",
" 1.0 | \n",
" 1.0 | \n",
" 1.0 | \n",
" 3.0 | \n",
"
\n",
" \n",
" 26505 | \n",
" 12528 | \n",
" 17924 | \n",
" 1.0 | \n",
" 1.0 | \n",
" 1.0 | \n",
" 3.0 | \n",
"
\n",
" \n",
" 26506 | \n",
" 12516 | \n",
" 6620 | \n",
" 1.0 | \n",
" 1.0 | \n",
" 1.0 | \n",
" 3.0 | \n",
"
\n",
" \n",
" 26507 | \n",
" 12517 | \n",
" 7787 | \n",
" 1.0 | \n",
" 1.0 | \n",
" 1.0 | \n",
" 3.0 | \n",
"
\n",
" \n",
" 26508 | \n",
" 12529 | \n",
" 7321 | \n",
" 1.0 | \n",
" 1.0 | \n",
" 1.0 | \n",
" 3.0 | \n",
"
\n",
" \n",
"
\n",
"
26509 rows × 6 columns
\n",
"
"
],
"text/plain": [
" level_0 level_1 first_name last_name country Score\n",
"0 5 14909 1.0 0.0 1.0 2.0\n",
"1 5 15090 1.0 0.0 1.0 2.0\n",
"2 5 15294 1.0 1.0 1.0 3.0\n",
"3 14 14909 1.0 1.0 1.0 3.0\n",
"4 14 15090 1.0 0.0 1.0 2.0\n",
"... ... ... ... ... ... ...\n",
"26504 12528 6473 1.0 1.0 1.0 3.0\n",
"26505 12528 17924 1.0 1.0 1.0 3.0\n",
"26506 12516 6620 1.0 1.0 1.0 3.0\n",
"26507 12517 7787 1.0 1.0 1.0 3.0\n",
"26508 12529 7321 1.0 1.0 1.0 3.0\n",
"\n",
"[26509 rows x 6 columns]"
]
},
"execution_count": 110,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# Create 'Score' attribute, that sums the three columns defined in record-linkage\n",
"potential_matches['Score'] = potential_matches.loc[:, 'first_name': 'country'].sum(axis=1)\n",
"\n",
"# Display DataFrame of potential matches, potential_matches \n",
"potential_matches"
]
},
{
"cell_type": "code",
"execution_count": 111,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" Nation | \n",
" Pos | \n",
" Squad | \n",
" Comp | \n",
" Age | \n",
" birth_year | \n",
" MP | \n",
" Starts | \n",
" Min | \n",
" 90s | \n",
" Gls | \n",
" Ast | \n",
" G-PK | \n",
" PK | \n",
" PKatt | \n",
" CrdY | \n",
" CrdR | \n",
" Gls.1 | \n",
" Ast.1 | \n",
" G+A | \n",
" G-PK.1 | \n",
" G+A-PK | \n",
" xG | \n",
" npxG | \n",
" xA | \n",
" npxG+xA | \n",
" xG.1 | \n",
" xA.1 | \n",
" xG+xA | \n",
" npxG.1 | \n",
" npxG+xA.1 | \n",
" Matches | \n",
" Sh | \n",
" SoT | \n",
" SoT% | \n",
" Sh/90 | \n",
" SoT/90 | \n",
" G/Sh | \n",
" G/SoT | \n",
" Dist | \n",
" FK | \n",
" npxG/Sh | \n",
" G-xG | \n",
" np:G-xG | \n",
" Cmp | \n",
" Att | \n",
" Cmp% | \n",
" TotDist | \n",
" PrgDist | \n",
" Cmp.1 | \n",
" Att.1 | \n",
" Cmp%.1 | \n",
" Cmp.2 | \n",
" Att.2 | \n",
" Cmp%.2 | \n",
" Cmp.3 | \n",
" Att.3 | \n",
" Cmp%.3 | \n",
" A-xA | \n",
" KP | \n",
" 1/3 | \n",
" PPA | \n",
" CrsPA | \n",
" Prog | \n",
" Live | \n",
" Dead | \n",
" TB | \n",
" Press | \n",
" Sw | \n",
" Crs | \n",
" CK | \n",
" In | \n",
" Out | \n",
" Str | \n",
" Ground | \n",
" Low | \n",
" High | \n",
" Left | \n",
" Right | \n",
" Head | \n",
" TI | \n",
" Other | \n",
" Off | \n",
" Out.1 | \n",
" Int | \n",
" Blocks | \n",
" SCA | \n",
" SCA90 | \n",
" PassLive | \n",
" PassDead | \n",
" Drib | \n",
" Fld | \n",
" Def | \n",
" GCA | \n",
" GCA90 | \n",
" PassLive.1 | \n",
" PassDead.1 | \n",
" Drib.1 | \n",
" Sh.1 | \n",
" Fld.1 | \n",
" Def.1 | \n",
" Tkl | \n",
" TklW | \n",
" Def 3rd | \n",
" Mid 3rd | \n",
" Att 3rd | \n",
" Tkl.1 | \n",
" Tkl% | \n",
" Past | \n",
" Succ | \n",
" % | \n",
" Def 3rd.1 | \n",
" Mid 3rd.1 | \n",
" Att 3rd.1 | \n",
" ShSv | \n",
" Pass | \n",
" Tkl+Int | \n",
" Clr | \n",
" Err | \n",
" Touches | \n",
" Def Pen | \n",
" Att Pen | \n",
" Succ% | \n",
" #Pl | \n",
" Megs | \n",
" Carries | \n",
" CPA | \n",
" Mis | \n",
" Dis | \n",
" Targ | \n",
" Rec | \n",
" Rec% | \n",
" Prog.1 | \n",
" Mn/MP | \n",
" Min% | \n",
" Mn/Start | \n",
" Compl | \n",
" Subs | \n",
" Mn/Sub | \n",
" unSub | \n",
" PPM | \n",
" onG | \n",
" onGA | \n",
" +/- | \n",
" +/-90 | \n",
" On-Off | \n",
" onxG | \n",
" onxGA | \n",
" xG+/- | \n",
" xG+/-90 | \n",
" On-Off.1 | \n",
" 2CrdY | \n",
" Fls | \n",
" PKwon | \n",
" PKcon | \n",
" OG | \n",
" Recov | \n",
" Won | \n",
" Lost | \n",
" Won% | \n",
" season | \n",
" Team Name | \n",
" Team Country | \n",
" Player Lower | \n",
" First Name Lower | \n",
" Last Name Lower | \n",
" First Initial Lower | \n",
" Team Country Lower | \n",
" Nationality Code | \n",
" Nationality Cleaned | \n",
" Primary Pos | \n",
" Position Grouped | \n",
" outfielder_goalkeeper | \n",
" GA | \n",
" GA90 | \n",
" SoTA | \n",
" Saves | \n",
" Save% | \n",
" W | \n",
" D | \n",
" L | \n",
" CS | \n",
" CS% | \n",
" PKA | \n",
" PKsv | \n",
" PKm | \n",
" Save%.1 | \n",
" PSxG | \n",
" PSxG/SoT | \n",
" PSxG+/- | \n",
" /90 | \n",
" Thr | \n",
" Launch% | \n",
" AvgLen | \n",
" Launch%.1 | \n",
" AvgLen.1 | \n",
" Opp | \n",
" Stp | \n",
" Stp% | \n",
" #OPA | \n",
" #OPA/90 | \n",
" AvgDist | \n",
" player_name_lower | \n",
" first_name_lower | \n",
" last_name_lower | \n",
" first_initial_lower | \n",
" country_lower | \n",
" player_name_fbref | \n",
" url_fbref | \n",
" url_tm | \n",
" TmPos | \n",
" tm_id | \n",
" fbref_id | \n",
" player_name_tm | \n",
" club | \n",
" current_club | \n",
" league_code | \n",
" current_age | \n",
" market_value_gbp | \n",
" market_value_eur | \n",
" dob | \n",
" pob | \n",
" position | \n",
" position_code | \n",
" position_grouped | \n",
" height | \n",
" foot | \n",
" citizenship | \n",
" second_citizenship | \n",
" player_agent | \n",
" birth_day | \n",
" birth_month | \n",
" cob | \n",
" current_club_country | \n",
" market_value_euros | \n",
" joined | \n",
" contract_expires | \n",
" contract_option | \n",
" on_loan_from | \n",
" on_loan_from_country | \n",
" loan_contract_expiry | \n",
" name_lower | \n",
" firstname_lower | \n",
" lastname_lower | \n",
" firstinitial_lower | \n",
" league_country_lower | \n",
" age | \n",
" age_when_joining | \n",
" years_since_joining | \n",
" years_until_contract_expiry | \n",
" market_value_pounds | \n",
" club_name | \n",
" club_involved_name | \n",
" fee | \n",
" transfer_movement | \n",
" transfer_period | \n",
" fee_cleaned | \n",
" league_name | \n",
"
\n",
" \n",
" \n",
" \n",
" 2929 | \n",
" it ITA | \n",
" DF | \n",
" Genoa | \n",
" Serie A | \n",
" 33 | \n",
" 1986.0 | \n",
" 23 | \n",
" 20 | \n",
" 1726.0 | \n",
" 19.2 | \n",
" 1 | \n",
" 0 | \n",
" 0 | \n",
" 1 | \n",
" 1 | \n",
" 6 | \n",
" 0 | \n",
" 0.05 | \n",
" 0.0 | \n",
" 0.05 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.9 | \n",
" 0.1 | \n",
" 0.4 | \n",
" 0.5 | \n",
" 0.05 | \n",
" 0.02 | \n",
" 0.07 | \n",
" 0.01 | \n",
" 0.03 | \n",
" Matches | \n",
" 5.0 | \n",
" 1.0 | \n",
" 20.0 | \n",
" 0.26 | \n",
" 0.05 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 28.0 | \n",
" 0.0 | \n",
" 0.03 | \n",
" 0.1 | \n",
" -0.1 | \n",
" 857.0 | \n",
" 1052.0 | \n",
" 81.5 | \n",
" 18219.0 | \n",
" 6711.0 | \n",
" 277.0 | \n",
" 309.0 | \n",
" 89.6 | \n",
" 434.0 | \n",
" 487.0 | \n",
" 89.1 | \n",
" 140.0 | \n",
" 241.0 | \n",
" 58.1 | \n",
" -0.4 | \n",
" 6.0 | \n",
" 75.0 | \n",
" 9.0 | \n",
" 1.0 | \n",
" 80.0 | \n",
" 972.0 | \n",
" 80.0 | \n",
" 0.0 | \n",
" 85.0 | \n",
" 29.0 | \n",
" 18.0 | \n",
" 2.0 | \n",
" 0.0 | \n",
" 1.0 | \n",
" 1.0 | \n",
" 701.0 | \n",
" 118.0 | \n",
" 233.0 | \n",
" 795.0 | \n",
" 151.0 | \n",
" 56.0 | \n",
" 33.0 | \n",
" 5.0 | \n",
" 9.0 | \n",
" 14.0 | \n",
" 20.0 | \n",
" 12.0 | \n",
" 14.0 | \n",
" 0.73 | \n",
" 13.0 | \n",
" 1.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 43.0 | \n",
" 27.0 | \n",
" 31.0 | \n",
" 9.0 | \n",
" 3.0 | \n",
" 10.0 | \n",
" 35.7 | \n",
" 18.0 | \n",
" 71.0 | \n",
" 29.8 | \n",
" 131.0 | \n",
" 94.0 | \n",
" 13.0 | \n",
" 0.0 | \n",
" 13.0 | \n",
" 78.0 | \n",
" 77.0 | \n",
" 1.0 | \n",
" 1248.0 | \n",
" 142.0 | \n",
" 7.0 | \n",
" 44.4 | \n",
" 5.0 | \n",
" 0.0 | \n",
" 750.0 | \n",
" 0.0 | \n",
" 6.0 | \n",
" 6.0 | \n",
" 800.0 | \n",
" 783.0 | \n",
" 97.9 | \n",
" 4.0 | \n",
" 75 | \n",
" 50.5 | \n",
" 83.0 | \n",
" 17.0 | \n",
" 3 | \n",
" 19.0 | \n",
" 2 | \n",
" 1.43 | \n",
" 26.0 | \n",
" 22.0 | \n",
" 4.0 | \n",
" 0.21 | \n",
" 1.01 | \n",
" 19.2 | \n",
" 23.2 | \n",
" -4.1 | \n",
" -0.21 | \n",
" 0.46 | \n",
" 0.0 | \n",
" 23 | \n",
" 0.0 | \n",
" 1.0 | \n",
" 0.0 | \n",
" 191.0 | \n",
" 22.0 | \n",
" 28.0 | \n",
" 44.0 | \n",
" 2020/2021 | \n",
" Genoa | \n",
" Italy | \n",
" domenico criscito | \n",
" domenico | \n",
" criscito | \n",
" d | \n",
" italy | \n",
" ITA | \n",
" Italy | \n",
" DF | \n",
" Defender | \n",
" Outfielder | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" domenico criscito | \n",
" domenico | \n",
" criscito | \n",
" d | \n",
" italy | \n",
" Domenico Criscito | \n",
" https://fbref.com/en/players/35dd6d80/Domenico... | \n",
" https://www.transfermarkt.com/domenico-criscit... | \n",
" Left-Back | \n",
" 44136 | \n",
" 35dd6d80 | \n",
" domenico criscito | \n",
" Genoa CFC | \n",
" genoa cfc | \n",
" IT1 | \n",
" 34.0 | \n",
" 1800000.0 | \n",
" 2000000.0 | \n",
" 1986-12-30 | \n",
" Cercola | \n",
" Defender - Centre-Back | \n",
" CB | \n",
" Defender | \n",
" 183.0 | \n",
" left | \n",
" Italy | \n",
" NaN | \n",
" PDP s.r.l. Pasqualin D’Amico Partners | \n",
" 30.0 | \n",
" 12.0 | \n",
" Italy | \n",
" italy | \n",
" 1500000.0 | \n",
" 2018-07-01 | \n",
" 2023-06-30 | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" domenico criscito | \n",
" domenico | \n",
" criscito | \n",
" d | \n",
" italy | \n",
" 34.0 | \n",
" 31.0 | \n",
" 3.0 | \n",
" 1.0 | \n",
" 1350000.0 | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" Nation Pos Squad Comp Age birth_year MP Starts Min 90s \\\n",
"2929 it ITA DF Genoa Serie A 33 1986.0 23 20 1726.0 19.2 \n",
"\n",
" Gls Ast G-PK PK PKatt CrdY CrdR Gls.1 Ast.1 G+A G-PK.1 \\\n",
"2929 1 0 0 1 1 6 0 0.05 0.0 0.05 0.0 \n",
"\n",
" G+A-PK xG npxG xA npxG+xA xG.1 xA.1 xG+xA npxG.1 npxG+xA.1 \\\n",
"2929 0.0 0.9 0.1 0.4 0.5 0.05 0.02 0.07 0.01 0.03 \n",
"\n",
" Matches Sh SoT SoT% Sh/90 SoT/90 G/Sh G/SoT Dist FK npxG/Sh \\\n",
"2929 Matches 5.0 1.0 20.0 0.26 0.05 0.0 0.0 28.0 0.0 0.03 \n",
"\n",
" G-xG np:G-xG Cmp Att Cmp% TotDist PrgDist Cmp.1 Att.1 \\\n",
"2929 0.1 -0.1 857.0 1052.0 81.5 18219.0 6711.0 277.0 309.0 \n",
"\n",
" Cmp%.1 Cmp.2 Att.2 Cmp%.2 Cmp.3 Att.3 Cmp%.3 A-xA KP 1/3 \\\n",
"2929 89.6 434.0 487.0 89.1 140.0 241.0 58.1 -0.4 6.0 75.0 \n",
"\n",
" PPA CrsPA Prog Live Dead TB Press Sw Crs CK In Out \\\n",
"2929 9.0 1.0 80.0 972.0 80.0 0.0 85.0 29.0 18.0 2.0 0.0 1.0 \n",
"\n",
" Str Ground Low High Left Right Head TI Other Off Out.1 \\\n",
"2929 1.0 701.0 118.0 233.0 795.0 151.0 56.0 33.0 5.0 9.0 14.0 \n",
"\n",
" Int Blocks SCA SCA90 PassLive PassDead Drib Fld Def GCA \\\n",
"2929 20.0 12.0 14.0 0.73 13.0 1.0 0.0 0.0 0.0 0.0 \n",
"\n",
" GCA90 PassLive.1 PassDead.1 Drib.1 Sh.1 Fld.1 Def.1 Tkl TklW \\\n",
"2929 0.0 0.0 0.0 0.0 0.0 0.0 0.0 43.0 27.0 \n",
"\n",
" Def 3rd Mid 3rd Att 3rd Tkl.1 Tkl% Past Succ % Def 3rd.1 \\\n",
"2929 31.0 9.0 3.0 10.0 35.7 18.0 71.0 29.8 131.0 \n",
"\n",
" Mid 3rd.1 Att 3rd.1 ShSv Pass Tkl+Int Clr Err Touches Def Pen \\\n",
"2929 94.0 13.0 0.0 13.0 78.0 77.0 1.0 1248.0 142.0 \n",
"\n",
" Att Pen Succ% #Pl Megs Carries CPA Mis Dis Targ Rec Rec% \\\n",
"2929 7.0 44.4 5.0 0.0 750.0 0.0 6.0 6.0 800.0 783.0 97.9 \n",
"\n",
" Prog.1 Mn/MP Min% Mn/Start Compl Subs Mn/Sub unSub PPM onG \\\n",
"2929 4.0 75 50.5 83.0 17.0 3 19.0 2 1.43 26.0 \n",
"\n",
" onGA +/- +/-90 On-Off onxG onxGA xG+/- xG+/-90 On-Off.1 2CrdY \\\n",
"2929 22.0 4.0 0.21 1.01 19.2 23.2 -4.1 -0.21 0.46 0.0 \n",
"\n",
" Fls PKwon PKcon OG Recov Won Lost Won% season Team Name \\\n",
"2929 23 0.0 1.0 0.0 191.0 22.0 28.0 44.0 2020/2021 Genoa \n",
"\n",
" Team Country Player Lower First Name Lower Last Name Lower \\\n",
"2929 Italy domenico criscito domenico criscito \n",
"\n",
" First Initial Lower Team Country Lower Nationality Code \\\n",
"2929 d italy ITA \n",
"\n",
" Nationality Cleaned Primary Pos Position Grouped outfielder_goalkeeper \\\n",
"2929 Italy DF Defender Outfielder \n",
"\n",
" GA GA90 SoTA Saves Save% W D L CS CS% PKA PKsv PKm \\\n",
"2929 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN \n",
"\n",
" Save%.1 PSxG PSxG/SoT PSxG+/- /90 Thr Launch% AvgLen Launch%.1 \\\n",
"2929 NaN NaN NaN NaN NaN NaN NaN NaN NaN \n",
"\n",
" AvgLen.1 Opp Stp Stp% #OPA #OPA/90 AvgDist player_name_lower \\\n",
"2929 NaN NaN NaN NaN NaN NaN NaN domenico criscito \n",
"\n",
" first_name_lower last_name_lower first_initial_lower country_lower \\\n",
"2929 domenico criscito d italy \n",
"\n",
" player_name_fbref url_fbref \\\n",
"2929 Domenico Criscito https://fbref.com/en/players/35dd6d80/Domenico... \n",
"\n",
" url_tm TmPos tm_id \\\n",
"2929 https://www.transfermarkt.com/domenico-criscit... Left-Back 44136 \n",
"\n",
" fbref_id player_name_tm club current_club league_code \\\n",
"2929 35dd6d80 domenico criscito Genoa CFC genoa cfc IT1 \n",
"\n",
" current_age market_value_gbp market_value_eur dob pob \\\n",
"2929 34.0 1800000.0 2000000.0 1986-12-30 Cercola \n",
"\n",
" position position_code position_grouped height foot \\\n",
"2929 Defender - Centre-Back CB Defender 183.0 left \n",
"\n",
" citizenship second_citizenship player_agent \\\n",
"2929 Italy NaN PDP s.r.l. Pasqualin D’Amico Partners \n",
"\n",
" birth_day birth_month cob current_club_country market_value_euros \\\n",
"2929 30.0 12.0 Italy italy 1500000.0 \n",
"\n",
" joined contract_expires contract_option on_loan_from \\\n",
"2929 2018-07-01 2023-06-30 NaN NaN \n",
"\n",
" on_loan_from_country loan_contract_expiry name_lower \\\n",
"2929 NaN NaN domenico criscito \n",
"\n",
" firstname_lower lastname_lower firstinitial_lower league_country_lower \\\n",
"2929 domenico criscito d italy \n",
"\n",
" age age_when_joining years_since_joining \\\n",
"2929 34.0 31.0 3.0 \n",
"\n",
" years_until_contract_expiry market_value_pounds club_name \\\n",
"2929 1.0 1350000.0 NaN \n",
"\n",
" club_involved_name fee transfer_movement transfer_period fee_cleaned \\\n",
"2929 NaN NaN NaN NaN NaN \n",
"\n",
" league_name \n",
"2929 NaN "
]
},
"execution_count": 111,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"df_merge_fbref_tm[df_merge_fbref_tm.index == 2929]"
]
},
{
"cell_type": "code",
"execution_count": 112,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" player | \n",
" season | \n",
" league | \n",
" team | \n",
" position | \n",
" outfielder_goalkeeper | \n",
" age | \n",
" country | \n",
" weekly_gross_base_salary_gbp | \n",
" annual_gross_base_salary_gbp | \n",
" adj_current_gross_base_salary_gbp | \n",
" estimated_gross_total_gbp | \n",
" current_contract_status | \n",
" current_contract_expiration | \n",
" current_contract_length | \n",
" player_name_lower | \n",
" first_name_lower | \n",
" last_name_lower | \n",
" first_initial_lower | \n",
" country_lower | \n",
"
\n",
" \n",
" \n",
" \n",
" 6473 | \n",
" Zinédine Machach | \n",
" 2017/2018 | \n",
" Ligue 1 | \n",
" Toulouse | \n",
" Midfielder | \n",
" Outfielder | \n",
" 21 | \n",
" France | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" zinedine machach | \n",
" zinedine | \n",
" machach | \n",
" z | \n",
" france | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" player season league team position \\\n",
"6473 Zinédine Machach 2017/2018 Ligue 1 Toulouse Midfielder \n",
"\n",
" outfielder_goalkeeper age country weekly_gross_base_salary_gbp \\\n",
"6473 Outfielder 21 France 0.0 \n",
"\n",
" annual_gross_base_salary_gbp adj_current_gross_base_salary_gbp \\\n",
"6473 0.0 0.0 \n",
"\n",
" estimated_gross_total_gbp current_contract_status \\\n",
"6473 NaN NaN \n",
"\n",
" current_contract_expiration current_contract_length player_name_lower \\\n",
"6473 NaN NaN zinedine machach \n",
"\n",
" first_name_lower last_name_lower first_initial_lower country_lower \n",
"6473 zinedine machach z france "
]
},
"execution_count": 112,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"df_capology[df_capology.index == 6473]"
]
},
{
"cell_type": "code",
"execution_count": 113,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" level_0 | \n",
" level_1 | \n",
" first_name | \n",
" last_name | \n",
" country | \n",
" Score | \n",
"
\n",
" \n",
" \n",
" \n",
" 1363 | \n",
" 3 | \n",
" 13982 | \n",
" 1.0 | \n",
" 1.0 | \n",
" 1.0 | \n",
" 3.0 | \n",
"
\n",
" \n",
" 2395 | \n",
" 4 | \n",
" 14715 | \n",
" 1.0 | \n",
" 1.0 | \n",
" 1.0 | \n",
" 3.0 | \n",
"
\n",
" \n",
" 2 | \n",
" 5 | \n",
" 15294 | \n",
" 1.0 | \n",
" 1.0 | \n",
" 1.0 | \n",
" 3.0 | \n",
"
\n",
" \n",
" 1019 | \n",
" 6 | \n",
" 15894 | \n",
" 1.0 | \n",
" 1.0 | \n",
" 1.0 | \n",
" 3.0 | \n",
"
\n",
" \n",
" 1364 | \n",
" 10 | \n",
" 848 | \n",
" 1.0 | \n",
" 1.0 | \n",
" 1.0 | \n",
" 3.0 | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" level_0 level_1 first_name last_name country Score\n",
"1363 3 13982 1.0 1.0 1.0 3.0\n",
"2395 4 14715 1.0 1.0 1.0 3.0\n",
"2 5 15294 1.0 1.0 1.0 3.0\n",
"1019 6 15894 1.0 1.0 1.0 3.0\n",
"1364 10 848 1.0 1.0 1.0 3.0"
]
},
"execution_count": 113,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# Select only the top match per per left index (FBref-TM merged data)\n",
"\n",
"## Order the potential matches by left index (FBref-TM merged data) ascending and score decending\n",
"potential_matches = potential_matches.sort_values(by=['level_0', 'Score'], ascending=[True, False])\n",
"\n",
"## Dedupe DataFrame, keeping only the top row\n",
"potential_matches = potential_matches.drop_duplicates(subset=['level_0'], keep='first')\n",
"\n",
"\n",
"# Display DataFrame\n",
"potential_matches.head()"
]
},
{
"cell_type": "code",
"execution_count": 114,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"(5218, 6)"
]
},
"execution_count": 114,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# Shape of potential matches DataFrame\n",
"potential_matches.shape"
]
},
{
"cell_type": "code",
"execution_count": 115,
"metadata": {},
"outputs": [],
"source": [
"# Join Datasets\n",
"\n",
"## Join Datasets\n",
"\n",
"\n",
"### Join the FBref Outfielder DataFrame to the potential matches DataFrame\n",
"#df_merge_fbref_tm_capology = pd.merge(potential_matches, df_merge_fbref_tm, left_on='level_0', right_index=True, how='left')\n",
"df_merge_fbref_tm_capology = pd.merge(df_merge_fbref_tm, potential_matches, left_index=True, right_on='level_0', how='left')\n",
"\n",
"\n",
"### Join the TransferMarkt Outfielder DataFrame to the potential matches DataFrame\n",
"df_merge_fbref_tm_capology = pd.merge(df_merge_fbref_tm_capology, df_capology, left_on='level_1', right_index=True, how='left')\n",
"\n",
"\n",
"\n",
"## Data cleanup\n",
"\n",
"\n",
"### Rename columns - required otherwise 'birth_year' gets dropped\n",
"df_merge_fbref_tm_capology = df_merge_fbref_tm_capology.rename(columns={'birth_year': 'born'})\n",
"\n",
"\n",
"### Sort columns\n",
"df_merge_fbref_tm_capology = df_merge_fbref_tm_capology.sort_values(by=['season_x', 'player_name_fbref', 'tm_id', 'Score'], ascending=[True, True, True, False])\n",
"\n",
"\n",
"### Remove duplicates\n",
"\n",
"\n",
"#### Remove duplicate columns after join (contain '_y') and remove '_x' suffix from kept columns\n",
"df_merge_fbref_tm_capology = df_merge_fbref_tm_capology[df_merge_fbref_tm_capology.columns.drop(list(df_merge_fbref_tm_capology.filter(regex='_y')))]\n",
"df_merge_fbref_tm_capology.columns = df_merge_fbref_tm_capology.columns.str.replace('_x', '')\n",
"\n",
"#### Remove duplicate rows\n",
"df_merge_fbref_tm_capology = df_merge_fbref_tm_capology.drop_duplicates(subset=['player_name_fbref', 'tm_id', 'fbref_id', 'season', 'Team Name', 'Comp'], keep='first')\n",
"\n",
"\n",
"\n",
"### Rename columns\n",
"df_merge_fbref_tm_capology = df_merge_fbref_tm_capology.rename(columns={'born': 'birth_year',\n",
" 'player': 'player_name_capology'\n",
" }\n",
"\n",
" )\n",
"\n",
"\n",
"### Sort columns\n",
"df_merge_fbref_tm_capology = df_merge_fbref_tm_capology.sort_values(by=['player_name_fbref', 'season'], ascending=[True, True])\n",
"\n",
"\n",
"### Reset index\n",
"df_merge_fbref_tm = df_merge_fbref_tm.reset_index(drop=True)\n",
"\n",
"\n",
"\n",
"## Determine columns to keep and remove\n",
"\n",
"\n",
"### Drop unnecessary columns\n",
"df_merge_fbref_tm_capology = df_merge_fbref_tm_capology.drop(['Score', 'level_0', 'level_1', 'first_name' , 'last_name', 'country'], axis=1)\n",
"\n",
"\n",
"### Capology\n",
"lst_cols_capology = ['player_name_capology',\n",
" 'first_initial_lower',\n",
" 'first_name_lower',\n",
" 'last_name_lower',\n",
" 'country_lower',\n",
" 'outfielder_goalkeeper',\n",
" 'season'\n",
" ]\n",
"\n",
"\n",
"### Combine all columns of interest into a single list\n",
"lst_fbref_tm_capology_select = list(lst_cols_capology)\n",
"lst_fbref_tm_capology_select.extend(x for x in lst_fbref_tm_select if x not in lst_fbref_tm_capology_select)\n",
"\n",
"\n",
"### Determine columns not of interest as separate list\n",
"lst_fbref_tm_capology_non_select = list(set(list(df_merge_fbref_tm_capology.columns)) - set(lst_fbref_tm_capology_select))\n",
"\n",
"\n",
"### Define all columns\n",
"lst_fbref_tm_capology_all = list(df_merge_fbref_tm_capology.columns)\n",
"\n",
"\n",
"\n",
"## Select columns of interest\n",
"df_merge_fbref_tm_capology_select = df_merge_fbref_tm_capology[lst_fbref_tm_capology_select]"
]
},
{
"cell_type": "code",
"execution_count": 116,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"No. rows in FBref-TM DataFrame before join to Capology data: 12753\n",
"No. rows in DataFrame AFTER join: 12753\n",
"\n",
"----------\n",
"\n",
"Variance in rows before and after join: 0\n",
"\n"
]
}
],
"source": [
"print('No. rows in FBref-TM DataFrame before join to Capology data: {}'.format(len(df_merge_fbref_tm_select)))\n",
"print('No. rows in DataFrame AFTER join: {}\\n'.format(len(df_merge_fbref_tm_capology_select)))\n",
"print('-'*10+'\\n')\n",
"print('Variance in rows before and after join: {}\\n'.format(len(df_merge_fbref_tm_capology_select) - len(df_merge_fbref_tm_select)))"
]
},
{
"cell_type": "code",
"execution_count": 117,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" player_name_capology | \n",
" first_initial_lower | \n",
" first_name_lower | \n",
" last_name_lower | \n",
" country_lower | \n",
" outfielder_goalkeeper | \n",
" season | \n",
" player_name_fbref | \n",
" fbref_id | \n",
" url_fbref | \n",
" birth_year | \n",
" player_name_tm | \n",
" url_tm | \n",
" tm_id | \n",
"
\n",
" \n",
" \n",
" \n",
" NaN | \n",
" NaN | \n",
" a | \n",
" aaron | \n",
" connolly | \n",
" ireland | \n",
" Outfielder | \n",
" 2019/2020 | \n",
" Aaron Connolly | \n",
" 27c01749 | \n",
" https://fbref.com/en/players/27c01749/Aaron-Co... | \n",
" 2000.0 | \n",
" aaron connolly | \n",
" https://www.transfermarkt.com/aaron-connolly/p... | \n",
" 434207 | \n",
"
\n",
" \n",
" NaN | \n",
" NaN | \n",
" a | \n",
" aaron | \n",
" connolly | \n",
" ireland | \n",
" Outfielder | \n",
" 2020/2021 | \n",
" Aaron Connolly | \n",
" 27c01749 | \n",
" https://fbref.com/en/players/27c01749/Aaron-Co... | \n",
" 2000.0 | \n",
" aaron connolly | \n",
" https://www.transfermarkt.com/aaron-connolly/p... | \n",
" 434207 | \n",
"
\n",
" \n",
" NaN | \n",
" NaN | \n",
" a | \n",
" aaron | \n",
" connolly | \n",
" ireland | \n",
" Outfielder | \n",
" 2021/2022 | \n",
" Aaron Connolly | \n",
" 27c01749 | \n",
" https://fbref.com/en/players/27c01749/Aaron-Co... | \n",
" 2000.0 | \n",
" aaron connolly | \n",
" https://www.transfermarkt.com/aaron-connolly/p... | \n",
" 434207 | \n",
"
\n",
" \n",
" 1363.0 | \n",
" Aaron Cresswell | \n",
" a | \n",
" aaron | \n",
" cresswell | \n",
" england | \n",
" Outfielder | \n",
" 2017/2018 | \n",
" Aaron Cresswell | \n",
" 4f974391 | \n",
" https://fbref.com/en/players/4f974391/Aaron-Cr... | \n",
" 1989.0 | \n",
" aaron cresswell | \n",
" https://www.transfermarkt.com/aaron-cresswell/... | \n",
" 92571 | \n",
"
\n",
" \n",
" 2395.0 | \n",
" Aaron Cresswell | \n",
" a | \n",
" aaron | \n",
" cresswell | \n",
" england | \n",
" Outfielder | \n",
" 2018/2019 | \n",
" Aaron Cresswell | \n",
" 4f974391 | \n",
" https://fbref.com/en/players/4f974391/Aaron-Cr... | \n",
" 1989.0 | \n",
" aaron cresswell | \n",
" https://www.transfermarkt.com/aaron-cresswell/... | \n",
" 92571 | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" player_name_capology first_initial_lower first_name_lower \\\n",
"NaN NaN a aaron \n",
"NaN NaN a aaron \n",
"NaN NaN a aaron \n",
"1363.0 Aaron Cresswell a aaron \n",
"2395.0 Aaron Cresswell a aaron \n",
"\n",
" last_name_lower country_lower outfielder_goalkeeper season \\\n",
"NaN connolly ireland Outfielder 2019/2020 \n",
"NaN connolly ireland Outfielder 2020/2021 \n",
"NaN connolly ireland Outfielder 2021/2022 \n",
"1363.0 cresswell england Outfielder 2017/2018 \n",
"2395.0 cresswell england Outfielder 2018/2019 \n",
"\n",
" player_name_fbref fbref_id \\\n",
"NaN Aaron Connolly 27c01749 \n",
"NaN Aaron Connolly 27c01749 \n",
"NaN Aaron Connolly 27c01749 \n",
"1363.0 Aaron Cresswell 4f974391 \n",
"2395.0 Aaron Cresswell 4f974391 \n",
"\n",
" url_fbref birth_year \\\n",
"NaN https://fbref.com/en/players/27c01749/Aaron-Co... 2000.0 \n",
"NaN https://fbref.com/en/players/27c01749/Aaron-Co... 2000.0 \n",
"NaN https://fbref.com/en/players/27c01749/Aaron-Co... 2000.0 \n",
"1363.0 https://fbref.com/en/players/4f974391/Aaron-Cr... 1989.0 \n",
"2395.0 https://fbref.com/en/players/4f974391/Aaron-Cr... 1989.0 \n",
"\n",
" player_name_tm url_tm \\\n",
"NaN aaron connolly https://www.transfermarkt.com/aaron-connolly/p... \n",
"NaN aaron connolly https://www.transfermarkt.com/aaron-connolly/p... \n",
"NaN aaron connolly https://www.transfermarkt.com/aaron-connolly/p... \n",
"1363.0 aaron cresswell https://www.transfermarkt.com/aaron-cresswell/... \n",
"2395.0 aaron cresswell https://www.transfermarkt.com/aaron-cresswell/... \n",
"\n",
" tm_id \n",
"NaN 434207 \n",
"NaN 434207 \n",
"NaN 434207 \n",
"1363.0 92571 \n",
"2395.0 92571 "
]
},
"execution_count": 117,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# Display DataFrame\n",
"df_merge_fbref_tm_capology_select.head()"
]
},
{
"cell_type": "code",
"execution_count": 118,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" Nation | \n",
" Pos | \n",
" Squad | \n",
" Comp | \n",
" Age | \n",
" birth_year | \n",
" MP | \n",
" Starts | \n",
" Min | \n",
" 90s | \n",
" Gls | \n",
" Ast | \n",
" G-PK | \n",
" PK | \n",
" PKatt | \n",
" CrdY | \n",
" CrdR | \n",
" Gls.1 | \n",
" Ast.1 | \n",
" G+A | \n",
" G-PK.1 | \n",
" G+A-PK | \n",
" xG | \n",
" npxG | \n",
" xA | \n",
" npxG+xA | \n",
" xG.1 | \n",
" xA.1 | \n",
" xG+xA | \n",
" npxG.1 | \n",
" npxG+xA.1 | \n",
" Matches | \n",
" Sh | \n",
" SoT | \n",
" SoT% | \n",
" Sh/90 | \n",
" SoT/90 | \n",
" G/Sh | \n",
" G/SoT | \n",
" Dist | \n",
" FK | \n",
" npxG/Sh | \n",
" G-xG | \n",
" np:G-xG | \n",
" Cmp | \n",
" Att | \n",
" Cmp% | \n",
" TotDist | \n",
" PrgDist | \n",
" Cmp.1 | \n",
" Att.1 | \n",
" Cmp%.1 | \n",
" Cmp.2 | \n",
" Att.2 | \n",
" Cmp%.2 | \n",
" Cmp.3 | \n",
" Att.3 | \n",
" Cmp%.3 | \n",
" A-xA | \n",
" KP | \n",
" 1/3 | \n",
" PPA | \n",
" CrsPA | \n",
" Prog | \n",
" Live | \n",
" Dead | \n",
" TB | \n",
" Press | \n",
" Sw | \n",
" Crs | \n",
" CK | \n",
" In | \n",
" Out | \n",
" Str | \n",
" Ground | \n",
" Low | \n",
" High | \n",
" Left | \n",
" Right | \n",
" Head | \n",
" TI | \n",
" Other | \n",
" Off | \n",
" Out.1 | \n",
" Int | \n",
" Blocks | \n",
" SCA | \n",
" SCA90 | \n",
" PassLive | \n",
" PassDead | \n",
" Drib | \n",
" Fld | \n",
" Def | \n",
" GCA | \n",
" GCA90 | \n",
" PassLive.1 | \n",
" PassDead.1 | \n",
" Drib.1 | \n",
" Sh.1 | \n",
" Fld.1 | \n",
" Def.1 | \n",
" Tkl | \n",
" TklW | \n",
" Def 3rd | \n",
" Mid 3rd | \n",
" Att 3rd | \n",
" Tkl.1 | \n",
" Tkl% | \n",
" Past | \n",
" Succ | \n",
" % | \n",
" Def 3rd.1 | \n",
" Mid 3rd.1 | \n",
" Att 3rd.1 | \n",
" ShSv | \n",
" Pass | \n",
" Tkl+Int | \n",
" Clr | \n",
" Err | \n",
" Touches | \n",
" Def Pen | \n",
" Att Pen | \n",
" Succ% | \n",
" #Pl | \n",
" Megs | \n",
" Carries | \n",
" CPA | \n",
" Mis | \n",
" Dis | \n",
" Targ | \n",
" Rec | \n",
" Rec% | \n",
" Prog.1 | \n",
" Mn/MP | \n",
" Min% | \n",
" Mn/Start | \n",
" Compl | \n",
" Subs | \n",
" Mn/Sub | \n",
" unSub | \n",
" PPM | \n",
" onG | \n",
" onGA | \n",
" +/- | \n",
" +/-90 | \n",
" On-Off | \n",
" onxG | \n",
" onxGA | \n",
" xG+/- | \n",
" xG+/-90 | \n",
" On-Off.1 | \n",
" 2CrdY | \n",
" Fls | \n",
" PKwon | \n",
" PKcon | \n",
" OG | \n",
" Recov | \n",
" Won | \n",
" Lost | \n",
" Won% | \n",
" season | \n",
" Team Name | \n",
" Team Country | \n",
" Player Lower | \n",
" First Name Lower | \n",
" Last Name Lower | \n",
" First Initial Lower | \n",
" Team Country Lower | \n",
" Nationality Code | \n",
" Nationality Cleaned | \n",
" Primary Pos | \n",
" Position Grouped | \n",
" outfielder_goalkeeper | \n",
" GA | \n",
" GA90 | \n",
" SoTA | \n",
" Saves | \n",
" Save% | \n",
" W | \n",
" D | \n",
" L | \n",
" CS | \n",
" CS% | \n",
" PKA | \n",
" PKsv | \n",
" PKm | \n",
" Save%.1 | \n",
" PSxG | \n",
" PSxG/SoT | \n",
" PSxG+/- | \n",
" /90 | \n",
" Thr | \n",
" Launch% | \n",
" AvgLen | \n",
" Launch%.1 | \n",
" AvgLen.1 | \n",
" Opp | \n",
" Stp | \n",
" Stp% | \n",
" #OPA | \n",
" #OPA/90 | \n",
" AvgDist | \n",
" player_name_lower | \n",
" first_name_lower | \n",
" last_name_lower | \n",
" first_initial_lower | \n",
" country_lower | \n",
" player_name_fbref | \n",
" url_fbref | \n",
" url_tm | \n",
" TmPos | \n",
" tm_id | \n",
" fbref_id | \n",
" player_name_tm | \n",
" club | \n",
" current_club | \n",
" league_code | \n",
" current_age | \n",
" market_value_gbp | \n",
" market_value_eur | \n",
" dob | \n",
" pob | \n",
" position | \n",
" position_code | \n",
" position_grouped | \n",
" height | \n",
" foot | \n",
" citizenship | \n",
" second_citizenship | \n",
" player_agent | \n",
" birth_day | \n",
" birth_month | \n",
" cob | \n",
" current_club_country | \n",
" market_value_euros | \n",
" joined | \n",
" contract_expires | \n",
" contract_option | \n",
" on_loan_from | \n",
" on_loan_from_country | \n",
" loan_contract_expiry | \n",
" name_lower | \n",
" firstname_lower | \n",
" lastname_lower | \n",
" firstinitial_lower | \n",
" league_country_lower | \n",
" age | \n",
" age_when_joining | \n",
" years_since_joining | \n",
" years_until_contract_expiry | \n",
" market_value_pounds | \n",
" club_name | \n",
" club_involved_name | \n",
" fee | \n",
" transfer_movement | \n",
" transfer_period | \n",
" fee_cleaned | \n",
" league_name | \n",
" player_name_capology | \n",
" league | \n",
" team | \n",
" weekly_gross_base_salary_gbp | \n",
" annual_gross_base_salary_gbp | \n",
" adj_current_gross_base_salary_gbp | \n",
" estimated_gross_total_gbp | \n",
" current_contract_status | \n",
" current_contract_expiration | \n",
" current_contract_length | \n",
"
\n",
" \n",
" \n",
" \n",
" NaN | \n",
" ie IRL | \n",
" FW | \n",
" Brighton | \n",
" Premier League | \n",
" 19 | \n",
" 2000.0 | \n",
" 24 | \n",
" 14 | \n",
" 1258.0 | \n",
" 14.0 | \n",
" 3 | \n",
" 1 | \n",
" 3 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0.21 | \n",
" 0.07 | \n",
" 0.29 | \n",
" 0.21 | \n",
" 0.29 | \n",
" 3.2 | \n",
" 3.2 | \n",
" 0.3 | \n",
" 3.5 | \n",
" 0.23 | \n",
" 0.02 | \n",
" 0.25 | \n",
" 0.23 | \n",
" 0.25 | \n",
" Matches | \n",
" 38.0 | \n",
" 13.0 | \n",
" 34.2 | \n",
" 2.72 | \n",
" 0.93 | \n",
" 0.08 | \n",
" 0.23 | \n",
" 15.9 | \n",
" 0.0 | \n",
" 0.08 | \n",
" -0.2 | \n",
" -0.2 | \n",
" 126.0 | \n",
" 163.0 | \n",
" 77.3 | \n",
" 1739.0 | \n",
" 242.0 | \n",
" 76.0 | \n",
" 92.0 | \n",
" 82.6 | \n",
" 31.0 | \n",
" 39.0 | \n",
" 79.5 | \n",
" 7.0 | \n",
" 11.0 | \n",
" 63.6 | \n",
" 0.7 | \n",
" 6.0 | \n",
" 6.0 | \n",
" 2.0 | \n",
" 0.0 | \n",
" 10.0 | \n",
" 148.0 | \n",
" 15.0 | \n",
" 1.0 | \n",
" 50.0 | \n",
" 0.0 | \n",
" 7.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 90.0 | \n",
" 52.0 | \n",
" 21.0 | \n",
" 27.0 | \n",
" 107.0 | \n",
" 13.0 | \n",
" 1.0 | \n",
" 6.0 | \n",
" 0.0 | \n",
" 1.0 | \n",
" 4.0 | \n",
" 10.0 | \n",
" 25.0 | \n",
" 1.79 | \n",
" 7.0 | \n",
" 0.0 | \n",
" 3.0 | \n",
" 9.0 | \n",
" 3.0 | \n",
" 5.0 | \n",
" 0.36 | \n",
" 1.0 | \n",
" 0.0 | \n",
" 1.0 | \n",
" 1.0 | \n",
" 2.0 | \n",
" 0.0 | \n",
" 12.0 | \n",
" 8.0 | \n",
" 1.0 | \n",
" 5.0 | \n",
" 6.0 | \n",
" 3.0 | \n",
" 25.0 | \n",
" 9.0 | \n",
" 69.0 | \n",
" 29.5 | \n",
" 14.0 | \n",
" 94.0 | \n",
" 126.0 | \n",
" 0.0 | \n",
" 7.0 | \n",
" 17.0 | \n",
" 1.0 | \n",
" 0.0 | \n",
" 349.0 | \n",
" 2.0 | \n",
" 61.0 | \n",
" 37.5 | \n",
" 6.0 | \n",
" 1.0 | \n",
" 228.0 | \n",
" 12.0 | \n",
" 42.0 | \n",
" 34.0 | \n",
" 535.0 | \n",
" 235.0 | \n",
" 43.9 | \n",
" 99.0 | \n",
" 52 | \n",
" 36.8 | \n",
" 72.0 | \n",
" 0.0 | \n",
" 10 | \n",
" 26.0 | \n",
" 4 | \n",
" 1.13 | \n",
" 18.0 | \n",
" 22.0 | \n",
" -4.0 | \n",
" -0.29 | \n",
" 0.17 | \n",
" 15.6 | \n",
" 19.8 | \n",
" -4.2 | \n",
" -0.30 | \n",
" 0.08 | \n",
" 0.0 | \n",
" 16 | \n",
" 2.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 54.0 | \n",
" 14.0 | \n",
" 48.0 | \n",
" 22.6 | \n",
" 2019/2020 | \n",
" Brighton | \n",
" England | \n",
" aaron connolly | \n",
" aaron | \n",
" connolly | \n",
" a | \n",
" england | \n",
" IRL | \n",
" Ireland | \n",
" FW | \n",
" Forward | \n",
" Outfielder | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" aaron connolly | \n",
" aaron | \n",
" connolly | \n",
" a | \n",
" ireland | \n",
" Aaron Connolly | \n",
" https://fbref.com/en/players/27c01749/Aaron-Co... | \n",
" https://www.transfermarkt.com/aaron-connolly/p... | \n",
" Centre-Forward | \n",
" 434207 | \n",
" 27c01749 | \n",
" aaron connolly | \n",
" Brighton Hove Albion | \n",
" brighton & hove albion | \n",
" GB1 | \n",
" 21.0 | \n",
" 4050000.0 | \n",
" 4500000.0 | \n",
" 2000-01-28 | \n",
" Galway | \n",
" attack - Centre-Forward | \n",
" ST | \n",
" Forward | \n",
" 175.0 | \n",
" right | \n",
" Ireland | \n",
" NaN | \n",
" PLG | \n",
" 28.0 | \n",
" 1.0 | \n",
" Ireland | \n",
" england | \n",
" 7000000.0 | \n",
" 2019-07-01 | \n",
" 2024-06-30 | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" aaron connolly | \n",
" aaron | \n",
" connolly | \n",
" a | \n",
" england | \n",
" 21.0 | \n",
" 19.0 | \n",
" 2.0 | \n",
" 2.0 | \n",
" 6300000.0 | \n",
" Brighton & Hove Albion | \n",
" Brighton U23 | \n",
" - | \n",
" in | \n",
" Summer | \n",
" 0.0 | \n",
" Premier League | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
"
\n",
" \n",
" NaN | \n",
" ie IRL | \n",
" FW | \n",
" Brighton | \n",
" Premier League | \n",
" 20 | \n",
" 2000.0 | \n",
" 17 | \n",
" 9 | \n",
" 791.0 | \n",
" 8.8 | \n",
" 2 | \n",
" 1 | \n",
" 2 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0.23 | \n",
" 0.11 | \n",
" 0.34 | \n",
" 0.23 | \n",
" 0.34 | \n",
" 3.5 | \n",
" 3.5 | \n",
" 0.2 | \n",
" 3.7 | \n",
" 0.40 | \n",
" 0.02 | \n",
" 0.42 | \n",
" 0.40 | \n",
" 0.42 | \n",
" Matches | \n",
" 23.0 | \n",
" 8.0 | \n",
" 34.8 | \n",
" 2.62 | \n",
" 0.91 | \n",
" 0.09 | \n",
" 0.25 | \n",
" 13.7 | \n",
" 0.0 | \n",
" 0.15 | \n",
" -1.5 | \n",
" -1.5 | \n",
" 79.0 | \n",
" 101.0 | \n",
" 78.2 | \n",
" 1147.0 | \n",
" 165.0 | \n",
" 45.0 | \n",
" 56.0 | \n",
" 80.4 | \n",
" 26.0 | \n",
" 30.0 | \n",
" 86.7 | \n",
" 4.0 | \n",
" 5.0 | \n",
" 80.0 | \n",
" 0.8 | \n",
" 5.0 | \n",
" 2.0 | \n",
" 1.0 | \n",
" 0.0 | \n",
" 3.0 | \n",
" 91.0 | \n",
" 10.0 | \n",
" 0.0 | \n",
" 22.0 | \n",
" 1.0 | \n",
" 2.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 64.0 | \n",
" 26.0 | \n",
" 11.0 | \n",
" 11.0 | \n",
" 74.0 | \n",
" 5.0 | \n",
" 0.0 | \n",
" 3.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 2.0 | \n",
" 4.0 | \n",
" 12.0 | \n",
" 1.37 | \n",
" 7.0 | \n",
" 0.0 | \n",
" 3.0 | \n",
" 2.0 | \n",
" 0.0 | \n",
" 1.0 | \n",
" 0.11 | \n",
" 1.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 7.0 | \n",
" 5.0 | \n",
" 2.0 | \n",
" 4.0 | \n",
" 1.0 | \n",
" 1.0 | \n",
" 20.0 | \n",
" 4.0 | \n",
" 40.0 | \n",
" 32.3 | \n",
" 7.0 | \n",
" 58.0 | \n",
" 59.0 | \n",
" 0.0 | \n",
" 8.0 | \n",
" 7.0 | \n",
" 1.0 | \n",
" 0.0 | \n",
" 201.0 | \n",
" 1.0 | \n",
" 38.0 | \n",
" 80.0 | \n",
" 8.0 | \n",
" 0.0 | \n",
" 124.0 | \n",
" 4.0 | \n",
" 29.0 | \n",
" 15.0 | \n",
" 357.0 | \n",
" 143.0 | \n",
" 40.1 | \n",
" 64.0 | \n",
" 47 | \n",
" 23.1 | \n",
" 68.0 | \n",
" NaN | \n",
" 8 | \n",
" 23.0 | \n",
" 11 | \n",
" 0.88 | \n",
" 12.0 | \n",
" 17.0 | \n",
" -5.0 | \n",
" -0.57 | \n",
" -0.53 | \n",
" 13.8 | \n",
" 7.8 | \n",
" 6.0 | \n",
" 0.69 | \n",
" 0.42 | \n",
" 0.0 | \n",
" 5 | \n",
" 1.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 28.0 | \n",
" 11.0 | \n",
" 30.0 | \n",
" 26.8 | \n",
" 2020/2021 | \n",
" Brighton | \n",
" England | \n",
" aaron connolly | \n",
" aaron | \n",
" connolly | \n",
" a | \n",
" england | \n",
" IRL | \n",
" Ireland | \n",
" FW | \n",
" Forward | \n",
" Outfielder | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" aaron connolly | \n",
" aaron | \n",
" connolly | \n",
" a | \n",
" ireland | \n",
" Aaron Connolly | \n",
" https://fbref.com/en/players/27c01749/Aaron-Co... | \n",
" https://www.transfermarkt.com/aaron-connolly/p... | \n",
" Centre-Forward | \n",
" 434207 | \n",
" 27c01749 | \n",
" aaron connolly | \n",
" Brighton Hove Albion | \n",
" brighton & hove albion | \n",
" GB1 | \n",
" 21.0 | \n",
" 6300000.0 | \n",
" 7000000.0 | \n",
" 2000-01-28 | \n",
" Galway | \n",
" attack - Centre-Forward | \n",
" ST | \n",
" Forward | \n",
" 175.0 | \n",
" right | \n",
" Ireland | \n",
" NaN | \n",
" PLG | \n",
" 28.0 | \n",
" 1.0 | \n",
" Ireland | \n",
" england | \n",
" 7000000.0 | \n",
" 2019-07-01 | \n",
" 2024-06-30 | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" aaron connolly | \n",
" aaron | \n",
" connolly | \n",
" a | \n",
" england | \n",
" 21.0 | \n",
" 19.0 | \n",
" 2.0 | \n",
" 2.0 | \n",
" 6300000.0 | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
"
\n",
" \n",
" NaN | \n",
" ie IRL | \n",
" FW | \n",
" Brighton | \n",
" Premier League | \n",
" 21 | \n",
" 2000.0 | \n",
" 1 | \n",
" 0 | \n",
" 45.0 | \n",
" 0.5 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0.00 | \n",
" 0.00 | \n",
" 0.00 | \n",
" 0.00 | \n",
" 0.00 | \n",
" 0.4 | \n",
" 0.4 | \n",
" 0.0 | \n",
" 0.4 | \n",
" 0.85 | \n",
" 0.00 | \n",
" 0.85 | \n",
" 0.85 | \n",
" 0.85 | \n",
" Matches | \n",
" 1.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 2.00 | \n",
" 0.00 | \n",
" 0.00 | \n",
" NaN | \n",
" 9.0 | \n",
" 0.0 | \n",
" 0.42 | \n",
" -0.4 | \n",
" -0.4 | \n",
" 2.0 | \n",
" 3.0 | \n",
" 66.7 | \n",
" 14.0 | \n",
" 0.0 | \n",
" 2.0 | \n",
" 2.0 | \n",
" 100.0 | \n",
" 0.0 | \n",
" 1.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" NaN | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 3.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 1.0 | \n",
" 0.0 | \n",
" 1.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 2.0 | \n",
" 1.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 2.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 1.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 1.0 | \n",
" 2.00 | \n",
" 1.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.00 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" NaN | \n",
" 0.0 | \n",
" 1.0 | \n",
" 8.3 | \n",
" 1.0 | \n",
" 6.0 | \n",
" 5.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 8.0 | \n",
" 0.0 | \n",
" 2.0 | \n",
" NaN | \n",
" 0.0 | \n",
" 0.0 | \n",
" 5.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 1.0 | \n",
" 20.0 | \n",
" 4.0 | \n",
" 20.0 | \n",
" 2.0 | \n",
" 45 | \n",
" 16.7 | \n",
" NaN | \n",
" 0.0 | \n",
" 1 | \n",
" 45.0 | \n",
" 1 | \n",
" 3.00 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.00 | \n",
" -0.40 | \n",
" 1.0 | \n",
" 0.7 | \n",
" 0.3 | \n",
" 0.68 | \n",
" 0.74 | \n",
" 0.0 | \n",
" 0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 3.0 | \n",
" 0.0 | \n",
" 2.0 | \n",
" 0.0 | \n",
" 2021/2022 | \n",
" Brighton | \n",
" England | \n",
" aaron connolly | \n",
" aaron | \n",
" connolly | \n",
" a | \n",
" england | \n",
" IRL | \n",
" Ireland | \n",
" FW | \n",
" Forward | \n",
" Outfielder | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" aaron connolly | \n",
" aaron | \n",
" connolly | \n",
" a | \n",
" ireland | \n",
" Aaron Connolly | \n",
" https://fbref.com/en/players/27c01749/Aaron-Co... | \n",
" https://www.transfermarkt.com/aaron-connolly/p... | \n",
" Centre-Forward | \n",
" 434207 | \n",
" 27c01749 | \n",
" aaron connolly | \n",
" Brighton Hove Albion | \n",
" brighton & hove albion | \n",
" GB1 | \n",
" 21.0 | \n",
" 6300000.0 | \n",
" 7000000.0 | \n",
" 2000-01-28 | \n",
" Galway | \n",
" attack - Centre-Forward | \n",
" ST | \n",
" Forward | \n",
" 175.0 | \n",
" right | \n",
" Ireland | \n",
" NaN | \n",
" PLG | \n",
" 28.0 | \n",
" 1.0 | \n",
" Ireland | \n",
" england | \n",
" 7000000.0 | \n",
" 2019-07-01 | \n",
" 2024-06-30 | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" aaron connolly | \n",
" aaron | \n",
" connolly | \n",
" a | \n",
" england | \n",
" 21.0 | \n",
" 19.0 | \n",
" 2.0 | \n",
" 2.0 | \n",
" 6300000.0 | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
"
\n",
" \n",
" 1363.0 | \n",
" eng ENG | \n",
" DF | \n",
" West Ham | \n",
" Premier League | \n",
" 27 | \n",
" 1989.0 | \n",
" 36 | \n",
" 35 | \n",
" 3069.0 | \n",
" 34.1 | \n",
" 1 | \n",
" 3 | \n",
" 1 | \n",
" 0 | \n",
" 0 | \n",
" 7 | \n",
" 0 | \n",
" 0.03 | \n",
" 0.09 | \n",
" 0.12 | \n",
" 0.03 | \n",
" 0.12 | \n",
" 0.8 | \n",
" 0.8 | \n",
" 2.8 | \n",
" 3.6 | \n",
" 0.02 | \n",
" 0.08 | \n",
" 0.10 | \n",
" 0.02 | \n",
" 0.10 | \n",
" Matches | \n",
" 21.0 | \n",
" 6.0 | \n",
" 28.6 | \n",
" 0.62 | \n",
" 0.18 | \n",
" 0.05 | \n",
" 0.17 | \n",
" 28.1 | \n",
" 8.0 | \n",
" 0.04 | \n",
" 0.2 | \n",
" 0.2 | \n",
" 1224.0 | \n",
" 1708.0 | \n",
" 71.7 | \n",
" 23519.0 | \n",
" 10212.0 | \n",
" 560.0 | \n",
" 623.0 | \n",
" 89.9 | \n",
" 472.0 | \n",
" 587.0 | \n",
" 80.4 | \n",
" 183.0 | \n",
" 449.0 | \n",
" 40.8 | \n",
" 0.2 | \n",
" 35.0 | \n",
" 117.0 | \n",
" 21.0 | \n",
" 14.0 | \n",
" 96.0 | \n",
" 1343.0 | \n",
" 365.0 | \n",
" 1.0 | \n",
" 222.0 | \n",
" 83.0 | \n",
" 93.0 | \n",
" 67.0 | \n",
" 35.0 | \n",
" 15.0 | \n",
" 9.0 | \n",
" 893.0 | \n",
" 293.0 | \n",
" 522.0 | \n",
" 1329.0 | \n",
" 78.0 | \n",
" 59.0 | \n",
" 210.0 | \n",
" 5.0 | \n",
" 15.0 | \n",
" 44.0 | \n",
" 39.0 | \n",
" 52.0 | \n",
" 62.0 | \n",
" 1.82 | \n",
" 35.0 | \n",
" 21.0 | \n",
" 1.0 | \n",
" 3.0 | \n",
" 0.0 | \n",
" 9.0 | \n",
" 0.26 | \n",
" 6.0 | \n",
" 3.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 38.0 | \n",
" 18.0 | \n",
" 15.0 | \n",
" 18.0 | \n",
" 5.0 | \n",
" 17.0 | \n",
" 53.1 | \n",
" 15.0 | \n",
" 115.0 | \n",
" 32.1 | \n",
" 181.0 | \n",
" 123.0 | \n",
" 54.0 | \n",
" 0.0 | \n",
" 38.0 | \n",
" 90.0 | \n",
" 133.0 | \n",
" 0.0 | \n",
" 2050.0 | \n",
" 125.0 | \n",
" 17.0 | \n",
" 33.3 | \n",
" 7.0 | \n",
" 0.0 | \n",
" 1071.0 | \n",
" 2.0 | \n",
" 18.0 | \n",
" 19.0 | \n",
" 1171.0 | \n",
" 1094.0 | \n",
" 93.4 | \n",
" 31.0 | \n",
" 85 | \n",
" 89.7 | \n",
" NaN | \n",
" 30.0 | \n",
" 1 | \n",
" NaN | \n",
" 1 | \n",
" 1.14 | \n",
" 45.0 | \n",
" 60.0 | \n",
" -15.0 | \n",
" -0.44 | \n",
" 0.84 | \n",
" 38.0 | \n",
" 51.5 | \n",
" -13.5 | \n",
" -0.40 | \n",
" 1.09 | \n",
" 0.0 | \n",
" 20 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 277.0 | \n",
" 70.0 | \n",
" 57.0 | \n",
" 55.1 | \n",
" 2017/2018 | \n",
" West Ham | \n",
" England | \n",
" aaron cresswell | \n",
" aaron | \n",
" cresswell | \n",
" a | \n",
" england | \n",
" ENG | \n",
" England | \n",
" DF | \n",
" Defender | \n",
" Outfielder | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" aaron cresswell | \n",
" aaron | \n",
" cresswell | \n",
" a | \n",
" england | \n",
" Aaron Cresswell | \n",
" https://fbref.com/en/players/4f974391/Aaron-Cr... | \n",
" https://www.transfermarkt.com/aaron-cresswell/... | \n",
" Left-Back | \n",
" 92571 | \n",
" 4f974391 | \n",
" aaron cresswell | \n",
" West Ham United | \n",
" west ham united | \n",
" GB1 | \n",
" 31.0 | \n",
" 10800000.0 | \n",
" 12000000.0 | \n",
" 1989-12-15 | \n",
" Liverpool | \n",
" Defender - Left-Back | \n",
" LB | \n",
" Defender | \n",
" 170.0 | \n",
" left | \n",
" England | \n",
" NaN | \n",
" Unique Sports Management | \n",
" 15.0 | \n",
" 12.0 | \n",
" England | \n",
" england | \n",
" 5000000.0 | \n",
" 2014-07-03 | \n",
" 2023-06-30 | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" aaron cresswell | \n",
" aaron | \n",
" cresswell | \n",
" a | \n",
" england | \n",
" 31.0 | \n",
" 24.0 | \n",
" 7.0 | \n",
" 1.0 | \n",
" 4500000.0 | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" Aaron Cresswell | \n",
" Premier League | \n",
" West Ham | \n",
" 50000.0 | \n",
" 2600000.0 | \n",
" 2671365.0 | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
"
\n",
" \n",
" 2395.0 | \n",
" eng ENG | \n",
" DF | \n",
" West Ham | \n",
" Premier League | \n",
" 28 | \n",
" 1989.0 | \n",
" 20 | \n",
" 18 | \n",
" 1589.0 | \n",
" 17.7 | \n",
" 0 | \n",
" 1 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 1 | \n",
" 0 | \n",
" 0.00 | \n",
" 0.06 | \n",
" 0.06 | \n",
" 0.00 | \n",
" 0.06 | \n",
" 0.5 | \n",
" 0.5 | \n",
" 0.9 | \n",
" 1.4 | \n",
" 0.03 | \n",
" 0.05 | \n",
" 0.08 | \n",
" 0.03 | \n",
" 0.08 | \n",
" Matches | \n",
" 11.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.62 | \n",
" 0.00 | \n",
" 0.00 | \n",
" NaN | \n",
" 23.5 | \n",
" 2.0 | \n",
" 0.04 | \n",
" -0.5 | \n",
" -0.5 | \n",
" 842.0 | \n",
" 1070.0 | \n",
" 78.7 | \n",
" 13627.0 | \n",
" 5572.0 | \n",
" 453.0 | \n",
" 501.0 | \n",
" 90.4 | \n",
" 307.0 | \n",
" 371.0 | \n",
" 82.7 | \n",
" 64.0 | \n",
" 140.0 | \n",
" 45.7 | \n",
" 0.1 | \n",
" 16.0 | \n",
" 55.0 | \n",
" 15.0 | \n",
" 5.0 | \n",
" 65.0 | \n",
" 854.0 | \n",
" 216.0 | \n",
" 0.0 | \n",
" 168.0 | \n",
" 18.0 | \n",
" 46.0 | \n",
" 10.0 | \n",
" 0.0 | \n",
" 2.0 | \n",
" 0.0 | \n",
" 642.0 | \n",
" 235.0 | \n",
" 193.0 | \n",
" 787.0 | \n",
" 51.0 | \n",
" 27.0 | \n",
" 190.0 | \n",
" 4.0 | \n",
" 2.0 | \n",
" 21.0 | \n",
" 27.0 | \n",
" 44.0 | \n",
" 29.0 | \n",
" 1.64 | \n",
" 19.0 | \n",
" 6.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 1.0 | \n",
" 2.0 | \n",
" 0.11 | \n",
" 0.0 | \n",
" 2.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 30.0 | \n",
" 19.0 | \n",
" 14.0 | \n",
" 12.0 | \n",
" 4.0 | \n",
" 12.0 | \n",
" 42.9 | \n",
" 16.0 | \n",
" 68.0 | \n",
" 31.5 | \n",
" 129.0 | \n",
" 59.0 | \n",
" 28.0 | \n",
" 0.0 | \n",
" 39.0 | \n",
" 49.0 | \n",
" 60.0 | \n",
" 1.0 | \n",
" 1266.0 | \n",
" 78.0 | \n",
" 36.0 | \n",
" 63.6 | \n",
" 7.0 | \n",
" 1.0 | \n",
" 723.0 | \n",
" 8.0 | \n",
" 11.0 | \n",
" 13.0 | \n",
" 797.0 | \n",
" 715.0 | \n",
" 89.7 | \n",
" 43.0 | \n",
" 79 | \n",
" 46.5 | \n",
" 85.0 | \n",
" 16.0 | \n",
" 2 | \n",
" 30.0 | \n",
" 7 | \n",
" 1.30 | \n",
" 21.0 | \n",
" 26.0 | \n",
" -5.0 | \n",
" -0.28 | \n",
" -0.38 | \n",
" 20.1 | \n",
" 25.3 | \n",
" -5.3 | \n",
" -0.30 | \n",
" 0.12 | \n",
" 0.0 | \n",
" 2 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 169.0 | \n",
" 22.0 | \n",
" 14.0 | \n",
" 61.1 | \n",
" 2018/2019 | \n",
" West Ham | \n",
" England | \n",
" aaron cresswell | \n",
" aaron | \n",
" cresswell | \n",
" a | \n",
" england | \n",
" ENG | \n",
" England | \n",
" DF | \n",
" Defender | \n",
" Outfielder | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" aaron cresswell | \n",
" aaron | \n",
" cresswell | \n",
" a | \n",
" england | \n",
" Aaron Cresswell | \n",
" https://fbref.com/en/players/4f974391/Aaron-Cr... | \n",
" https://www.transfermarkt.com/aaron-cresswell/... | \n",
" Left-Back | \n",
" 92571 | \n",
" 4f974391 | \n",
" aaron cresswell | \n",
" West Ham United | \n",
" west ham united | \n",
" GB1 | \n",
" 31.0 | \n",
" 9000000.0 | \n",
" 10000000.0 | \n",
" 1989-12-15 | \n",
" Liverpool | \n",
" Defender - Left-Back | \n",
" LB | \n",
" Defender | \n",
" 170.0 | \n",
" left | \n",
" England | \n",
" NaN | \n",
" Unique Sports Management | \n",
" 15.0 | \n",
" 12.0 | \n",
" England | \n",
" england | \n",
" 5000000.0 | \n",
" 2014-07-03 | \n",
" 2023-06-30 | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" aaron cresswell | \n",
" aaron | \n",
" cresswell | \n",
" a | \n",
" england | \n",
" 31.0 | \n",
" 24.0 | \n",
" 7.0 | \n",
" 1.0 | \n",
" 4500000.0 | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" Aaron Cresswell | \n",
" Premier League | \n",
" West Ham | \n",
" 50000.0 | \n",
" 2600000.0 | \n",
" 2625727.0 | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" Nation Pos Squad Comp Age birth_year MP Starts \\\n",
"NaN ie IRL FW Brighton Premier League 19 2000.0 24 14 \n",
"NaN ie IRL FW Brighton Premier League 20 2000.0 17 9 \n",
"NaN ie IRL FW Brighton Premier League 21 2000.0 1 0 \n",
"1363.0 eng ENG DF West Ham Premier League 27 1989.0 36 35 \n",
"2395.0 eng ENG DF West Ham Premier League 28 1989.0 20 18 \n",
"\n",
" Min 90s Gls Ast G-PK PK PKatt CrdY CrdR Gls.1 Ast.1 \\\n",
"NaN 1258.0 14.0 3 1 3 0 0 0 0 0.21 0.07 \n",
"NaN 791.0 8.8 2 1 2 0 0 0 0 0.23 0.11 \n",
"NaN 45.0 0.5 0 0 0 0 0 0 0 0.00 0.00 \n",
"1363.0 3069.0 34.1 1 3 1 0 0 7 0 0.03 0.09 \n",
"2395.0 1589.0 17.7 0 1 0 0 0 1 0 0.00 0.06 \n",
"\n",
" G+A G-PK.1 G+A-PK xG npxG xA npxG+xA xG.1 xA.1 xG+xA \\\n",
"NaN 0.29 0.21 0.29 3.2 3.2 0.3 3.5 0.23 0.02 0.25 \n",
"NaN 0.34 0.23 0.34 3.5 3.5 0.2 3.7 0.40 0.02 0.42 \n",
"NaN 0.00 0.00 0.00 0.4 0.4 0.0 0.4 0.85 0.00 0.85 \n",
"1363.0 0.12 0.03 0.12 0.8 0.8 2.8 3.6 0.02 0.08 0.10 \n",
"2395.0 0.06 0.00 0.06 0.5 0.5 0.9 1.4 0.03 0.05 0.08 \n",
"\n",
" npxG.1 npxG+xA.1 Matches Sh SoT SoT% Sh/90 SoT/90 G/Sh \\\n",
"NaN 0.23 0.25 Matches 38.0 13.0 34.2 2.72 0.93 0.08 \n",
"NaN 0.40 0.42 Matches 23.0 8.0 34.8 2.62 0.91 0.09 \n",
"NaN 0.85 0.85 Matches 1.0 0.0 0.0 2.00 0.00 0.00 \n",
"1363.0 0.02 0.10 Matches 21.0 6.0 28.6 0.62 0.18 0.05 \n",
"2395.0 0.03 0.08 Matches 11.0 0.0 0.0 0.62 0.00 0.00 \n",
"\n",
" G/SoT Dist FK npxG/Sh G-xG np:G-xG Cmp Att Cmp% \\\n",
"NaN 0.23 15.9 0.0 0.08 -0.2 -0.2 126.0 163.0 77.3 \n",
"NaN 0.25 13.7 0.0 0.15 -1.5 -1.5 79.0 101.0 78.2 \n",
"NaN NaN 9.0 0.0 0.42 -0.4 -0.4 2.0 3.0 66.7 \n",
"1363.0 0.17 28.1 8.0 0.04 0.2 0.2 1224.0 1708.0 71.7 \n",
"2395.0 NaN 23.5 2.0 0.04 -0.5 -0.5 842.0 1070.0 78.7 \n",
"\n",
" TotDist PrgDist Cmp.1 Att.1 Cmp%.1 Cmp.2 Att.2 Cmp%.2 Cmp.3 \\\n",
"NaN 1739.0 242.0 76.0 92.0 82.6 31.0 39.0 79.5 7.0 \n",
"NaN 1147.0 165.0 45.0 56.0 80.4 26.0 30.0 86.7 4.0 \n",
"NaN 14.0 0.0 2.0 2.0 100.0 0.0 1.0 0.0 0.0 \n",
"1363.0 23519.0 10212.0 560.0 623.0 89.9 472.0 587.0 80.4 183.0 \n",
"2395.0 13627.0 5572.0 453.0 501.0 90.4 307.0 371.0 82.7 64.0 \n",
"\n",
" Att.3 Cmp%.3 A-xA KP 1/3 PPA CrsPA Prog Live Dead \\\n",
"NaN 11.0 63.6 0.7 6.0 6.0 2.0 0.0 10.0 148.0 15.0 \n",
"NaN 5.0 80.0 0.8 5.0 2.0 1.0 0.0 3.0 91.0 10.0 \n",
"NaN 0.0 NaN 0.0 0.0 0.0 0.0 0.0 0.0 3.0 0.0 \n",
"1363.0 449.0 40.8 0.2 35.0 117.0 21.0 14.0 96.0 1343.0 365.0 \n",
"2395.0 140.0 45.7 0.1 16.0 55.0 15.0 5.0 65.0 854.0 216.0 \n",
"\n",
" TB Press Sw Crs CK In Out Str Ground Low High \\\n",
"NaN 1.0 50.0 0.0 7.0 0.0 0.0 0.0 0.0 90.0 52.0 21.0 \n",
"NaN 0.0 22.0 1.0 2.0 0.0 0.0 0.0 0.0 64.0 26.0 11.0 \n",
"NaN 0.0 1.0 0.0 1.0 0.0 0.0 0.0 0.0 2.0 1.0 0.0 \n",
"1363.0 1.0 222.0 83.0 93.0 67.0 35.0 15.0 9.0 893.0 293.0 522.0 \n",
"2395.0 0.0 168.0 18.0 46.0 10.0 0.0 2.0 0.0 642.0 235.0 193.0 \n",
"\n",
" Left Right Head TI Other Off Out.1 Int Blocks SCA \\\n",
"NaN 27.0 107.0 13.0 1.0 6.0 0.0 1.0 4.0 10.0 25.0 \n",
"NaN 11.0 74.0 5.0 0.0 3.0 0.0 0.0 2.0 4.0 12.0 \n",
"NaN 0.0 2.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 1.0 \n",
"1363.0 1329.0 78.0 59.0 210.0 5.0 15.0 44.0 39.0 52.0 62.0 \n",
"2395.0 787.0 51.0 27.0 190.0 4.0 2.0 21.0 27.0 44.0 29.0 \n",
"\n",
" SCA90 PassLive PassDead Drib Fld Def GCA GCA90 PassLive.1 \\\n",
"NaN 1.79 7.0 0.0 3.0 9.0 3.0 5.0 0.36 1.0 \n",
"NaN 1.37 7.0 0.0 3.0 2.0 0.0 1.0 0.11 1.0 \n",
"NaN 2.00 1.0 0.0 0.0 0.0 0.0 0.0 0.00 0.0 \n",
"1363.0 1.82 35.0 21.0 1.0 3.0 0.0 9.0 0.26 6.0 \n",
"2395.0 1.64 19.0 6.0 0.0 0.0 1.0 2.0 0.11 0.0 \n",
"\n",
" PassDead.1 Drib.1 Sh.1 Fld.1 Def.1 Tkl TklW Def 3rd Mid 3rd \\\n",
"NaN 0.0 1.0 1.0 2.0 0.0 12.0 8.0 1.0 5.0 \n",
"NaN 0.0 0.0 0.0 0.0 0.0 7.0 5.0 2.0 4.0 \n",
"NaN 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 \n",
"1363.0 3.0 0.0 0.0 0.0 0.0 38.0 18.0 15.0 18.0 \n",
"2395.0 2.0 0.0 0.0 0.0 0.0 30.0 19.0 14.0 12.0 \n",
"\n",
" Att 3rd Tkl.1 Tkl% Past Succ % Def 3rd.1 Mid 3rd.1 \\\n",
"NaN 6.0 3.0 25.0 9.0 69.0 29.5 14.0 94.0 \n",
"NaN 1.0 1.0 20.0 4.0 40.0 32.3 7.0 58.0 \n",
"NaN 0.0 0.0 NaN 0.0 1.0 8.3 1.0 6.0 \n",
"1363.0 5.0 17.0 53.1 15.0 115.0 32.1 181.0 123.0 \n",
"2395.0 4.0 12.0 42.9 16.0 68.0 31.5 129.0 59.0 \n",
"\n",
" Att 3rd.1 ShSv Pass Tkl+Int Clr Err Touches Def Pen Att Pen \\\n",
"NaN 126.0 0.0 7.0 17.0 1.0 0.0 349.0 2.0 61.0 \n",
"NaN 59.0 0.0 8.0 7.0 1.0 0.0 201.0 1.0 38.0 \n",
"NaN 5.0 0.0 0.0 0.0 0.0 0.0 8.0 0.0 2.0 \n",
"1363.0 54.0 0.0 38.0 90.0 133.0 0.0 2050.0 125.0 17.0 \n",
"2395.0 28.0 0.0 39.0 49.0 60.0 1.0 1266.0 78.0 36.0 \n",
"\n",
" Succ% #Pl Megs Carries CPA Mis Dis Targ Rec Rec% \\\n",
"NaN 37.5 6.0 1.0 228.0 12.0 42.0 34.0 535.0 235.0 43.9 \n",
"NaN 80.0 8.0 0.0 124.0 4.0 29.0 15.0 357.0 143.0 40.1 \n",
"NaN NaN 0.0 0.0 5.0 0.0 0.0 1.0 20.0 4.0 20.0 \n",
"1363.0 33.3 7.0 0.0 1071.0 2.0 18.0 19.0 1171.0 1094.0 93.4 \n",
"2395.0 63.6 7.0 1.0 723.0 8.0 11.0 13.0 797.0 715.0 89.7 \n",
"\n",
" Prog.1 Mn/MP Min% Mn/Start Compl Subs Mn/Sub unSub PPM onG \\\n",
"NaN 99.0 52 36.8 72.0 0.0 10 26.0 4 1.13 18.0 \n",
"NaN 64.0 47 23.1 68.0 NaN 8 23.0 11 0.88 12.0 \n",
"NaN 2.0 45 16.7 NaN 0.0 1 45.0 1 3.00 0.0 \n",
"1363.0 31.0 85 89.7 NaN 30.0 1 NaN 1 1.14 45.0 \n",
"2395.0 43.0 79 46.5 85.0 16.0 2 30.0 7 1.30 21.0 \n",
"\n",
" onGA +/- +/-90 On-Off onxG onxGA xG+/- xG+/-90 On-Off.1 \\\n",
"NaN 22.0 -4.0 -0.29 0.17 15.6 19.8 -4.2 -0.30 0.08 \n",
"NaN 17.0 -5.0 -0.57 -0.53 13.8 7.8 6.0 0.69 0.42 \n",
"NaN 0.0 0.0 0.00 -0.40 1.0 0.7 0.3 0.68 0.74 \n",
"1363.0 60.0 -15.0 -0.44 0.84 38.0 51.5 -13.5 -0.40 1.09 \n",
"2395.0 26.0 -5.0 -0.28 -0.38 20.1 25.3 -5.3 -0.30 0.12 \n",
"\n",
" 2CrdY Fls PKwon PKcon OG Recov Won Lost Won% season \\\n",
"NaN 0.0 16 2.0 0.0 0.0 54.0 14.0 48.0 22.6 2019/2020 \n",
"NaN 0.0 5 1.0 0.0 0.0 28.0 11.0 30.0 26.8 2020/2021 \n",
"NaN 0.0 0 0.0 0.0 0.0 3.0 0.0 2.0 0.0 2021/2022 \n",
"1363.0 0.0 20 0.0 0.0 0.0 277.0 70.0 57.0 55.1 2017/2018 \n",
"2395.0 0.0 2 0.0 0.0 0.0 169.0 22.0 14.0 61.1 2018/2019 \n",
"\n",
" Team Name Team Country Player Lower First Name Lower \\\n",
"NaN Brighton England aaron connolly aaron \n",
"NaN Brighton England aaron connolly aaron \n",
"NaN Brighton England aaron connolly aaron \n",
"1363.0 West Ham England aaron cresswell aaron \n",
"2395.0 West Ham England aaron cresswell aaron \n",
"\n",
" Last Name Lower First Initial Lower Team Country Lower \\\n",
"NaN connolly a england \n",
"NaN connolly a england \n",
"NaN connolly a england \n",
"1363.0 cresswell a england \n",
"2395.0 cresswell a england \n",
"\n",
" Nationality Code Nationality Cleaned Primary Pos Position Grouped \\\n",
"NaN IRL Ireland FW Forward \n",
"NaN IRL Ireland FW Forward \n",
"NaN IRL Ireland FW Forward \n",
"1363.0 ENG England DF Defender \n",
"2395.0 ENG England DF Defender \n",
"\n",
" outfielder_goalkeeper GA GA90 SoTA Saves Save% W D L CS \\\n",
"NaN Outfielder NaN NaN NaN NaN NaN NaN NaN NaN NaN \n",
"NaN Outfielder NaN NaN NaN NaN NaN NaN NaN NaN NaN \n",
"NaN Outfielder NaN NaN NaN NaN NaN NaN NaN NaN NaN \n",
"1363.0 Outfielder NaN NaN NaN NaN NaN NaN NaN NaN NaN \n",
"2395.0 Outfielder NaN NaN NaN NaN NaN NaN NaN NaN NaN \n",
"\n",
" CS% PKA PKsv PKm Save%.1 PSxG PSxG/SoT PSxG+/- /90 Thr \\\n",
"NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN \n",
"NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN \n",
"NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN \n",
"1363.0 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN \n",
"2395.0 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN \n",
"\n",
" Launch% AvgLen Launch%.1 AvgLen.1 Opp Stp Stp% #OPA #OPA/90 \\\n",
"NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN \n",
"NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN \n",
"NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN \n",
"1363.0 NaN NaN NaN NaN NaN NaN NaN NaN NaN \n",
"2395.0 NaN NaN NaN NaN NaN NaN NaN NaN NaN \n",
"\n",
" AvgDist player_name_lower first_name_lower last_name_lower \\\n",
"NaN NaN aaron connolly aaron connolly \n",
"NaN NaN aaron connolly aaron connolly \n",
"NaN NaN aaron connolly aaron connolly \n",
"1363.0 NaN aaron cresswell aaron cresswell \n",
"2395.0 NaN aaron cresswell aaron cresswell \n",
"\n",
" first_initial_lower country_lower player_name_fbref \\\n",
"NaN a ireland Aaron Connolly \n",
"NaN a ireland Aaron Connolly \n",
"NaN a ireland Aaron Connolly \n",
"1363.0 a england Aaron Cresswell \n",
"2395.0 a england Aaron Cresswell \n",
"\n",
" url_fbref \\\n",
"NaN https://fbref.com/en/players/27c01749/Aaron-Co... \n",
"NaN https://fbref.com/en/players/27c01749/Aaron-Co... \n",
"NaN https://fbref.com/en/players/27c01749/Aaron-Co... \n",
"1363.0 https://fbref.com/en/players/4f974391/Aaron-Cr... \n",
"2395.0 https://fbref.com/en/players/4f974391/Aaron-Cr... \n",
"\n",
" url_tm TmPos \\\n",
"NaN https://www.transfermarkt.com/aaron-connolly/p... Centre-Forward \n",
"NaN https://www.transfermarkt.com/aaron-connolly/p... Centre-Forward \n",
"NaN https://www.transfermarkt.com/aaron-connolly/p... Centre-Forward \n",
"1363.0 https://www.transfermarkt.com/aaron-cresswell/... Left-Back \n",
"2395.0 https://www.transfermarkt.com/aaron-cresswell/... Left-Back \n",
"\n",
" tm_id fbref_id player_name_tm club \\\n",
"NaN 434207 27c01749 aaron connolly Brighton Hove Albion \n",
"NaN 434207 27c01749 aaron connolly Brighton Hove Albion \n",
"NaN 434207 27c01749 aaron connolly Brighton Hove Albion \n",
"1363.0 92571 4f974391 aaron cresswell West Ham United \n",
"2395.0 92571 4f974391 aaron cresswell West Ham United \n",
"\n",
" current_club league_code current_age market_value_gbp \\\n",
"NaN brighton & hove albion GB1 21.0 4050000.0 \n",
"NaN brighton & hove albion GB1 21.0 6300000.0 \n",
"NaN brighton & hove albion GB1 21.0 6300000.0 \n",
"1363.0 west ham united GB1 31.0 10800000.0 \n",
"2395.0 west ham united GB1 31.0 9000000.0 \n",
"\n",
" market_value_eur dob pob position \\\n",
"NaN 4500000.0 2000-01-28 Galway attack - Centre-Forward \n",
"NaN 7000000.0 2000-01-28 Galway attack - Centre-Forward \n",
"NaN 7000000.0 2000-01-28 Galway attack - Centre-Forward \n",
"1363.0 12000000.0 1989-12-15 Liverpool Defender - Left-Back \n",
"2395.0 10000000.0 1989-12-15 Liverpool Defender - Left-Back \n",
"\n",
" position_code position_grouped height foot citizenship \\\n",
"NaN ST Forward 175.0 right Ireland \n",
"NaN ST Forward 175.0 right Ireland \n",
"NaN ST Forward 175.0 right Ireland \n",
"1363.0 LB Defender 170.0 left England \n",
"2395.0 LB Defender 170.0 left England \n",
"\n",
" second_citizenship player_agent birth_day birth_month \\\n",
"NaN NaN PLG 28.0 1.0 \n",
"NaN NaN PLG 28.0 1.0 \n",
"NaN NaN PLG 28.0 1.0 \n",
"1363.0 NaN Unique Sports Management 15.0 12.0 \n",
"2395.0 NaN Unique Sports Management 15.0 12.0 \n",
"\n",
" cob current_club_country market_value_euros joined \\\n",
"NaN Ireland england 7000000.0 2019-07-01 \n",
"NaN Ireland england 7000000.0 2019-07-01 \n",
"NaN Ireland england 7000000.0 2019-07-01 \n",
"1363.0 England england 5000000.0 2014-07-03 \n",
"2395.0 England england 5000000.0 2014-07-03 \n",
"\n",
" contract_expires contract_option on_loan_from on_loan_from_country \\\n",
"NaN 2024-06-30 NaN NaN NaN \n",
"NaN 2024-06-30 NaN NaN NaN \n",
"NaN 2024-06-30 NaN NaN NaN \n",
"1363.0 2023-06-30 NaN NaN NaN \n",
"2395.0 2023-06-30 NaN NaN NaN \n",
"\n",
" loan_contract_expiry name_lower firstname_lower lastname_lower \\\n",
"NaN NaN aaron connolly aaron connolly \n",
"NaN NaN aaron connolly aaron connolly \n",
"NaN NaN aaron connolly aaron connolly \n",
"1363.0 NaN aaron cresswell aaron cresswell \n",
"2395.0 NaN aaron cresswell aaron cresswell \n",
"\n",
" firstinitial_lower league_country_lower age age_when_joining \\\n",
"NaN a england 21.0 19.0 \n",
"NaN a england 21.0 19.0 \n",
"NaN a england 21.0 19.0 \n",
"1363.0 a england 31.0 24.0 \n",
"2395.0 a england 31.0 24.0 \n",
"\n",
" years_since_joining years_until_contract_expiry market_value_pounds \\\n",
"NaN 2.0 2.0 6300000.0 \n",
"NaN 2.0 2.0 6300000.0 \n",
"NaN 2.0 2.0 6300000.0 \n",
"1363.0 7.0 1.0 4500000.0 \n",
"2395.0 7.0 1.0 4500000.0 \n",
"\n",
" club_name club_involved_name fee transfer_movement \\\n",
"NaN Brighton & Hove Albion Brighton U23 - in \n",
"NaN NaN NaN NaN NaN \n",
"NaN NaN NaN NaN NaN \n",
"1363.0 NaN NaN NaN NaN \n",
"2395.0 NaN NaN NaN NaN \n",
"\n",
" transfer_period fee_cleaned league_name player_name_capology \\\n",
"NaN Summer 0.0 Premier League NaN \n",
"NaN NaN NaN NaN NaN \n",
"NaN NaN NaN NaN NaN \n",
"1363.0 NaN NaN NaN Aaron Cresswell \n",
"2395.0 NaN NaN NaN Aaron Cresswell \n",
"\n",
" league team weekly_gross_base_salary_gbp \\\n",
"NaN NaN NaN NaN \n",
"NaN NaN NaN NaN \n",
"NaN NaN NaN NaN \n",
"1363.0 Premier League West Ham 50000.0 \n",
"2395.0 Premier League West Ham 50000.0 \n",
"\n",
" annual_gross_base_salary_gbp adj_current_gross_base_salary_gbp \\\n",
"NaN NaN NaN \n",
"NaN NaN NaN \n",
"NaN NaN NaN \n",
"1363.0 2600000.0 2671365.0 \n",
"2395.0 2600000.0 2625727.0 \n",
"\n",
" estimated_gross_total_gbp current_contract_status \\\n",
"NaN NaN NaN \n",
"NaN NaN NaN \n",
"NaN NaN NaN \n",
"1363.0 NaN NaN \n",
"2395.0 NaN NaN \n",
"\n",
" current_contract_expiration current_contract_length \n",
"NaN NaN NaN \n",
"NaN NaN NaN \n",
"NaN NaN NaN \n",
"1363.0 NaN NaN \n",
"2395.0 NaN NaN "
]
},
"execution_count": 118,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# Display DataFrame\n",
"df_merge_fbref_tm_capology.head()"
]
},
{
"cell_type": "code",
"execution_count": 119,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" Nation | \n",
" Pos | \n",
" Squad | \n",
" Comp | \n",
" Age | \n",
" birth_year | \n",
" MP | \n",
" Starts | \n",
" Min | \n",
" 90s | \n",
" Gls | \n",
" Ast | \n",
" G-PK | \n",
" PK | \n",
" PKatt | \n",
" CrdY | \n",
" CrdR | \n",
" Gls.1 | \n",
" Ast.1 | \n",
" G+A | \n",
" G-PK.1 | \n",
" G+A-PK | \n",
" xG | \n",
" npxG | \n",
" xA | \n",
" npxG+xA | \n",
" xG.1 | \n",
" xA.1 | \n",
" xG+xA | \n",
" npxG.1 | \n",
" npxG+xA.1 | \n",
" Matches | \n",
" Sh | \n",
" SoT | \n",
" SoT% | \n",
" Sh/90 | \n",
" SoT/90 | \n",
" G/Sh | \n",
" G/SoT | \n",
" Dist | \n",
" FK | \n",
" npxG/Sh | \n",
" G-xG | \n",
" np:G-xG | \n",
" Cmp | \n",
" Att | \n",
" Cmp% | \n",
" TotDist | \n",
" PrgDist | \n",
" Cmp.1 | \n",
" Att.1 | \n",
" Cmp%.1 | \n",
" Cmp.2 | \n",
" Att.2 | \n",
" Cmp%.2 | \n",
" Cmp.3 | \n",
" Att.3 | \n",
" Cmp%.3 | \n",
" A-xA | \n",
" KP | \n",
" 1/3 | \n",
" PPA | \n",
" CrsPA | \n",
" Prog | \n",
" Live | \n",
" Dead | \n",
" TB | \n",
" Press | \n",
" Sw | \n",
" Crs | \n",
" CK | \n",
" In | \n",
" Out | \n",
" Str | \n",
" Ground | \n",
" Low | \n",
" High | \n",
" Left | \n",
" Right | \n",
" Head | \n",
" TI | \n",
" Other | \n",
" Off | \n",
" Out.1 | \n",
" Int | \n",
" Blocks | \n",
" SCA | \n",
" SCA90 | \n",
" PassLive | \n",
" PassDead | \n",
" Drib | \n",
" Fld | \n",
" Def | \n",
" GCA | \n",
" GCA90 | \n",
" PassLive.1 | \n",
" PassDead.1 | \n",
" Drib.1 | \n",
" Sh.1 | \n",
" Fld.1 | \n",
" Def.1 | \n",
" Tkl | \n",
" TklW | \n",
" Def 3rd | \n",
" Mid 3rd | \n",
" Att 3rd | \n",
" Tkl.1 | \n",
" Tkl% | \n",
" Past | \n",
" Succ | \n",
" % | \n",
" Def 3rd.1 | \n",
" Mid 3rd.1 | \n",
" Att 3rd.1 | \n",
" ShSv | \n",
" Pass | \n",
" Tkl+Int | \n",
" Clr | \n",
" Err | \n",
" Touches | \n",
" Def Pen | \n",
" Att Pen | \n",
" Succ% | \n",
" #Pl | \n",
" Megs | \n",
" Carries | \n",
" CPA | \n",
" Mis | \n",
" Dis | \n",
" Targ | \n",
" Rec | \n",
" Rec% | \n",
" Prog.1 | \n",
" Mn/MP | \n",
" Min% | \n",
" Mn/Start | \n",
" Compl | \n",
" Subs | \n",
" Mn/Sub | \n",
" unSub | \n",
" PPM | \n",
" onG | \n",
" onGA | \n",
" +/- | \n",
" +/-90 | \n",
" On-Off | \n",
" onxG | \n",
" onxGA | \n",
" xG+/- | \n",
" xG+/-90 | \n",
" On-Off.1 | \n",
" 2CrdY | \n",
" Fls | \n",
" PKwon | \n",
" PKcon | \n",
" OG | \n",
" Recov | \n",
" Won | \n",
" Lost | \n",
" Won% | \n",
" season | \n",
" Team Name | \n",
" Team Country | \n",
" Player Lower | \n",
" First Name Lower | \n",
" Last Name Lower | \n",
" First Initial Lower | \n",
" Team Country Lower | \n",
" Nationality Code | \n",
" Nationality Cleaned | \n",
" Primary Pos | \n",
" Position Grouped | \n",
" outfielder_goalkeeper | \n",
" GA | \n",
" GA90 | \n",
" SoTA | \n",
" Saves | \n",
" Save% | \n",
" W | \n",
" D | \n",
" L | \n",
" CS | \n",
" CS% | \n",
" PKA | \n",
" PKsv | \n",
" PKm | \n",
" Save%.1 | \n",
" PSxG | \n",
" PSxG/SoT | \n",
" PSxG+/- | \n",
" /90 | \n",
" Thr | \n",
" Launch% | \n",
" AvgLen | \n",
" Launch%.1 | \n",
" AvgLen.1 | \n",
" Opp | \n",
" Stp | \n",
" Stp% | \n",
" #OPA | \n",
" #OPA/90 | \n",
" AvgDist | \n",
" player_name_lower | \n",
" first_name_lower | \n",
" last_name_lower | \n",
" first_initial_lower | \n",
" country_lower | \n",
" player_name_fbref | \n",
" url_fbref | \n",
" url_tm | \n",
" TmPos | \n",
" tm_id | \n",
" fbref_id | \n",
" player_name_tm | \n",
" club | \n",
" current_club | \n",
" league_code | \n",
" current_age | \n",
" market_value_gbp | \n",
" market_value_eur | \n",
" dob | \n",
" pob | \n",
" position | \n",
" position_code | \n",
" position_grouped | \n",
" height | \n",
" foot | \n",
" citizenship | \n",
" second_citizenship | \n",
" player_agent | \n",
" birth_day | \n",
" birth_month | \n",
" cob | \n",
" current_club_country | \n",
" market_value_euros | \n",
" joined | \n",
" contract_expires | \n",
" contract_option | \n",
" on_loan_from | \n",
" on_loan_from_country | \n",
" loan_contract_expiry | \n",
" name_lower | \n",
" firstname_lower | \n",
" lastname_lower | \n",
" firstinitial_lower | \n",
" league_country_lower | \n",
" age | \n",
" age_when_joining | \n",
" years_since_joining | \n",
" years_until_contract_expiry | \n",
" market_value_pounds | \n",
" club_name | \n",
" club_involved_name | \n",
" fee | \n",
" transfer_movement | \n",
" transfer_period | \n",
" fee_cleaned | \n",
" league_name | \n",
" player_name_capology | \n",
" league | \n",
" team | \n",
" weekly_gross_base_salary_gbp | \n",
" annual_gross_base_salary_gbp | \n",
" adj_current_gross_base_salary_gbp | \n",
" estimated_gross_total_gbp | \n",
" current_contract_status | \n",
" current_contract_expiration | \n",
" current_contract_length | \n",
"
\n",
" \n",
" \n",
" \n",
" 9270.0 | \n",
" es ESP | \n",
" DF | \n",
" Barcelona | \n",
" La Liga | \n",
" 30 | \n",
" 1987.0 | \n",
" 30 | \n",
" 29 | \n",
" 2631.0 | \n",
" 29.2 | \n",
" 2 | \n",
" 0 | \n",
" 2 | \n",
" 0 | \n",
" 0 | \n",
" 8 | \n",
" 0 | \n",
" 0.07 | \n",
" 0.00 | \n",
" 0.07 | \n",
" 0.07 | \n",
" 0.07 | \n",
" 3.0 | \n",
" 3.0 | \n",
" 0.9 | \n",
" 3.8 | \n",
" 0.10 | \n",
" 0.03 | \n",
" 0.13 | \n",
" 0.10 | \n",
" 0.13 | \n",
" Matches | \n",
" 18.0 | \n",
" 5.0 | \n",
" 27.8 | \n",
" 0.62 | \n",
" 0.17 | \n",
" 0.11 | \n",
" 0.40 | \n",
" 9.2 | \n",
" 0.0 | \n",
" 0.16 | \n",
" -1.0 | \n",
" -1.0 | \n",
" 1606.0 | \n",
" 1810.0 | \n",
" 88.7 | \n",
" 34428.0 | \n",
" 10291.0 | \n",
" 460.0 | \n",
" 499.0 | \n",
" 92.2 | \n",
" 841.0 | \n",
" 904.0 | \n",
" 93.0 | \n",
" 293.0 | \n",
" 380.0 | \n",
" 77.1 | \n",
" -0.9 | \n",
" 6.0 | \n",
" 123.0 | \n",
" 4.0 | \n",
" 0.0 | \n",
" 90.0 | \n",
" 1764.0 | \n",
" 46.0 | \n",
" 0.0 | \n",
" 263.0 | \n",
" 70.0 | \n",
" 2.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 1436.0 | \n",
" 120.0 | \n",
" 254.0 | \n",
" 95.0 | \n",
" 1552.0 | \n",
" 106.0 | \n",
" 10.0 | \n",
" 8.0 | \n",
" 1.0 | \n",
" 28.0 | \n",
" 19.0 | \n",
" 11.0 | \n",
" 17.0 | \n",
" 0.58 | \n",
" 13.0 | \n",
" 0.0 | \n",
" 1.0 | \n",
" 2.0 | \n",
" 0.0 | \n",
" 1.0 | \n",
" 0.03 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 1.0 | \n",
" 0.0 | \n",
" 30.0 | \n",
" 22.0 | \n",
" 22.0 | \n",
" 8.0 | \n",
" 0.0 | \n",
" 12.0 | \n",
" 34.3 | \n",
" 23.0 | \n",
" 78.0 | \n",
" 32.5 | \n",
" 144.0 | \n",
" 80.0 | \n",
" 16.0 | \n",
" 2.0 | \n",
" 26.0 | \n",
" 62.0 | \n",
" 103.0 | \n",
" 5.0 | \n",
" 2075.0 | \n",
" 318.0 | \n",
" 28.0 | \n",
" 60.0 | \n",
" 6.0 | \n",
" 0.0 | \n",
" 1419.0 | \n",
" 0.0 | \n",
" 4.0 | \n",
" 7.0 | \n",
" 1385.0 | \n",
" 1341.0 | \n",
" 96.8 | \n",
" 27.0 | \n",
" 88 | \n",
" 76.9 | \n",
" NaN | \n",
" 27.0 | \n",
" 1 | \n",
" NaN | \n",
" 6 | \n",
" 2.57 | \n",
" 81.0 | \n",
" 23.0 | \n",
" 58.0 | \n",
" 1.98 | \n",
" 0.62 | \n",
" 65.0 | \n",
" 30.0 | \n",
" 35.1 | \n",
" 1.20 | \n",
" 0.96 | \n",
" 0.0 | \n",
" 23 | \n",
" 1.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 353.0 | \n",
" 54.0 | \n",
" 19.0 | \n",
" 74.0 | \n",
" 2017/2018 | \n",
" Barcelona | \n",
" Spain | \n",
" gerard piqua | \n",
" gerard | \n",
" piqua | \n",
" g | \n",
" spain | \n",
" ESP | \n",
" Spain | \n",
" DF | \n",
" Defender | \n",
" Outfielder | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" gerard piqua | \n",
" gerard | \n",
" piqua | \n",
" g | \n",
" spain | \n",
" Gerard Piqué | \n",
" https://fbref.com/en/players/adfc9123/Gerard-P... | \n",
" https://www.transfermarkt.com/gerard-pique/pro... | \n",
" Centre-Back | \n",
" 18944 | \n",
" adfc9123 | \n",
" gerard piqué | \n",
" FC Barcelona | \n",
" fc barcelona | \n",
" ES1 | \n",
" 34.0 | \n",
" 36000000.0 | \n",
" 40000000.0 | \n",
" 1987-02-02 | \n",
" Barcelona | \n",
" Defender - Centre-Back | \n",
" CB | \n",
" Defender | \n",
" 194.0 | \n",
" right | \n",
" Spain | \n",
" NaN | \n",
" AC Talent | \n",
" 2.0 | \n",
" 2.0 | \n",
" Spain | \n",
" spain | \n",
" 10000000.0 | \n",
" 2008-07-01 | \n",
" 2024-06-30 | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" gerard pique | \n",
" gerard | \n",
" pique | \n",
" g | \n",
" spain | \n",
" 34.0 | \n",
" 21.0 | \n",
" 13.0 | \n",
" 2.0 | \n",
" 9000000.0 | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" Gerard Piqué | \n",
" La Liga | \n",
" Barcelona | \n",
" 218534.0 | \n",
" 11363788.0 | \n",
" 11406357.0 | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
"
\n",
" \n",
" 9412.0 | \n",
" es ESP | \n",
" DF | \n",
" Barcelona | \n",
" La Liga | \n",
" 31 | \n",
" 1987.0 | \n",
" 35 | \n",
" 35 | \n",
" 3150.0 | \n",
" 35.0 | \n",
" 4 | \n",
" 2 | \n",
" 4 | \n",
" 0 | \n",
" 0 | \n",
" 6 | \n",
" 0 | \n",
" 0.11 | \n",
" 0.06 | \n",
" 0.17 | \n",
" 0.11 | \n",
" 0.17 | \n",
" 3.7 | \n",
" 3.7 | \n",
" 1.5 | \n",
" 5.2 | \n",
" 0.11 | \n",
" 0.04 | \n",
" 0.15 | \n",
" 0.11 | \n",
" 0.15 | \n",
" Matches | \n",
" 20.0 | \n",
" 11.0 | \n",
" 55.0 | \n",
" 0.57 | \n",
" 0.31 | \n",
" 0.20 | \n",
" 0.36 | \n",
" 7.3 | \n",
" 0.0 | \n",
" 0.19 | \n",
" 0.3 | \n",
" 0.3 | \n",
" 2230.0 | \n",
" 2429.0 | \n",
" 91.8 | \n",
" 46352.0 | \n",
" 14931.0 | \n",
" 666.0 | \n",
" 710.0 | \n",
" 93.8 | \n",
" 1209.0 | \n",
" 1277.0 | \n",
" 94.7 | \n",
" 343.0 | \n",
" 420.0 | \n",
" 81.7 | \n",
" 0.5 | \n",
" 8.0 | \n",
" 156.0 | \n",
" 5.0 | \n",
" 0.0 | \n",
" 103.0 | \n",
" 2347.0 | \n",
" 82.0 | \n",
" 3.0 | \n",
" 296.0 | \n",
" 58.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 1937.0 | \n",
" 190.0 | \n",
" 302.0 | \n",
" 97.0 | \n",
" 2125.0 | \n",
" 126.0 | \n",
" 12.0 | \n",
" 13.0 | \n",
" 5.0 | \n",
" 22.0 | \n",
" 14.0 | \n",
" 13.0 | \n",
" 25.0 | \n",
" 0.71 | \n",
" 17.0 | \n",
" 0.0 | \n",
" 2.0 | \n",
" 1.0 | \n",
" 1.0 | \n",
" 6.0 | \n",
" 0.17 | \n",
" 2.0 | \n",
" 0.0 | \n",
" 1.0 | \n",
" 2.0 | \n",
" 1.0 | \n",
" 0.0 | \n",
" 45.0 | \n",
" 27.0 | \n",
" 29.0 | \n",
" 15.0 | \n",
" 1.0 | \n",
" 20.0 | \n",
" 54.1 | \n",
" 17.0 | \n",
" 87.0 | \n",
" 31.9 | \n",
" 160.0 | \n",
" 101.0 | \n",
" 12.0 | \n",
" 2.0 | \n",
" 37.0 | \n",
" 77.0 | \n",
" 156.0 | \n",
" 2.0 | \n",
" 2760.0 | \n",
" 385.0 | \n",
" 32.0 | \n",
" 76.2 | \n",
" 16.0 | \n",
" 0.0 | \n",
" 1915.0 | \n",
" 1.0 | \n",
" 11.0 | \n",
" 9.0 | \n",
" 1963.0 | \n",
" 1889.0 | \n",
" 96.2 | \n",
" 27.0 | \n",
" 90 | \n",
" 92.1 | \n",
" 90.0 | \n",
" 35.0 | \n",
" 0 | \n",
" NaN | \n",
" 1 | \n",
" 2.43 | \n",
" 86.0 | \n",
" 30.0 | \n",
" 56.0 | \n",
" 1.60 | \n",
" 2.27 | \n",
" 69.9 | \n",
" 35.6 | \n",
" 34.2 | \n",
" 0.98 | \n",
" 1.29 | \n",
" 0.0 | \n",
" 24 | \n",
" 1.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 473.0 | \n",
" 91.0 | \n",
" 33.0 | \n",
" 73.4 | \n",
" 2018/2019 | \n",
" Barcelona | \n",
" Spain | \n",
" gerard piqua | \n",
" gerard | \n",
" piqua | \n",
" g | \n",
" spain | \n",
" ESP | \n",
" Spain | \n",
" DF | \n",
" Defender | \n",
" Outfielder | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" gerard piqua | \n",
" gerard | \n",
" piqua | \n",
" g | \n",
" spain | \n",
" Gerard Piqué | \n",
" https://fbref.com/en/players/adfc9123/Gerard-P... | \n",
" https://www.transfermarkt.com/gerard-pique/pro... | \n",
" Centre-Back | \n",
" 18944 | \n",
" adfc9123 | \n",
" gerard piqué | \n",
" FC Barcelona | \n",
" fc barcelona | \n",
" ES1 | \n",
" 34.0 | \n",
" 36000000.0 | \n",
" 40000000.0 | \n",
" 1987-02-02 | \n",
" Barcelona | \n",
" Defender - Centre-Back | \n",
" CB | \n",
" Defender | \n",
" 194.0 | \n",
" right | \n",
" Spain | \n",
" NaN | \n",
" AC Talent | \n",
" 2.0 | \n",
" 2.0 | \n",
" Spain | \n",
" spain | \n",
" 10000000.0 | \n",
" 2008-07-01 | \n",
" 2024-06-30 | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" gerard pique | \n",
" gerard | \n",
" pique | \n",
" g | \n",
" spain | \n",
" 34.0 | \n",
" 21.0 | \n",
" 13.0 | \n",
" 2.0 | \n",
" 9000000.0 | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" Gerard Piqué | \n",
" La Liga | \n",
" Barcelona | \n",
" 220629.0 | \n",
" 11472752.0 | \n",
" 11435733.0 | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
"
\n",
" \n",
" 9539.0 | \n",
" es ESP | \n",
" DF | \n",
" Barcelona | \n",
" La Liga | \n",
" 32 | \n",
" 1987.0 | \n",
" 35 | \n",
" 35 | \n",
" 3092.0 | \n",
" 34.4 | \n",
" 1 | \n",
" 0 | \n",
" 1 | \n",
" 0 | \n",
" 0 | \n",
" 15 | \n",
" 0 | \n",
" 0.03 | \n",
" 0.00 | \n",
" 0.03 | \n",
" 0.03 | \n",
" 0.03 | \n",
" 2.3 | \n",
" 2.3 | \n",
" 0.6 | \n",
" 2.9 | \n",
" 0.07 | \n",
" 0.02 | \n",
" 0.08 | \n",
" 0.07 | \n",
" 0.08 | \n",
" Matches | \n",
" 15.0 | \n",
" 6.0 | \n",
" 40.0 | \n",
" 0.44 | \n",
" 0.17 | \n",
" 0.07 | \n",
" 0.17 | \n",
" 8.4 | \n",
" 1.0 | \n",
" 0.15 | \n",
" -1.3 | \n",
" -1.3 | \n",
" 2469.0 | \n",
" 2659.0 | \n",
" 92.9 | \n",
" 53752.0 | \n",
" 14795.0 | \n",
" 645.0 | \n",
" 682.0 | \n",
" 94.6 | \n",
" 1381.0 | \n",
" 1437.0 | \n",
" 96.1 | \n",
" 427.0 | \n",
" 506.0 | \n",
" 84.4 | \n",
" -0.6 | \n",
" 5.0 | \n",
" 192.0 | \n",
" 3.0 | \n",
" 0.0 | \n",
" 116.0 | \n",
" 2548.0 | \n",
" 111.0 | \n",
" 2.0 | \n",
" 275.0 | \n",
" 79.0 | \n",
" 3.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 2121.0 | \n",
" 227.0 | \n",
" 311.0 | \n",
" 113.0 | \n",
" 2364.0 | \n",
" 99.0 | \n",
" 9.0 | \n",
" 13.0 | \n",
" 1.0 | \n",
" 25.0 | \n",
" 14.0 | \n",
" 14.0 | \n",
" 12.0 | \n",
" 0.35 | \n",
" 12.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 1.0 | \n",
" 0.03 | \n",
" 1.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 37.0 | \n",
" 22.0 | \n",
" 21.0 | \n",
" 16.0 | \n",
" 0.0 | \n",
" 14.0 | \n",
" 48.3 | \n",
" 15.0 | \n",
" 83.0 | \n",
" 34.0 | \n",
" 128.0 | \n",
" 109.0 | \n",
" 7.0 | \n",
" 2.0 | \n",
" 40.0 | \n",
" 73.0 | \n",
" 182.0 | \n",
" 1.0 | \n",
" 2996.0 | \n",
" 427.0 | \n",
" 28.0 | \n",
" 100.0 | \n",
" 9.0 | \n",
" 0.0 | \n",
" 2084.0 | \n",
" 0.0 | \n",
" 9.0 | \n",
" 7.0 | \n",
" 2211.0 | \n",
" 2171.0 | \n",
" 98.2 | \n",
" 21.0 | \n",
" 88 | \n",
" 90.4 | \n",
" 88.0 | \n",
" 31.0 | \n",
" 0 | \n",
" NaN | \n",
" 0 | \n",
" 2.09 | \n",
" 71.0 | \n",
" 36.0 | \n",
" 35.0 | \n",
" 1.02 | \n",
" -2.55 | \n",
" 56.2 | \n",
" 33.8 | \n",
" 22.4 | \n",
" 0.65 | \n",
" -1.49 | \n",
" 0.0 | \n",
" 32 | \n",
" 0.0 | \n",
" 2.0 | \n",
" 0.0 | \n",
" 391.0 | \n",
" 128.0 | \n",
" 40.0 | \n",
" 76.2 | \n",
" 2019/2020 | \n",
" Barcelona | \n",
" Spain | \n",
" gerard piqua | \n",
" gerard | \n",
" piqua | \n",
" g | \n",
" spain | \n",
" ESP | \n",
" Spain | \n",
" DF | \n",
" Defender | \n",
" Outfielder | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" gerard piqua | \n",
" gerard | \n",
" piqua | \n",
" g | \n",
" spain | \n",
" Gerard Piqué | \n",
" https://fbref.com/en/players/adfc9123/Gerard-P... | \n",
" https://www.transfermarkt.com/gerard-pique/pro... | \n",
" Centre-Back | \n",
" 18944 | \n",
" adfc9123 | \n",
" gerard piqué | \n",
" FC Barcelona | \n",
" fc barcelona | \n",
" ES1 | \n",
" 34.0 | \n",
" 22500000.0 | \n",
" 25000000.0 | \n",
" 1987-02-02 | \n",
" Barcelona | \n",
" Defender - Centre-Back | \n",
" CB | \n",
" Defender | \n",
" 194.0 | \n",
" right | \n",
" Spain | \n",
" NaN | \n",
" AC Talent | \n",
" 2.0 | \n",
" 2.0 | \n",
" Spain | \n",
" spain | \n",
" 10000000.0 | \n",
" 2008-07-01 | \n",
" 2024-06-30 | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" gerard pique | \n",
" gerard | \n",
" pique | \n",
" g | \n",
" spain | \n",
" 34.0 | \n",
" 21.0 | \n",
" 13.0 | \n",
" 2.0 | \n",
" 9000000.0 | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" Gerard Piqué | \n",
" La Liga | \n",
" Barcelona | \n",
" 432946.0 | \n",
" 22513250.0 | \n",
" 22513250.0 | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
"
\n",
" \n",
" 9623.0 | \n",
" es ESP | \n",
" DF | \n",
" Barcelona | \n",
" La Liga | \n",
" 33 | \n",
" 1987.0 | \n",
" 18 | \n",
" 18 | \n",
" 1481.0 | \n",
" 16.5 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 4 | \n",
" 0 | \n",
" 0.00 | \n",
" 0.00 | \n",
" 0.00 | \n",
" 0.00 | \n",
" 0.00 | \n",
" 0.6 | \n",
" 0.6 | \n",
" 0.5 | \n",
" 1.1 | \n",
" 0.04 | \n",
" 0.03 | \n",
" 0.07 | \n",
" 0.04 | \n",
" 0.07 | \n",
" Matches | \n",
" 8.0 | \n",
" 2.0 | \n",
" 25.0 | \n",
" 0.49 | \n",
" 0.12 | \n",
" 0.00 | \n",
" 0.00 | \n",
" 9.3 | \n",
" 0.0 | \n",
" 0.08 | \n",
" -0.6 | \n",
" -0.6 | \n",
" 1173.0 | \n",
" 1247.0 | \n",
" 94.1 | \n",
" 24743.0 | \n",
" 6069.0 | \n",
" 321.0 | \n",
" 340.0 | \n",
" 94.4 | \n",
" 666.0 | \n",
" 690.0 | \n",
" 96.5 | \n",
" 173.0 | \n",
" 197.0 | \n",
" 87.8 | \n",
" -0.5 | \n",
" 2.0 | \n",
" 82.0 | \n",
" 1.0 | \n",
" 0.0 | \n",
" 35.0 | \n",
" 1204.0 | \n",
" 43.0 | \n",
" 0.0 | \n",
" 91.0 | \n",
" 32.0 | \n",
" 1.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 1033.0 | \n",
" 93.0 | \n",
" 121.0 | \n",
" 72.0 | \n",
" 1079.0 | \n",
" 45.0 | \n",
" 5.0 | \n",
" 10.0 | \n",
" 1.0 | \n",
" 14.0 | \n",
" 6.0 | \n",
" 4.0 | \n",
" 5.0 | \n",
" 0.30 | \n",
" 5.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 1.0 | \n",
" 0.06 | \n",
" 1.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 21.0 | \n",
" 13.0 | \n",
" 13.0 | \n",
" 7.0 | \n",
" 1.0 | \n",
" 9.0 | \n",
" 64.3 | \n",
" 5.0 | \n",
" 46.0 | \n",
" 40.4 | \n",
" 51.0 | \n",
" 62.0 | \n",
" 1.0 | \n",
" 0.0 | \n",
" 13.0 | \n",
" 36.0 | \n",
" 65.0 | \n",
" 0.0 | \n",
" 1368.0 | \n",
" 161.0 | \n",
" 14.0 | \n",
" 100.0 | \n",
" 1.0 | \n",
" 0.0 | \n",
" 961.0 | \n",
" 0.0 | \n",
" 2.0 | \n",
" 3.0 | \n",
" 1046.0 | \n",
" 1015.0 | \n",
" 97.0 | \n",
" 7.0 | \n",
" 82 | \n",
" 43.3 | \n",
" 82.0 | \n",
" 13.0 | \n",
" 0 | \n",
" NaN | \n",
" 1 | \n",
" 1.53 | \n",
" 34.0 | \n",
" 22.0 | \n",
" 12.0 | \n",
" 0.73 | \n",
" -0.90 | \n",
" 32.9 | \n",
" 16.1 | \n",
" 16.8 | \n",
" 1.02 | \n",
" -0.02 | \n",
" 0.0 | \n",
" 13 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 182.0 | \n",
" 66.0 | \n",
" 21.0 | \n",
" 75.9 | \n",
" 2020/2021 | \n",
" Barcelona | \n",
" Spain | \n",
" gerard piqua | \n",
" gerard | \n",
" piqua | \n",
" g | \n",
" spain | \n",
" ESP | \n",
" Spain | \n",
" DF | \n",
" Defender | \n",
" Outfielder | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" gerard piqua | \n",
" gerard | \n",
" piqua | \n",
" g | \n",
" spain | \n",
" Gerard Piqué | \n",
" https://fbref.com/en/players/adfc9123/Gerard-P... | \n",
" https://www.transfermarkt.com/gerard-pique/pro... | \n",
" Centre-Back | \n",
" 18944 | \n",
" adfc9123 | \n",
" gerard piqué | \n",
" FC Barcelona | \n",
" fc barcelona | \n",
" ES1 | \n",
" 34.0 | \n",
" 13500000.0 | \n",
" 15000000.0 | \n",
" 1987-02-02 | \n",
" Barcelona | \n",
" Defender - Centre-Back | \n",
" CB | \n",
" Defender | \n",
" 194.0 | \n",
" right | \n",
" Spain | \n",
" NaN | \n",
" AC Talent | \n",
" 2.0 | \n",
" 2.0 | \n",
" Spain | \n",
" spain | \n",
" 10000000.0 | \n",
" 2008-07-01 | \n",
" 2024-06-30 | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" gerard pique | \n",
" gerard | \n",
" pique | \n",
" g | \n",
" spain | \n",
" 34.0 | \n",
" 21.0 | \n",
" 13.0 | \n",
" 2.0 | \n",
" 9000000.0 | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" Gerard Deulofeu | \n",
" Serie A | \n",
" Udinese | \n",
" 22166.0 | \n",
" 1152678.0 | \n",
" 1152678.0 | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
"
\n",
" \n",
" NaN | \n",
" es ESP | \n",
" DF | \n",
" Barcelona | \n",
" La Liga | \n",
" 34 | \n",
" 1987.0 | \n",
" 2 | \n",
" 2 | \n",
" 120.0 | \n",
" 1.3 | \n",
" 1 | \n",
" 0 | \n",
" 1 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0.75 | \n",
" 0.00 | \n",
" 0.75 | \n",
" 0.75 | \n",
" 0.75 | \n",
" 0.2 | \n",
" 0.2 | \n",
" 0.0 | \n",
" 0.2 | \n",
" 0.15 | \n",
" 0.00 | \n",
" 0.15 | \n",
" 0.15 | \n",
" 0.15 | \n",
" Matches | \n",
" 1.0 | \n",
" 1.0 | \n",
" 100.0 | \n",
" 0.75 | \n",
" 0.75 | \n",
" 1.00 | \n",
" 1.00 | \n",
" 8.0 | \n",
" 0.0 | \n",
" 0.19 | \n",
" 0.8 | \n",
" 0.8 | \n",
" 94.0 | \n",
" 97.0 | \n",
" 96.9 | \n",
" 2030.0 | \n",
" 415.0 | \n",
" 26.0 | \n",
" 28.0 | \n",
" 92.9 | \n",
" 51.0 | \n",
" 51.0 | \n",
" 100.0 | \n",
" 17.0 | \n",
" 18.0 | \n",
" 94.4 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 3.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 2.0 | \n",
" 89.0 | \n",
" 8.0 | \n",
" 0.0 | \n",
" 9.0 | \n",
" 5.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 85.0 | \n",
" 5.0 | \n",
" 7.0 | \n",
" 11.0 | \n",
" 80.0 | \n",
" 1.0 | \n",
" 0.0 | \n",
" 1.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 1.0 | \n",
" 0.75 | \n",
" 1.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.00 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 1.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 1.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" NaN | \n",
" 0.0 | \n",
" 2.0 | \n",
" 25.0 | \n",
" 4.0 | \n",
" 4.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 2.0 | \n",
" 4.0 | \n",
" 10.0 | \n",
" 0.0 | \n",
" 112.0 | \n",
" 24.0 | \n",
" 1.0 | \n",
" NaN | \n",
" 0.0 | \n",
" 0.0 | \n",
" 69.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 82.0 | \n",
" 79.0 | \n",
" 96.3 | \n",
" 0.0 | \n",
" 60 | \n",
" 44.4 | \n",
" 60.0 | \n",
" 1.0 | \n",
" 0 | \n",
" NaN | \n",
" 0 | \n",
" 2.00 | \n",
" 4.0 | \n",
" 2.0 | \n",
" 2.0 | \n",
" 1.50 | \n",
" 0.90 | \n",
" 3.3 | \n",
" 1.5 | \n",
" 1.8 | \n",
" 1.35 | \n",
" 1.00 | \n",
" 0.0 | \n",
" 1 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 9.0 | \n",
" 5.0 | \n",
" 1.0 | \n",
" 83.3 | \n",
" 2021/2022 | \n",
" Barcelona | \n",
" Spain | \n",
" gerard piqua | \n",
" gerard | \n",
" piqua | \n",
" g | \n",
" spain | \n",
" ESP | \n",
" Spain | \n",
" DF | \n",
" Defender | \n",
" Outfielder | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" gerard piqua | \n",
" gerard | \n",
" piqua | \n",
" g | \n",
" spain | \n",
" Gerard Piqué | \n",
" https://fbref.com/en/players/adfc9123/Gerard-P... | \n",
" https://www.transfermarkt.com/gerard-pique/pro... | \n",
" Centre-Back | \n",
" 18944 | \n",
" adfc9123 | \n",
" gerard piqué | \n",
" FC Barcelona | \n",
" fc barcelona | \n",
" ES1 | \n",
" 34.0 | \n",
" 9000000.0 | \n",
" 10000000.0 | \n",
" 1987-02-02 | \n",
" Barcelona | \n",
" Defender - Centre-Back | \n",
" CB | \n",
" Defender | \n",
" 194.0 | \n",
" right | \n",
" Spain | \n",
" NaN | \n",
" AC Talent | \n",
" 2.0 | \n",
" 2.0 | \n",
" Spain | \n",
" spain | \n",
" 10000000.0 | \n",
" 2008-07-01 | \n",
" 2024-06-30 | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" gerard pique | \n",
" gerard | \n",
" pique | \n",
" g | \n",
" spain | \n",
" 34.0 | \n",
" 21.0 | \n",
" 13.0 | \n",
" 2.0 | \n",
" 9000000.0 | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" Nation Pos Squad Comp Age birth_year MP Starts Min \\\n",
"9270.0 es ESP DF Barcelona La Liga 30 1987.0 30 29 2631.0 \n",
"9412.0 es ESP DF Barcelona La Liga 31 1987.0 35 35 3150.0 \n",
"9539.0 es ESP DF Barcelona La Liga 32 1987.0 35 35 3092.0 \n",
"9623.0 es ESP DF Barcelona La Liga 33 1987.0 18 18 1481.0 \n",
"NaN es ESP DF Barcelona La Liga 34 1987.0 2 2 120.0 \n",
"\n",
" 90s Gls Ast G-PK PK PKatt CrdY CrdR Gls.1 Ast.1 G+A \\\n",
"9270.0 29.2 2 0 2 0 0 8 0 0.07 0.00 0.07 \n",
"9412.0 35.0 4 2 4 0 0 6 0 0.11 0.06 0.17 \n",
"9539.0 34.4 1 0 1 0 0 15 0 0.03 0.00 0.03 \n",
"9623.0 16.5 0 0 0 0 0 4 0 0.00 0.00 0.00 \n",
"NaN 1.3 1 0 1 0 0 0 0 0.75 0.00 0.75 \n",
"\n",
" G-PK.1 G+A-PK xG npxG xA npxG+xA xG.1 xA.1 xG+xA npxG.1 \\\n",
"9270.0 0.07 0.07 3.0 3.0 0.9 3.8 0.10 0.03 0.13 0.10 \n",
"9412.0 0.11 0.17 3.7 3.7 1.5 5.2 0.11 0.04 0.15 0.11 \n",
"9539.0 0.03 0.03 2.3 2.3 0.6 2.9 0.07 0.02 0.08 0.07 \n",
"9623.0 0.00 0.00 0.6 0.6 0.5 1.1 0.04 0.03 0.07 0.04 \n",
"NaN 0.75 0.75 0.2 0.2 0.0 0.2 0.15 0.00 0.15 0.15 \n",
"\n",
" npxG+xA.1 Matches Sh SoT SoT% Sh/90 SoT/90 G/Sh G/SoT \\\n",
"9270.0 0.13 Matches 18.0 5.0 27.8 0.62 0.17 0.11 0.40 \n",
"9412.0 0.15 Matches 20.0 11.0 55.0 0.57 0.31 0.20 0.36 \n",
"9539.0 0.08 Matches 15.0 6.0 40.0 0.44 0.17 0.07 0.17 \n",
"9623.0 0.07 Matches 8.0 2.0 25.0 0.49 0.12 0.00 0.00 \n",
"NaN 0.15 Matches 1.0 1.0 100.0 0.75 0.75 1.00 1.00 \n",
"\n",
" Dist FK npxG/Sh G-xG np:G-xG Cmp Att Cmp% TotDist \\\n",
"9270.0 9.2 0.0 0.16 -1.0 -1.0 1606.0 1810.0 88.7 34428.0 \n",
"9412.0 7.3 0.0 0.19 0.3 0.3 2230.0 2429.0 91.8 46352.0 \n",
"9539.0 8.4 1.0 0.15 -1.3 -1.3 2469.0 2659.0 92.9 53752.0 \n",
"9623.0 9.3 0.0 0.08 -0.6 -0.6 1173.0 1247.0 94.1 24743.0 \n",
"NaN 8.0 0.0 0.19 0.8 0.8 94.0 97.0 96.9 2030.0 \n",
"\n",
" PrgDist Cmp.1 Att.1 Cmp%.1 Cmp.2 Att.2 Cmp%.2 Cmp.3 Att.3 \\\n",
"9270.0 10291.0 460.0 499.0 92.2 841.0 904.0 93.0 293.0 380.0 \n",
"9412.0 14931.0 666.0 710.0 93.8 1209.0 1277.0 94.7 343.0 420.0 \n",
"9539.0 14795.0 645.0 682.0 94.6 1381.0 1437.0 96.1 427.0 506.0 \n",
"9623.0 6069.0 321.0 340.0 94.4 666.0 690.0 96.5 173.0 197.0 \n",
"NaN 415.0 26.0 28.0 92.9 51.0 51.0 100.0 17.0 18.0 \n",
"\n",
" Cmp%.3 A-xA KP 1/3 PPA CrsPA Prog Live Dead TB \\\n",
"9270.0 77.1 -0.9 6.0 123.0 4.0 0.0 90.0 1764.0 46.0 0.0 \n",
"9412.0 81.7 0.5 8.0 156.0 5.0 0.0 103.0 2347.0 82.0 3.0 \n",
"9539.0 84.4 -0.6 5.0 192.0 3.0 0.0 116.0 2548.0 111.0 2.0 \n",
"9623.0 87.8 -0.5 2.0 82.0 1.0 0.0 35.0 1204.0 43.0 0.0 \n",
"NaN 94.4 0.0 0.0 3.0 0.0 0.0 2.0 89.0 8.0 0.0 \n",
"\n",
" Press Sw Crs CK In Out Str Ground Low High Left \\\n",
"9270.0 263.0 70.0 2.0 0.0 0.0 0.0 0.0 1436.0 120.0 254.0 95.0 \n",
"9412.0 296.0 58.0 0.0 0.0 0.0 0.0 0.0 1937.0 190.0 302.0 97.0 \n",
"9539.0 275.0 79.0 3.0 0.0 0.0 0.0 0.0 2121.0 227.0 311.0 113.0 \n",
"9623.0 91.0 32.0 1.0 0.0 0.0 0.0 0.0 1033.0 93.0 121.0 72.0 \n",
"NaN 9.0 5.0 0.0 0.0 0.0 0.0 0.0 85.0 5.0 7.0 11.0 \n",
"\n",
" Right Head TI Other Off Out.1 Int Blocks SCA SCA90 \\\n",
"9270.0 1552.0 106.0 10.0 8.0 1.0 28.0 19.0 11.0 17.0 0.58 \n",
"9412.0 2125.0 126.0 12.0 13.0 5.0 22.0 14.0 13.0 25.0 0.71 \n",
"9539.0 2364.0 99.0 9.0 13.0 1.0 25.0 14.0 14.0 12.0 0.35 \n",
"9623.0 1079.0 45.0 5.0 10.0 1.0 14.0 6.0 4.0 5.0 0.30 \n",
"NaN 80.0 1.0 0.0 1.0 0.0 0.0 0.0 0.0 1.0 0.75 \n",
"\n",
" PassLive PassDead Drib Fld Def GCA GCA90 PassLive.1 \\\n",
"9270.0 13.0 0.0 1.0 2.0 0.0 1.0 0.03 0.0 \n",
"9412.0 17.0 0.0 2.0 1.0 1.0 6.0 0.17 2.0 \n",
"9539.0 12.0 0.0 0.0 0.0 0.0 1.0 0.03 1.0 \n",
"9623.0 5.0 0.0 0.0 0.0 0.0 1.0 0.06 1.0 \n",
"NaN 1.0 0.0 0.0 0.0 0.0 0.0 0.00 0.0 \n",
"\n",
" PassDead.1 Drib.1 Sh.1 Fld.1 Def.1 Tkl TklW Def 3rd Mid 3rd \\\n",
"9270.0 0.0 0.0 0.0 1.0 0.0 30.0 22.0 22.0 8.0 \n",
"9412.0 0.0 1.0 2.0 1.0 0.0 45.0 27.0 29.0 15.0 \n",
"9539.0 0.0 0.0 0.0 0.0 0.0 37.0 22.0 21.0 16.0 \n",
"9623.0 0.0 0.0 0.0 0.0 0.0 21.0 13.0 13.0 7.0 \n",
"NaN 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 1.0 \n",
"\n",
" Att 3rd Tkl.1 Tkl% Past Succ % Def 3rd.1 Mid 3rd.1 \\\n",
"9270.0 0.0 12.0 34.3 23.0 78.0 32.5 144.0 80.0 \n",
"9412.0 1.0 20.0 54.1 17.0 87.0 31.9 160.0 101.0 \n",
"9539.0 0.0 14.0 48.3 15.0 83.0 34.0 128.0 109.0 \n",
"9623.0 1.0 9.0 64.3 5.0 46.0 40.4 51.0 62.0 \n",
"NaN 0.0 0.0 NaN 0.0 2.0 25.0 4.0 4.0 \n",
"\n",
" Att 3rd.1 ShSv Pass Tkl+Int Clr Err Touches Def Pen Att Pen \\\n",
"9270.0 16.0 2.0 26.0 62.0 103.0 5.0 2075.0 318.0 28.0 \n",
"9412.0 12.0 2.0 37.0 77.0 156.0 2.0 2760.0 385.0 32.0 \n",
"9539.0 7.0 2.0 40.0 73.0 182.0 1.0 2996.0 427.0 28.0 \n",
"9623.0 1.0 0.0 13.0 36.0 65.0 0.0 1368.0 161.0 14.0 \n",
"NaN 0.0 0.0 2.0 4.0 10.0 0.0 112.0 24.0 1.0 \n",
"\n",
" Succ% #Pl Megs Carries CPA Mis Dis Targ Rec Rec% \\\n",
"9270.0 60.0 6.0 0.0 1419.0 0.0 4.0 7.0 1385.0 1341.0 96.8 \n",
"9412.0 76.2 16.0 0.0 1915.0 1.0 11.0 9.0 1963.0 1889.0 96.2 \n",
"9539.0 100.0 9.0 0.0 2084.0 0.0 9.0 7.0 2211.0 2171.0 98.2 \n",
"9623.0 100.0 1.0 0.0 961.0 0.0 2.0 3.0 1046.0 1015.0 97.0 \n",
"NaN NaN 0.0 0.0 69.0 0.0 0.0 0.0 82.0 79.0 96.3 \n",
"\n",
" Prog.1 Mn/MP Min% Mn/Start Compl Subs Mn/Sub unSub PPM onG \\\n",
"9270.0 27.0 88 76.9 NaN 27.0 1 NaN 6 2.57 81.0 \n",
"9412.0 27.0 90 92.1 90.0 35.0 0 NaN 1 2.43 86.0 \n",
"9539.0 21.0 88 90.4 88.0 31.0 0 NaN 0 2.09 71.0 \n",
"9623.0 7.0 82 43.3 82.0 13.0 0 NaN 1 1.53 34.0 \n",
"NaN 0.0 60 44.4 60.0 1.0 0 NaN 0 2.00 4.0 \n",
"\n",
" onGA +/- +/-90 On-Off onxG onxGA xG+/- xG+/-90 On-Off.1 \\\n",
"9270.0 23.0 58.0 1.98 0.62 65.0 30.0 35.1 1.20 0.96 \n",
"9412.0 30.0 56.0 1.60 2.27 69.9 35.6 34.2 0.98 1.29 \n",
"9539.0 36.0 35.0 1.02 -2.55 56.2 33.8 22.4 0.65 -1.49 \n",
"9623.0 22.0 12.0 0.73 -0.90 32.9 16.1 16.8 1.02 -0.02 \n",
"NaN 2.0 2.0 1.50 0.90 3.3 1.5 1.8 1.35 1.00 \n",
"\n",
" 2CrdY Fls PKwon PKcon OG Recov Won Lost Won% season \\\n",
"9270.0 0.0 23 1.0 0.0 0.0 353.0 54.0 19.0 74.0 2017/2018 \n",
"9412.0 0.0 24 1.0 0.0 0.0 473.0 91.0 33.0 73.4 2018/2019 \n",
"9539.0 0.0 32 0.0 2.0 0.0 391.0 128.0 40.0 76.2 2019/2020 \n",
"9623.0 0.0 13 0.0 0.0 0.0 182.0 66.0 21.0 75.9 2020/2021 \n",
"NaN 0.0 1 0.0 0.0 0.0 9.0 5.0 1.0 83.3 2021/2022 \n",
"\n",
" Team Name Team Country Player Lower First Name Lower Last Name Lower \\\n",
"9270.0 Barcelona Spain gerard piqua gerard piqua \n",
"9412.0 Barcelona Spain gerard piqua gerard piqua \n",
"9539.0 Barcelona Spain gerard piqua gerard piqua \n",
"9623.0 Barcelona Spain gerard piqua gerard piqua \n",
"NaN Barcelona Spain gerard piqua gerard piqua \n",
"\n",
" First Initial Lower Team Country Lower Nationality Code \\\n",
"9270.0 g spain ESP \n",
"9412.0 g spain ESP \n",
"9539.0 g spain ESP \n",
"9623.0 g spain ESP \n",
"NaN g spain ESP \n",
"\n",
" Nationality Cleaned Primary Pos Position Grouped outfielder_goalkeeper \\\n",
"9270.0 Spain DF Defender Outfielder \n",
"9412.0 Spain DF Defender Outfielder \n",
"9539.0 Spain DF Defender Outfielder \n",
"9623.0 Spain DF Defender Outfielder \n",
"NaN Spain DF Defender Outfielder \n",
"\n",
" GA GA90 SoTA Saves Save% W D L CS CS% PKA PKsv PKm \\\n",
"9270.0 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN \n",
"9412.0 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN \n",
"9539.0 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN \n",
"9623.0 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN \n",
"NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN \n",
"\n",
" Save%.1 PSxG PSxG/SoT PSxG+/- /90 Thr Launch% AvgLen \\\n",
"9270.0 NaN NaN NaN NaN NaN NaN NaN NaN \n",
"9412.0 NaN NaN NaN NaN NaN NaN NaN NaN \n",
"9539.0 NaN NaN NaN NaN NaN NaN NaN NaN \n",
"9623.0 NaN NaN NaN NaN NaN NaN NaN NaN \n",
"NaN NaN NaN NaN NaN NaN NaN NaN NaN \n",
"\n",
" Launch%.1 AvgLen.1 Opp Stp Stp% #OPA #OPA/90 AvgDist \\\n",
"9270.0 NaN NaN NaN NaN NaN NaN NaN NaN \n",
"9412.0 NaN NaN NaN NaN NaN NaN NaN NaN \n",
"9539.0 NaN NaN NaN NaN NaN NaN NaN NaN \n",
"9623.0 NaN NaN NaN NaN NaN NaN NaN NaN \n",
"NaN NaN NaN NaN NaN NaN NaN NaN NaN \n",
"\n",
" player_name_lower first_name_lower last_name_lower first_initial_lower \\\n",
"9270.0 gerard piqua gerard piqua g \n",
"9412.0 gerard piqua gerard piqua g \n",
"9539.0 gerard piqua gerard piqua g \n",
"9623.0 gerard piqua gerard piqua g \n",
"NaN gerard piqua gerard piqua g \n",
"\n",
" country_lower player_name_fbref \\\n",
"9270.0 spain Gerard Piqué \n",
"9412.0 spain Gerard Piqué \n",
"9539.0 spain Gerard Piqué \n",
"9623.0 spain Gerard Piqué \n",
"NaN spain Gerard Piqué \n",
"\n",
" url_fbref \\\n",
"9270.0 https://fbref.com/en/players/adfc9123/Gerard-P... \n",
"9412.0 https://fbref.com/en/players/adfc9123/Gerard-P... \n",
"9539.0 https://fbref.com/en/players/adfc9123/Gerard-P... \n",
"9623.0 https://fbref.com/en/players/adfc9123/Gerard-P... \n",
"NaN https://fbref.com/en/players/adfc9123/Gerard-P... \n",
"\n",
" url_tm TmPos tm_id \\\n",
"9270.0 https://www.transfermarkt.com/gerard-pique/pro... Centre-Back 18944 \n",
"9412.0 https://www.transfermarkt.com/gerard-pique/pro... Centre-Back 18944 \n",
"9539.0 https://www.transfermarkt.com/gerard-pique/pro... Centre-Back 18944 \n",
"9623.0 https://www.transfermarkt.com/gerard-pique/pro... Centre-Back 18944 \n",
"NaN https://www.transfermarkt.com/gerard-pique/pro... Centre-Back 18944 \n",
"\n",
" fbref_id player_name_tm club current_club league_code \\\n",
"9270.0 adfc9123 gerard piqué FC Barcelona fc barcelona ES1 \n",
"9412.0 adfc9123 gerard piqué FC Barcelona fc barcelona ES1 \n",
"9539.0 adfc9123 gerard piqué FC Barcelona fc barcelona ES1 \n",
"9623.0 adfc9123 gerard piqué FC Barcelona fc barcelona ES1 \n",
"NaN adfc9123 gerard piqué FC Barcelona fc barcelona ES1 \n",
"\n",
" current_age market_value_gbp market_value_eur dob \\\n",
"9270.0 34.0 36000000.0 40000000.0 1987-02-02 \n",
"9412.0 34.0 36000000.0 40000000.0 1987-02-02 \n",
"9539.0 34.0 22500000.0 25000000.0 1987-02-02 \n",
"9623.0 34.0 13500000.0 15000000.0 1987-02-02 \n",
"NaN 34.0 9000000.0 10000000.0 1987-02-02 \n",
"\n",
" pob position position_code position_grouped \\\n",
"9270.0 Barcelona Defender - Centre-Back CB Defender \n",
"9412.0 Barcelona Defender - Centre-Back CB Defender \n",
"9539.0 Barcelona Defender - Centre-Back CB Defender \n",
"9623.0 Barcelona Defender - Centre-Back CB Defender \n",
"NaN Barcelona Defender - Centre-Back CB Defender \n",
"\n",
" height foot citizenship second_citizenship player_agent birth_day \\\n",
"9270.0 194.0 right Spain NaN AC Talent 2.0 \n",
"9412.0 194.0 right Spain NaN AC Talent 2.0 \n",
"9539.0 194.0 right Spain NaN AC Talent 2.0 \n",
"9623.0 194.0 right Spain NaN AC Talent 2.0 \n",
"NaN 194.0 right Spain NaN AC Talent 2.0 \n",
"\n",
" birth_month cob current_club_country market_value_euros \\\n",
"9270.0 2.0 Spain spain 10000000.0 \n",
"9412.0 2.0 Spain spain 10000000.0 \n",
"9539.0 2.0 Spain spain 10000000.0 \n",
"9623.0 2.0 Spain spain 10000000.0 \n",
"NaN 2.0 Spain spain 10000000.0 \n",
"\n",
" joined contract_expires contract_option on_loan_from \\\n",
"9270.0 2008-07-01 2024-06-30 NaN NaN \n",
"9412.0 2008-07-01 2024-06-30 NaN NaN \n",
"9539.0 2008-07-01 2024-06-30 NaN NaN \n",
"9623.0 2008-07-01 2024-06-30 NaN NaN \n",
"NaN 2008-07-01 2024-06-30 NaN NaN \n",
"\n",
" on_loan_from_country loan_contract_expiry name_lower \\\n",
"9270.0 NaN NaN gerard pique \n",
"9412.0 NaN NaN gerard pique \n",
"9539.0 NaN NaN gerard pique \n",
"9623.0 NaN NaN gerard pique \n",
"NaN NaN NaN gerard pique \n",
"\n",
" firstname_lower lastname_lower firstinitial_lower league_country_lower \\\n",
"9270.0 gerard pique g spain \n",
"9412.0 gerard pique g spain \n",
"9539.0 gerard pique g spain \n",
"9623.0 gerard pique g spain \n",
"NaN gerard pique g spain \n",
"\n",
" age age_when_joining years_since_joining \\\n",
"9270.0 34.0 21.0 13.0 \n",
"9412.0 34.0 21.0 13.0 \n",
"9539.0 34.0 21.0 13.0 \n",
"9623.0 34.0 21.0 13.0 \n",
"NaN 34.0 21.0 13.0 \n",
"\n",
" years_until_contract_expiry market_value_pounds club_name \\\n",
"9270.0 2.0 9000000.0 NaN \n",
"9412.0 2.0 9000000.0 NaN \n",
"9539.0 2.0 9000000.0 NaN \n",
"9623.0 2.0 9000000.0 NaN \n",
"NaN 2.0 9000000.0 NaN \n",
"\n",
" club_involved_name fee transfer_movement transfer_period fee_cleaned \\\n",
"9270.0 NaN NaN NaN NaN NaN \n",
"9412.0 NaN NaN NaN NaN NaN \n",
"9539.0 NaN NaN NaN NaN NaN \n",
"9623.0 NaN NaN NaN NaN NaN \n",
"NaN NaN NaN NaN NaN NaN \n",
"\n",
" league_name player_name_capology league team \\\n",
"9270.0 NaN Gerard Piqué La Liga Barcelona \n",
"9412.0 NaN Gerard Piqué La Liga Barcelona \n",
"9539.0 NaN Gerard Piqué La Liga Barcelona \n",
"9623.0 NaN Gerard Deulofeu Serie A Udinese \n",
"NaN NaN NaN NaN NaN \n",
"\n",
" weekly_gross_base_salary_gbp annual_gross_base_salary_gbp \\\n",
"9270.0 218534.0 11363788.0 \n",
"9412.0 220629.0 11472752.0 \n",
"9539.0 432946.0 22513250.0 \n",
"9623.0 22166.0 1152678.0 \n",
"NaN NaN NaN \n",
"\n",
" adj_current_gross_base_salary_gbp estimated_gross_total_gbp \\\n",
"9270.0 11406357.0 NaN \n",
"9412.0 11435733.0 NaN \n",
"9539.0 22513250.0 NaN \n",
"9623.0 1152678.0 NaN \n",
"NaN NaN NaN \n",
"\n",
" current_contract_status current_contract_expiration \\\n",
"9270.0 NaN NaN \n",
"9412.0 NaN NaN \n",
"9539.0 NaN NaN \n",
"9623.0 NaN NaN \n",
"NaN NaN NaN \n",
"\n",
" current_contract_length \n",
"9270.0 NaN \n",
"9412.0 NaN \n",
"9539.0 NaN \n",
"9623.0 NaN \n",
"NaN NaN "
]
},
"execution_count": 119,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"df_merge_fbref_tm_capology[df_merge_fbref_tm_capology['player_name_fbref'].str.contains('Gerard Piqu', na=False)]"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"\n",
"\n",
"### 5.4. Record Column Names"
]
},
{
"cell_type": "code",
"execution_count": 120,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"['Nation', 'Pos', 'Squad', 'Comp', 'Age', 'birth_year', 'MP', 'Starts', 'Min', '90s', 'Gls', 'Ast', 'G-PK', 'PK', 'PKatt', 'CrdY', 'CrdR', 'Gls.1', 'Ast.1', 'G+A', 'G-PK.1', 'G+A-PK', 'xG', 'npxG', 'xA', 'npxG+xA', 'xG.1', 'xA.1', 'xG+xA', 'npxG.1', 'npxG+xA.1', 'Matches', 'Sh', 'SoT', 'SoT%', 'Sh/90', 'SoT/90', 'G/Sh', 'G/SoT', 'Dist', 'FK', 'npxG/Sh', 'G-xG', 'np:G-xG', 'Cmp', 'Att', 'Cmp%', 'TotDist', 'PrgDist', 'Cmp.1', 'Att.1', 'Cmp%.1', 'Cmp.2', 'Att.2', 'Cmp%.2', 'Cmp.3', 'Att.3', 'Cmp%.3', 'A-xA', 'KP', '1/3', 'PPA', 'CrsPA', 'Prog', 'Live', 'Dead', 'TB', 'Press', 'Sw', 'Crs', 'CK', 'In', 'Out', 'Str', 'Ground', 'Low', 'High', 'Left', 'Right', 'Head', 'TI', 'Other', 'Off', 'Out.1', 'Int', 'Blocks', 'SCA', 'SCA90', 'PassLive', 'PassDead', 'Drib', 'Fld', 'Def', 'GCA', 'GCA90', 'PassLive.1', 'PassDead.1', 'Drib.1', 'Sh.1', 'Fld.1', 'Def.1', 'Tkl', 'TklW', 'Def 3rd', 'Mid 3rd', 'Att 3rd', 'Tkl.1', 'Tkl%', 'Past', 'Succ', '%', 'Def 3rd.1', 'Mid 3rd.1', 'Att 3rd.1', 'ShSv', 'Pass', 'Tkl+Int', 'Clr', 'Err', 'Touches', 'Def Pen', 'Att Pen', 'Succ%', '#Pl', 'Megs', 'Carries', 'CPA', 'Mis', 'Dis', 'Targ', 'Rec', 'Rec%', 'Prog.1', 'Mn/MP', 'Min%', 'Mn/Start', 'Compl', 'Subs', 'Mn/Sub', 'unSub', 'PPM', 'onG', 'onGA', '+/-', '+/-90', 'On-Off', 'onxG', 'onxGA', 'xG+/-', 'xG+/-90', 'On-Off.1', '2CrdY', 'Fls', 'PKwon', 'PKcon', 'OG', 'Recov', 'Won', 'Lost', 'Won%', 'season', 'Team Name', 'Team Country', 'Player Lower', 'First Name Lower', 'Last Name Lower', 'First Initial Lower', 'Team Country Lower', 'Nationality Code', 'Nationality Cleaned', 'Primary Pos', 'Position Grouped', 'outfielder_goalkeeper', 'GA', 'GA90', 'SoTA', 'Saves', 'Save%', 'W', 'D', 'L', 'CS', 'CS%', 'PKA', 'PKsv', 'PKm', 'Save%.1', 'PSxG', 'PSxG/SoT', 'PSxG+/-', '/90', 'Thr', 'Launch%', 'AvgLen', 'Launch%.1', 'AvgLen.1', 'Opp', 'Stp', 'Stp%', '#OPA', '#OPA/90', 'AvgDist', 'player_name_lower', 'first_name_lower', 'last_name_lower', 'first_initial_lower', 'country_lower', 'player_name_fbref', 'url_fbref', 'url_tm', 'TmPos', 'tm_id', 'fbref_id', 'player_name_tm', 'club', 'current_club', 'league_code', 'current_age', 'market_value_gbp', 'market_value_eur', 'dob', 'pob', 'position', 'position_code', 'position_grouped', 'height', 'foot', 'citizenship', 'second_citizenship', 'player_agent', 'birth_day', 'birth_month', 'cob', 'current_club_country', 'market_value_euros', 'joined', 'contract_expires', 'contract_option', 'on_loan_from', 'on_loan_from_country', 'loan_contract_expiry', 'name_lower', 'firstname_lower', 'lastname_lower', 'firstinitial_lower', 'league_country_lower', 'age', 'age_when_joining', 'years_since_joining', 'years_until_contract_expiry', 'market_value_pounds', 'club_name', 'club_involved_name', 'fee', 'transfer_movement', 'transfer_period', 'fee_cleaned', 'league_name', 'player_name_capology', 'league', 'team', 'weekly_gross_base_salary_gbp', 'annual_gross_base_salary_gbp', 'adj_current_gross_base_salary_gbp', 'estimated_gross_total_gbp', 'current_contract_status', 'current_contract_expiration', 'current_contract_length']\n"
]
}
],
"source": [
"print(df_merge_fbref_tm_capology.columns.tolist())"
]
},
{
"cell_type": "code",
"execution_count": 121,
"metadata": {},
"outputs": [],
"source": [
"# Define columns\n",
"\n",
"## Str\n",
"cols_export = [\n",
"\n",
"## PLAYER NAME\n",
" 'player_name_fbref',\n",
" #'Player Lower',\n",
" #'First Name Lower',\n",
" #'Last Name Lower',\n",
" #'First Initial Lower', \n",
" #'player_name_tm',\n",
" #'player_name_capology',\n",
" #'name_lower',\n",
" #'firstname_lower',\n",
" #'lastname_lower',\n",
" #'firstinitial_lower',\n",
"\n",
"## SEASON\n",
" 'season',\n",
"\n",
"## IDS\n",
" 'url_fbref',\n",
" 'url_tm',\n",
" 'tm_id',\n",
" 'fbref_id',\n",
" \n",
"## TEAM\n",
" 'Squad',\n",
" #'Team Name',\n",
" #'team',\n",
" 'Team Country',\n",
" #'Team Country Lower', \n",
" #'current_club_country',\n",
" #'league_country_lower', \n",
" #'club',\n",
" #'current_club',\n",
"\n",
"## LEAGUE\n",
" 'Comp',\n",
" #'league',\n",
" #'league_name',\n",
" #'league_code', \n",
"\n",
"## POSITION\n",
" 'Pos',\n",
" 'Primary Pos', \n",
" 'TmPos',\n",
" 'Position Grouped',\n",
" #'position',\n",
" #'position_code',\n",
" #'position_grouped',\n",
" 'outfielder_goalkeeper',\n",
"\n",
"## AGE\n",
" 'Age',\n",
" 'age_when_joining',\n",
" #'birth_day',\n",
" #'birth_month', \n",
" #'birth_year',\n",
" #'age',\n",
" #'current_age',\n",
" 'dob',\n",
"\n",
"## PHYSICAL ATTRINUTES\n",
" 'height',\n",
" 'foot',\n",
"\n",
"## NATIONALITY \n",
" 'pob',\n",
" 'cob',\n",
" 'Nationality Cleaned',\n",
" #'Nationality Code', \n",
" 'citizenship',\n",
" 'second_citizenship', \n",
" \n",
"## TRANSFERMAKRT VALUATION\n",
" 'market_value_gbp',\n",
" #'market_value_pounds',\n",
" 'market_value_eur',\n",
" #'market_value_euros',\n",
" 'joined',\n",
" 'years_since_joining',\n",
" 'years_until_contract_expiry', \n",
" 'contract_expires',\n",
" 'contract_option',\n",
" 'on_loan_from',\n",
" 'on_loan_from_country',\n",
" 'loan_contract_expiry',\n",
" #'player_agent',\n",
"\n",
"## CAPOLOGY SALARY INFORMATION\n",
" 'weekly_gross_base_salary_gbp',\n",
" 'annual_gross_base_salary_gbp',\n",
" 'adj_current_gross_base_salary_gbp',\n",
" 'estimated_gross_total_gbp',\n",
" 'current_contract_status',\n",
" 'current_contract_expiration',\n",
" 'current_contract_length',\n",
"\n",
"## TRANSFER HISTORY INFORMATION - NOT INCLUDED RIGHT NOW \n",
" #'club_name', \n",
" #'club_involved_name',\n",
" #'fee',\n",
" #'transfer_movement',\n",
" #'transfer_period',\n",
" #'fee_cleaned',\n",
"\n",
"## PLAYER STATS\n",
" 'MP',\n",
" 'Starts',\n",
" 'Min',\n",
" '90s',\n",
" 'Gls',\n",
" 'Ast',\n",
" 'G-PK',\n",
" 'PK',\n",
" 'PKatt',\n",
" 'CrdY',\n",
" 'CrdR',\n",
" #'Gls.1',\n",
" #'Ast.1',\n",
" 'G+A',\n",
" #'G-PK.1',\n",
" 'G+A-PK',\n",
" 'xG',\n",
" 'npxG',\n",
" 'xA',\n",
" 'npxG+xA',\n",
" #'xG.1',\n",
" #'xA.1',\n",
" 'xG+xA',\n",
" #'npxG.1',\n",
" #'npxG+xA.1',\n",
" #'Matches',\n",
" 'Sh',\n",
" 'SoT',\n",
" 'SoT%',\n",
" 'Sh/90',\n",
" 'SoT/90',\n",
" 'G/Sh',\n",
" 'G/SoT',\n",
" 'Dist',\n",
" 'FK',\n",
" 'npxG/Sh',\n",
" 'G-xG',\n",
" 'np:G-xG',\n",
" 'Cmp',\n",
" 'Att',\n",
" 'Cmp%',\n",
" 'TotDist',\n",
" 'PrgDist',\n",
" #'Cmp.1',\n",
" #'Att.1',\n",
" #'Cmp%.1',\n",
" #'Cmp.2',\n",
" #'Att.2',\n",
" #'Cmp%.2',\n",
" #'Cmp.3',\n",
" #'Att.3',\n",
" #'Cmp%.3',\n",
" 'A-xA',\n",
" 'KP',\n",
" '1/3',\n",
" 'PPA',\n",
" 'CrsPA',\n",
" 'Prog',\n",
" 'Live',\n",
" 'Dead',\n",
" 'TB',\n",
" 'Press',\n",
" 'Sw',\n",
" 'Crs',\n",
" 'CK',\n",
" 'In',\n",
" 'Out',\n",
" 'Str',\n",
" 'Ground',\n",
" 'Low',\n",
" 'High',\n",
" 'Left',\n",
" 'Right',\n",
" 'Head',\n",
" 'TI',\n",
" 'Other',\n",
" 'Off',\n",
" #'Out.1',\n",
" 'Int',\n",
" 'Blocks',\n",
" 'SCA',\n",
" 'SCA90',\n",
" 'PassLive',\n",
" 'PassDead',\n",
" 'Drib',\n",
" 'Fld',\n",
" 'Def',\n",
" 'GCA',\n",
" 'GCA90',\n",
" #'PassLive.1',\n",
" 'PassDead.1',\n",
" #'Drib.1',\n",
" #'Sh.1',\n",
" #'Fld.1',\n",
" #'Def.1',\n",
" 'Tkl',\n",
" 'TklW',\n",
" 'Def 3rd',\n",
" 'Mid 3rd',\n",
" 'Att 3rd',\n",
" #'Tkl.1',\n",
" 'Tkl%',\n",
" 'Past',\n",
" 'Succ',\n",
" '%',\n",
" #'Def 3rd.1',\n",
" #'Mid 3rd.1',\n",
" #'Att 3rd.1',\n",
" 'ShSv',\n",
" 'Pass',\n",
" 'Tkl+Int',\n",
" 'Clr',\n",
" 'Err',\n",
" 'Touches',\n",
" 'Def Pen',\n",
" 'Att Pen',\n",
" 'Succ%',\n",
" '#Pl',\n",
" 'Megs',\n",
" 'Carries',\n",
" 'CPA',\n",
" 'Mis',\n",
" 'Dis',\n",
" 'Targ',\n",
" 'Rec',\n",
" 'Rec%',\n",
" #'Prog.1',\n",
" 'Mn/MP',\n",
" 'Min%',\n",
" 'Mn/Start',\n",
" 'Compl',\n",
" 'Subs',\n",
" 'Mn/Sub',\n",
" 'unSub',\n",
" 'PPM',\n",
" 'onG',\n",
" 'onGA',\n",
" '+/-',\n",
" '+/-90',\n",
" 'On-Off',\n",
" 'onxG',\n",
" 'onxGA',\n",
" 'xG+/-',\n",
" 'xG+/-90',\n",
" #'On-Off.1',\n",
" '2CrdY',\n",
" 'Fls',\n",
" 'PKwon',\n",
" 'PKcon',\n",
" 'OG',\n",
" 'Recov',\n",
" 'Won',\n",
" 'Lost',\n",
" 'Won%',\n",
" 'GA',\n",
" 'GA90',\n",
" 'SoTA',\n",
" 'Saves',\n",
" 'Save%',\n",
" 'W',\n",
" 'D',\n",
" 'L',\n",
" 'CS',\n",
" 'CS%',\n",
" 'PKA',\n",
" 'PKsv',\n",
" 'PKm',\n",
" #'Save%.1',\n",
" 'PSxG',\n",
" 'PSxG/SoT',\n",
" 'PSxG+/-',\n",
" '/90',\n",
" 'Thr',\n",
" 'Launch%',\n",
" 'AvgLen',\n",
" #'Launch%.1',\n",
" #'AvgLen.1',\n",
" 'Opp',\n",
" 'Stp',\n",
" 'Stp%',\n",
" '#OPA',\n",
" '#OPA/90',\n",
" 'AvgDist'\n",
" ]"
]
},
{
"cell_type": "code",
"execution_count": 122,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" player_name_fbref | \n",
" season | \n",
" url_fbref | \n",
" url_tm | \n",
" tm_id | \n",
" fbref_id | \n",
" Squad | \n",
" Team Country | \n",
" Comp | \n",
" Pos | \n",
" Primary Pos | \n",
" TmPos | \n",
" Position Grouped | \n",
" outfielder_goalkeeper | \n",
" Age | \n",
" age_when_joining | \n",
" dob | \n",
" height | \n",
" foot | \n",
" pob | \n",
" cob | \n",
" Nationality Cleaned | \n",
" citizenship | \n",
" second_citizenship | \n",
" market_value_gbp | \n",
" market_value_eur | \n",
" joined | \n",
" years_since_joining | \n",
" years_until_contract_expiry | \n",
" contract_expires | \n",
" contract_option | \n",
" on_loan_from | \n",
" on_loan_from_country | \n",
" loan_contract_expiry | \n",
" weekly_gross_base_salary_gbp | \n",
" annual_gross_base_salary_gbp | \n",
" adj_current_gross_base_salary_gbp | \n",
" estimated_gross_total_gbp | \n",
" current_contract_status | \n",
" current_contract_expiration | \n",
" current_contract_length | \n",
" MP | \n",
" Starts | \n",
" Min | \n",
" 90s | \n",
" Gls | \n",
" Ast | \n",
" G-PK | \n",
" PK | \n",
" PKatt | \n",
" CrdY | \n",
" CrdR | \n",
" G+A | \n",
" G+A-PK | \n",
" xG | \n",
" npxG | \n",
" xA | \n",
" npxG+xA | \n",
" xG+xA | \n",
" Sh | \n",
" SoT | \n",
" SoT% | \n",
" Sh/90 | \n",
" SoT/90 | \n",
" G/Sh | \n",
" G/SoT | \n",
" Dist | \n",
" FK | \n",
" npxG/Sh | \n",
" G-xG | \n",
" np:G-xG | \n",
" Cmp | \n",
" Att | \n",
" Cmp% | \n",
" TotDist | \n",
" PrgDist | \n",
" A-xA | \n",
" KP | \n",
" 1/3 | \n",
" PPA | \n",
" CrsPA | \n",
" Prog | \n",
" Live | \n",
" Dead | \n",
" TB | \n",
" Press | \n",
" Sw | \n",
" Crs | \n",
" CK | \n",
" In | \n",
" Out | \n",
" Str | \n",
" Ground | \n",
" Low | \n",
" High | \n",
" Left | \n",
" Right | \n",
" Head | \n",
" TI | \n",
" Other | \n",
" Off | \n",
" Int | \n",
" Blocks | \n",
" SCA | \n",
" SCA90 | \n",
" PassLive | \n",
" PassDead | \n",
" Drib | \n",
" Fld | \n",
" Def | \n",
" GCA | \n",
" GCA90 | \n",
" PassDead.1 | \n",
" Tkl | \n",
" TklW | \n",
" Def 3rd | \n",
" Mid 3rd | \n",
" Att 3rd | \n",
" Tkl% | \n",
" Past | \n",
" Succ | \n",
" % | \n",
" ShSv | \n",
" Pass | \n",
" Tkl+Int | \n",
" Clr | \n",
" Err | \n",
" Touches | \n",
" Def Pen | \n",
" Att Pen | \n",
" Succ% | \n",
" #Pl | \n",
" Megs | \n",
" Carries | \n",
" CPA | \n",
" Mis | \n",
" Dis | \n",
" Targ | \n",
" Rec | \n",
" Rec% | \n",
" Mn/MP | \n",
" Min% | \n",
" Mn/Start | \n",
" Compl | \n",
" Subs | \n",
" Mn/Sub | \n",
" unSub | \n",
" PPM | \n",
" onG | \n",
" onGA | \n",
" +/- | \n",
" +/-90 | \n",
" On-Off | \n",
" onxG | \n",
" onxGA | \n",
" xG+/- | \n",
" xG+/-90 | \n",
" 2CrdY | \n",
" Fls | \n",
" PKwon | \n",
" PKcon | \n",
" OG | \n",
" Recov | \n",
" Won | \n",
" Lost | \n",
" Won% | \n",
" GA | \n",
" GA90 | \n",
" SoTA | \n",
" Saves | \n",
" Save% | \n",
" W | \n",
" D | \n",
" L | \n",
" CS | \n",
" CS% | \n",
" PKA | \n",
" PKsv | \n",
" PKm | \n",
" PSxG | \n",
" PSxG/SoT | \n",
" PSxG+/- | \n",
" /90 | \n",
" Thr | \n",
" Launch% | \n",
" AvgLen | \n",
" Opp | \n",
" Stp | \n",
" Stp% | \n",
" #OPA | \n",
" #OPA/90 | \n",
" AvgDist | \n",
"
\n",
" \n",
" \n",
" \n",
" NaN | \n",
" Aaron Connolly | \n",
" 2019/2020 | \n",
" https://fbref.com/en/players/27c01749/Aaron-Co... | \n",
" https://www.transfermarkt.com/aaron-connolly/p... | \n",
" 434207 | \n",
" 27c01749 | \n",
" Brighton | \n",
" England | \n",
" Premier League | \n",
" FW | \n",
" FW | \n",
" Centre-Forward | \n",
" Forward | \n",
" Outfielder | \n",
" 19 | \n",
" 19.0 | \n",
" 2000-01-28 | \n",
" 175.0 | \n",
" right | \n",
" Galway | \n",
" Ireland | \n",
" Ireland | \n",
" Ireland | \n",
" NaN | \n",
" 4050000.0 | \n",
" 4500000.0 | \n",
" 2019-07-01 | \n",
" 2.0 | \n",
" 2.0 | \n",
" 2024-06-30 | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" 24 | \n",
" 14 | \n",
" 1258.0 | \n",
" 14.0 | \n",
" 3 | \n",
" 1 | \n",
" 3 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0.29 | \n",
" 0.29 | \n",
" 3.2 | \n",
" 3.2 | \n",
" 0.3 | \n",
" 3.5 | \n",
" 0.25 | \n",
" 38.0 | \n",
" 13.0 | \n",
" 34.2 | \n",
" 2.72 | \n",
" 0.93 | \n",
" 0.08 | \n",
" 0.23 | \n",
" 15.9 | \n",
" 0.0 | \n",
" 0.08 | \n",
" -0.2 | \n",
" -0.2 | \n",
" 126.0 | \n",
" 163.0 | \n",
" 77.3 | \n",
" 1739.0 | \n",
" 242.0 | \n",
" 0.7 | \n",
" 6.0 | \n",
" 6.0 | \n",
" 2.0 | \n",
" 0.0 | \n",
" 10.0 | \n",
" 148.0 | \n",
" 15.0 | \n",
" 1.0 | \n",
" 50.0 | \n",
" 0.0 | \n",
" 7.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 90.0 | \n",
" 52.0 | \n",
" 21.0 | \n",
" 27.0 | \n",
" 107.0 | \n",
" 13.0 | \n",
" 1.0 | \n",
" 6.0 | \n",
" 0.0 | \n",
" 4.0 | \n",
" 10.0 | \n",
" 25.0 | \n",
" 1.79 | \n",
" 7.0 | \n",
" 0.0 | \n",
" 3.0 | \n",
" 9.0 | \n",
" 3.0 | \n",
" 5.0 | \n",
" 0.36 | \n",
" 0.0 | \n",
" 12.0 | \n",
" 8.0 | \n",
" 1.0 | \n",
" 5.0 | \n",
" 6.0 | \n",
" 25.0 | \n",
" 9.0 | \n",
" 69.0 | \n",
" 29.5 | \n",
" 0.0 | \n",
" 7.0 | \n",
" 17.0 | \n",
" 1.0 | \n",
" 0.0 | \n",
" 349.0 | \n",
" 2.0 | \n",
" 61.0 | \n",
" 37.5 | \n",
" 6.0 | \n",
" 1.0 | \n",
" 228.0 | \n",
" 12.0 | \n",
" 42.0 | \n",
" 34.0 | \n",
" 535.0 | \n",
" 235.0 | \n",
" 43.9 | \n",
" 52 | \n",
" 36.8 | \n",
" 72.0 | \n",
" 0.0 | \n",
" 10 | \n",
" 26.0 | \n",
" 4 | \n",
" 1.13 | \n",
" 18.0 | \n",
" 22.0 | \n",
" -4.0 | \n",
" -0.29 | \n",
" 0.17 | \n",
" 15.6 | \n",
" 19.8 | \n",
" -4.2 | \n",
" -0.30 | \n",
" 0.0 | \n",
" 16 | \n",
" 2.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 54.0 | \n",
" 14.0 | \n",
" 48.0 | \n",
" 22.6 | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
"
\n",
" \n",
" NaN | \n",
" Aaron Connolly | \n",
" 2020/2021 | \n",
" https://fbref.com/en/players/27c01749/Aaron-Co... | \n",
" https://www.transfermarkt.com/aaron-connolly/p... | \n",
" 434207 | \n",
" 27c01749 | \n",
" Brighton | \n",
" England | \n",
" Premier League | \n",
" FW | \n",
" FW | \n",
" Centre-Forward | \n",
" Forward | \n",
" Outfielder | \n",
" 20 | \n",
" 19.0 | \n",
" 2000-01-28 | \n",
" 175.0 | \n",
" right | \n",
" Galway | \n",
" Ireland | \n",
" Ireland | \n",
" Ireland | \n",
" NaN | \n",
" 6300000.0 | \n",
" 7000000.0 | \n",
" 2019-07-01 | \n",
" 2.0 | \n",
" 2.0 | \n",
" 2024-06-30 | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" 17 | \n",
" 9 | \n",
" 791.0 | \n",
" 8.8 | \n",
" 2 | \n",
" 1 | \n",
" 2 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0.34 | \n",
" 0.34 | \n",
" 3.5 | \n",
" 3.5 | \n",
" 0.2 | \n",
" 3.7 | \n",
" 0.42 | \n",
" 23.0 | \n",
" 8.0 | \n",
" 34.8 | \n",
" 2.62 | \n",
" 0.91 | \n",
" 0.09 | \n",
" 0.25 | \n",
" 13.7 | \n",
" 0.0 | \n",
" 0.15 | \n",
" -1.5 | \n",
" -1.5 | \n",
" 79.0 | \n",
" 101.0 | \n",
" 78.2 | \n",
" 1147.0 | \n",
" 165.0 | \n",
" 0.8 | \n",
" 5.0 | \n",
" 2.0 | \n",
" 1.0 | \n",
" 0.0 | \n",
" 3.0 | \n",
" 91.0 | \n",
" 10.0 | \n",
" 0.0 | \n",
" 22.0 | \n",
" 1.0 | \n",
" 2.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 64.0 | \n",
" 26.0 | \n",
" 11.0 | \n",
" 11.0 | \n",
" 74.0 | \n",
" 5.0 | \n",
" 0.0 | \n",
" 3.0 | \n",
" 0.0 | \n",
" 2.0 | \n",
" 4.0 | \n",
" 12.0 | \n",
" 1.37 | \n",
" 7.0 | \n",
" 0.0 | \n",
" 3.0 | \n",
" 2.0 | \n",
" 0.0 | \n",
" 1.0 | \n",
" 0.11 | \n",
" 0.0 | \n",
" 7.0 | \n",
" 5.0 | \n",
" 2.0 | \n",
" 4.0 | \n",
" 1.0 | \n",
" 20.0 | \n",
" 4.0 | \n",
" 40.0 | \n",
" 32.3 | \n",
" 0.0 | \n",
" 8.0 | \n",
" 7.0 | \n",
" 1.0 | \n",
" 0.0 | \n",
" 201.0 | \n",
" 1.0 | \n",
" 38.0 | \n",
" 80.0 | \n",
" 8.0 | \n",
" 0.0 | \n",
" 124.0 | \n",
" 4.0 | \n",
" 29.0 | \n",
" 15.0 | \n",
" 357.0 | \n",
" 143.0 | \n",
" 40.1 | \n",
" 47 | \n",
" 23.1 | \n",
" 68.0 | \n",
" NaN | \n",
" 8 | \n",
" 23.0 | \n",
" 11 | \n",
" 0.88 | \n",
" 12.0 | \n",
" 17.0 | \n",
" -5.0 | \n",
" -0.57 | \n",
" -0.53 | \n",
" 13.8 | \n",
" 7.8 | \n",
" 6.0 | \n",
" 0.69 | \n",
" 0.0 | \n",
" 5 | \n",
" 1.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 28.0 | \n",
" 11.0 | \n",
" 30.0 | \n",
" 26.8 | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
"
\n",
" \n",
" NaN | \n",
" Aaron Connolly | \n",
" 2021/2022 | \n",
" https://fbref.com/en/players/27c01749/Aaron-Co... | \n",
" https://www.transfermarkt.com/aaron-connolly/p... | \n",
" 434207 | \n",
" 27c01749 | \n",
" Brighton | \n",
" England | \n",
" Premier League | \n",
" FW | \n",
" FW | \n",
" Centre-Forward | \n",
" Forward | \n",
" Outfielder | \n",
" 21 | \n",
" 19.0 | \n",
" 2000-01-28 | \n",
" 175.0 | \n",
" right | \n",
" Galway | \n",
" Ireland | \n",
" Ireland | \n",
" Ireland | \n",
" NaN | \n",
" 6300000.0 | \n",
" 7000000.0 | \n",
" 2019-07-01 | \n",
" 2.0 | \n",
" 2.0 | \n",
" 2024-06-30 | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" 1 | \n",
" 0 | \n",
" 45.0 | \n",
" 0.5 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0.00 | \n",
" 0.00 | \n",
" 0.4 | \n",
" 0.4 | \n",
" 0.0 | \n",
" 0.4 | \n",
" 0.85 | \n",
" 1.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 2.00 | \n",
" 0.00 | \n",
" 0.00 | \n",
" NaN | \n",
" 9.0 | \n",
" 0.0 | \n",
" 0.42 | \n",
" -0.4 | \n",
" -0.4 | \n",
" 2.0 | \n",
" 3.0 | \n",
" 66.7 | \n",
" 14.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 3.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 1.0 | \n",
" 0.0 | \n",
" 1.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 2.0 | \n",
" 1.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 2.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 1.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 1.0 | \n",
" 2.00 | \n",
" 1.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.00 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" NaN | \n",
" 0.0 | \n",
" 1.0 | \n",
" 8.3 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 8.0 | \n",
" 0.0 | \n",
" 2.0 | \n",
" NaN | \n",
" 0.0 | \n",
" 0.0 | \n",
" 5.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 1.0 | \n",
" 20.0 | \n",
" 4.0 | \n",
" 20.0 | \n",
" 45 | \n",
" 16.7 | \n",
" NaN | \n",
" 0.0 | \n",
" 1 | \n",
" 45.0 | \n",
" 1 | \n",
" 3.00 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.00 | \n",
" -0.40 | \n",
" 1.0 | \n",
" 0.7 | \n",
" 0.3 | \n",
" 0.68 | \n",
" 0.0 | \n",
" 0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 3.0 | \n",
" 0.0 | \n",
" 2.0 | \n",
" 0.0 | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
"
\n",
" \n",
" 1363.0 | \n",
" Aaron Cresswell | \n",
" 2017/2018 | \n",
" https://fbref.com/en/players/4f974391/Aaron-Cr... | \n",
" https://www.transfermarkt.com/aaron-cresswell/... | \n",
" 92571 | \n",
" 4f974391 | \n",
" West Ham | \n",
" England | \n",
" Premier League | \n",
" DF | \n",
" DF | \n",
" Left-Back | \n",
" Defender | \n",
" Outfielder | \n",
" 27 | \n",
" 24.0 | \n",
" 1989-12-15 | \n",
" 170.0 | \n",
" left | \n",
" Liverpool | \n",
" England | \n",
" England | \n",
" England | \n",
" NaN | \n",
" 10800000.0 | \n",
" 12000000.0 | \n",
" 2014-07-03 | \n",
" 7.0 | \n",
" 1.0 | \n",
" 2023-06-30 | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" 50000.0 | \n",
" 2600000.0 | \n",
" 2671365.0 | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" 36 | \n",
" 35 | \n",
" 3069.0 | \n",
" 34.1 | \n",
" 1 | \n",
" 3 | \n",
" 1 | \n",
" 0 | \n",
" 0 | \n",
" 7 | \n",
" 0 | \n",
" 0.12 | \n",
" 0.12 | \n",
" 0.8 | \n",
" 0.8 | \n",
" 2.8 | \n",
" 3.6 | \n",
" 0.10 | \n",
" 21.0 | \n",
" 6.0 | \n",
" 28.6 | \n",
" 0.62 | \n",
" 0.18 | \n",
" 0.05 | \n",
" 0.17 | \n",
" 28.1 | \n",
" 8.0 | \n",
" 0.04 | \n",
" 0.2 | \n",
" 0.2 | \n",
" 1224.0 | \n",
" 1708.0 | \n",
" 71.7 | \n",
" 23519.0 | \n",
" 10212.0 | \n",
" 0.2 | \n",
" 35.0 | \n",
" 117.0 | \n",
" 21.0 | \n",
" 14.0 | \n",
" 96.0 | \n",
" 1343.0 | \n",
" 365.0 | \n",
" 1.0 | \n",
" 222.0 | \n",
" 83.0 | \n",
" 93.0 | \n",
" 67.0 | \n",
" 35.0 | \n",
" 15.0 | \n",
" 9.0 | \n",
" 893.0 | \n",
" 293.0 | \n",
" 522.0 | \n",
" 1329.0 | \n",
" 78.0 | \n",
" 59.0 | \n",
" 210.0 | \n",
" 5.0 | \n",
" 15.0 | \n",
" 39.0 | \n",
" 52.0 | \n",
" 62.0 | \n",
" 1.82 | \n",
" 35.0 | \n",
" 21.0 | \n",
" 1.0 | \n",
" 3.0 | \n",
" 0.0 | \n",
" 9.0 | \n",
" 0.26 | \n",
" 3.0 | \n",
" 38.0 | \n",
" 18.0 | \n",
" 15.0 | \n",
" 18.0 | \n",
" 5.0 | \n",
" 53.1 | \n",
" 15.0 | \n",
" 115.0 | \n",
" 32.1 | \n",
" 0.0 | \n",
" 38.0 | \n",
" 90.0 | \n",
" 133.0 | \n",
" 0.0 | \n",
" 2050.0 | \n",
" 125.0 | \n",
" 17.0 | \n",
" 33.3 | \n",
" 7.0 | \n",
" 0.0 | \n",
" 1071.0 | \n",
" 2.0 | \n",
" 18.0 | \n",
" 19.0 | \n",
" 1171.0 | \n",
" 1094.0 | \n",
" 93.4 | \n",
" 85 | \n",
" 89.7 | \n",
" NaN | \n",
" 30.0 | \n",
" 1 | \n",
" NaN | \n",
" 1 | \n",
" 1.14 | \n",
" 45.0 | \n",
" 60.0 | \n",
" -15.0 | \n",
" -0.44 | \n",
" 0.84 | \n",
" 38.0 | \n",
" 51.5 | \n",
" -13.5 | \n",
" -0.40 | \n",
" 0.0 | \n",
" 20 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 277.0 | \n",
" 70.0 | \n",
" 57.0 | \n",
" 55.1 | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
"
\n",
" \n",
" 2395.0 | \n",
" Aaron Cresswell | \n",
" 2018/2019 | \n",
" https://fbref.com/en/players/4f974391/Aaron-Cr... | \n",
" https://www.transfermarkt.com/aaron-cresswell/... | \n",
" 92571 | \n",
" 4f974391 | \n",
" West Ham | \n",
" England | \n",
" Premier League | \n",
" DF | \n",
" DF | \n",
" Left-Back | \n",
" Defender | \n",
" Outfielder | \n",
" 28 | \n",
" 24.0 | \n",
" 1989-12-15 | \n",
" 170.0 | \n",
" left | \n",
" Liverpool | \n",
" England | \n",
" England | \n",
" England | \n",
" NaN | \n",
" 9000000.0 | \n",
" 10000000.0 | \n",
" 2014-07-03 | \n",
" 7.0 | \n",
" 1.0 | \n",
" 2023-06-30 | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" 50000.0 | \n",
" 2600000.0 | \n",
" 2625727.0 | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" 20 | \n",
" 18 | \n",
" 1589.0 | \n",
" 17.7 | \n",
" 0 | \n",
" 1 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 1 | \n",
" 0 | \n",
" 0.06 | \n",
" 0.06 | \n",
" 0.5 | \n",
" 0.5 | \n",
" 0.9 | \n",
" 1.4 | \n",
" 0.08 | \n",
" 11.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.62 | \n",
" 0.00 | \n",
" 0.00 | \n",
" NaN | \n",
" 23.5 | \n",
" 2.0 | \n",
" 0.04 | \n",
" -0.5 | \n",
" -0.5 | \n",
" 842.0 | \n",
" 1070.0 | \n",
" 78.7 | \n",
" 13627.0 | \n",
" 5572.0 | \n",
" 0.1 | \n",
" 16.0 | \n",
" 55.0 | \n",
" 15.0 | \n",
" 5.0 | \n",
" 65.0 | \n",
" 854.0 | \n",
" 216.0 | \n",
" 0.0 | \n",
" 168.0 | \n",
" 18.0 | \n",
" 46.0 | \n",
" 10.0 | \n",
" 0.0 | \n",
" 2.0 | \n",
" 0.0 | \n",
" 642.0 | \n",
" 235.0 | \n",
" 193.0 | \n",
" 787.0 | \n",
" 51.0 | \n",
" 27.0 | \n",
" 190.0 | \n",
" 4.0 | \n",
" 2.0 | \n",
" 27.0 | \n",
" 44.0 | \n",
" 29.0 | \n",
" 1.64 | \n",
" 19.0 | \n",
" 6.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 1.0 | \n",
" 2.0 | \n",
" 0.11 | \n",
" 2.0 | \n",
" 30.0 | \n",
" 19.0 | \n",
" 14.0 | \n",
" 12.0 | \n",
" 4.0 | \n",
" 42.9 | \n",
" 16.0 | \n",
" 68.0 | \n",
" 31.5 | \n",
" 0.0 | \n",
" 39.0 | \n",
" 49.0 | \n",
" 60.0 | \n",
" 1.0 | \n",
" 1266.0 | \n",
" 78.0 | \n",
" 36.0 | \n",
" 63.6 | \n",
" 7.0 | \n",
" 1.0 | \n",
" 723.0 | \n",
" 8.0 | \n",
" 11.0 | \n",
" 13.0 | \n",
" 797.0 | \n",
" 715.0 | \n",
" 89.7 | \n",
" 79 | \n",
" 46.5 | \n",
" 85.0 | \n",
" 16.0 | \n",
" 2 | \n",
" 30.0 | \n",
" 7 | \n",
" 1.30 | \n",
" 21.0 | \n",
" 26.0 | \n",
" -5.0 | \n",
" -0.28 | \n",
" -0.38 | \n",
" 20.1 | \n",
" 25.3 | \n",
" -5.3 | \n",
" -0.30 | \n",
" 0.0 | \n",
" 2 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 169.0 | \n",
" 22.0 | \n",
" 14.0 | \n",
" 61.1 | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" player_name_fbref season \\\n",
"NaN Aaron Connolly 2019/2020 \n",
"NaN Aaron Connolly 2020/2021 \n",
"NaN Aaron Connolly 2021/2022 \n",
"1363.0 Aaron Cresswell 2017/2018 \n",
"2395.0 Aaron Cresswell 2018/2019 \n",
"\n",
" url_fbref \\\n",
"NaN https://fbref.com/en/players/27c01749/Aaron-Co... \n",
"NaN https://fbref.com/en/players/27c01749/Aaron-Co... \n",
"NaN https://fbref.com/en/players/27c01749/Aaron-Co... \n",
"1363.0 https://fbref.com/en/players/4f974391/Aaron-Cr... \n",
"2395.0 https://fbref.com/en/players/4f974391/Aaron-Cr... \n",
"\n",
" url_tm tm_id fbref_id \\\n",
"NaN https://www.transfermarkt.com/aaron-connolly/p... 434207 27c01749 \n",
"NaN https://www.transfermarkt.com/aaron-connolly/p... 434207 27c01749 \n",
"NaN https://www.transfermarkt.com/aaron-connolly/p... 434207 27c01749 \n",
"1363.0 https://www.transfermarkt.com/aaron-cresswell/... 92571 4f974391 \n",
"2395.0 https://www.transfermarkt.com/aaron-cresswell/... 92571 4f974391 \n",
"\n",
" Squad Team Country Comp Pos Primary Pos TmPos \\\n",
"NaN Brighton England Premier League FW FW Centre-Forward \n",
"NaN Brighton England Premier League FW FW Centre-Forward \n",
"NaN Brighton England Premier League FW FW Centre-Forward \n",
"1363.0 West Ham England Premier League DF DF Left-Back \n",
"2395.0 West Ham England Premier League DF DF Left-Back \n",
"\n",
" Position Grouped outfielder_goalkeeper Age age_when_joining \\\n",
"NaN Forward Outfielder 19 19.0 \n",
"NaN Forward Outfielder 20 19.0 \n",
"NaN Forward Outfielder 21 19.0 \n",
"1363.0 Defender Outfielder 27 24.0 \n",
"2395.0 Defender Outfielder 28 24.0 \n",
"\n",
" dob height foot pob cob Nationality Cleaned \\\n",
"NaN 2000-01-28 175.0 right Galway Ireland Ireland \n",
"NaN 2000-01-28 175.0 right Galway Ireland Ireland \n",
"NaN 2000-01-28 175.0 right Galway Ireland Ireland \n",
"1363.0 1989-12-15 170.0 left Liverpool England England \n",
"2395.0 1989-12-15 170.0 left Liverpool England England \n",
"\n",
" citizenship second_citizenship market_value_gbp market_value_eur \\\n",
"NaN Ireland NaN 4050000.0 4500000.0 \n",
"NaN Ireland NaN 6300000.0 7000000.0 \n",
"NaN Ireland NaN 6300000.0 7000000.0 \n",
"1363.0 England NaN 10800000.0 12000000.0 \n",
"2395.0 England NaN 9000000.0 10000000.0 \n",
"\n",
" joined years_since_joining years_until_contract_expiry \\\n",
"NaN 2019-07-01 2.0 2.0 \n",
"NaN 2019-07-01 2.0 2.0 \n",
"NaN 2019-07-01 2.0 2.0 \n",
"1363.0 2014-07-03 7.0 1.0 \n",
"2395.0 2014-07-03 7.0 1.0 \n",
"\n",
" contract_expires contract_option on_loan_from on_loan_from_country \\\n",
"NaN 2024-06-30 NaN NaN NaN \n",
"NaN 2024-06-30 NaN NaN NaN \n",
"NaN 2024-06-30 NaN NaN NaN \n",
"1363.0 2023-06-30 NaN NaN NaN \n",
"2395.0 2023-06-30 NaN NaN NaN \n",
"\n",
" loan_contract_expiry weekly_gross_base_salary_gbp \\\n",
"NaN NaN NaN \n",
"NaN NaN NaN \n",
"NaN NaN NaN \n",
"1363.0 NaN 50000.0 \n",
"2395.0 NaN 50000.0 \n",
"\n",
" annual_gross_base_salary_gbp adj_current_gross_base_salary_gbp \\\n",
"NaN NaN NaN \n",
"NaN NaN NaN \n",
"NaN NaN NaN \n",
"1363.0 2600000.0 2671365.0 \n",
"2395.0 2600000.0 2625727.0 \n",
"\n",
" estimated_gross_total_gbp current_contract_status \\\n",
"NaN NaN NaN \n",
"NaN NaN NaN \n",
"NaN NaN NaN \n",
"1363.0 NaN NaN \n",
"2395.0 NaN NaN \n",
"\n",
" current_contract_expiration current_contract_length MP Starts \\\n",
"NaN NaN NaN 24 14 \n",
"NaN NaN NaN 17 9 \n",
"NaN NaN NaN 1 0 \n",
"1363.0 NaN NaN 36 35 \n",
"2395.0 NaN NaN 20 18 \n",
"\n",
" Min 90s Gls Ast G-PK PK PKatt CrdY CrdR G+A G+A-PK \\\n",
"NaN 1258.0 14.0 3 1 3 0 0 0 0 0.29 0.29 \n",
"NaN 791.0 8.8 2 1 2 0 0 0 0 0.34 0.34 \n",
"NaN 45.0 0.5 0 0 0 0 0 0 0 0.00 0.00 \n",
"1363.0 3069.0 34.1 1 3 1 0 0 7 0 0.12 0.12 \n",
"2395.0 1589.0 17.7 0 1 0 0 0 1 0 0.06 0.06 \n",
"\n",
" xG npxG xA npxG+xA xG+xA Sh SoT SoT% Sh/90 SoT/90 G/Sh \\\n",
"NaN 3.2 3.2 0.3 3.5 0.25 38.0 13.0 34.2 2.72 0.93 0.08 \n",
"NaN 3.5 3.5 0.2 3.7 0.42 23.0 8.0 34.8 2.62 0.91 0.09 \n",
"NaN 0.4 0.4 0.0 0.4 0.85 1.0 0.0 0.0 2.00 0.00 0.00 \n",
"1363.0 0.8 0.8 2.8 3.6 0.10 21.0 6.0 28.6 0.62 0.18 0.05 \n",
"2395.0 0.5 0.5 0.9 1.4 0.08 11.0 0.0 0.0 0.62 0.00 0.00 \n",
"\n",
" G/SoT Dist FK npxG/Sh G-xG np:G-xG Cmp Att Cmp% \\\n",
"NaN 0.23 15.9 0.0 0.08 -0.2 -0.2 126.0 163.0 77.3 \n",
"NaN 0.25 13.7 0.0 0.15 -1.5 -1.5 79.0 101.0 78.2 \n",
"NaN NaN 9.0 0.0 0.42 -0.4 -0.4 2.0 3.0 66.7 \n",
"1363.0 0.17 28.1 8.0 0.04 0.2 0.2 1224.0 1708.0 71.7 \n",
"2395.0 NaN 23.5 2.0 0.04 -0.5 -0.5 842.0 1070.0 78.7 \n",
"\n",
" TotDist PrgDist A-xA KP 1/3 PPA CrsPA Prog Live Dead \\\n",
"NaN 1739.0 242.0 0.7 6.0 6.0 2.0 0.0 10.0 148.0 15.0 \n",
"NaN 1147.0 165.0 0.8 5.0 2.0 1.0 0.0 3.0 91.0 10.0 \n",
"NaN 14.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 3.0 0.0 \n",
"1363.0 23519.0 10212.0 0.2 35.0 117.0 21.0 14.0 96.0 1343.0 365.0 \n",
"2395.0 13627.0 5572.0 0.1 16.0 55.0 15.0 5.0 65.0 854.0 216.0 \n",
"\n",
" TB Press Sw Crs CK In Out Str Ground Low High \\\n",
"NaN 1.0 50.0 0.0 7.0 0.0 0.0 0.0 0.0 90.0 52.0 21.0 \n",
"NaN 0.0 22.0 1.0 2.0 0.0 0.0 0.0 0.0 64.0 26.0 11.0 \n",
"NaN 0.0 1.0 0.0 1.0 0.0 0.0 0.0 0.0 2.0 1.0 0.0 \n",
"1363.0 1.0 222.0 83.0 93.0 67.0 35.0 15.0 9.0 893.0 293.0 522.0 \n",
"2395.0 0.0 168.0 18.0 46.0 10.0 0.0 2.0 0.0 642.0 235.0 193.0 \n",
"\n",
" Left Right Head TI Other Off Int Blocks SCA SCA90 \\\n",
"NaN 27.0 107.0 13.0 1.0 6.0 0.0 4.0 10.0 25.0 1.79 \n",
"NaN 11.0 74.0 5.0 0.0 3.0 0.0 2.0 4.0 12.0 1.37 \n",
"NaN 0.0 2.0 0.0 0.0 1.0 0.0 0.0 0.0 1.0 2.00 \n",
"1363.0 1329.0 78.0 59.0 210.0 5.0 15.0 39.0 52.0 62.0 1.82 \n",
"2395.0 787.0 51.0 27.0 190.0 4.0 2.0 27.0 44.0 29.0 1.64 \n",
"\n",
" PassLive PassDead Drib Fld Def GCA GCA90 PassDead.1 Tkl \\\n",
"NaN 7.0 0.0 3.0 9.0 3.0 5.0 0.36 0.0 12.0 \n",
"NaN 7.0 0.0 3.0 2.0 0.0 1.0 0.11 0.0 7.0 \n",
"NaN 1.0 0.0 0.0 0.0 0.0 0.0 0.00 0.0 0.0 \n",
"1363.0 35.0 21.0 1.0 3.0 0.0 9.0 0.26 3.0 38.0 \n",
"2395.0 19.0 6.0 0.0 0.0 1.0 2.0 0.11 2.0 30.0 \n",
"\n",
" TklW Def 3rd Mid 3rd Att 3rd Tkl% Past Succ % ShSv Pass \\\n",
"NaN 8.0 1.0 5.0 6.0 25.0 9.0 69.0 29.5 0.0 7.0 \n",
"NaN 5.0 2.0 4.0 1.0 20.0 4.0 40.0 32.3 0.0 8.0 \n",
"NaN 0.0 0.0 0.0 0.0 NaN 0.0 1.0 8.3 0.0 0.0 \n",
"1363.0 18.0 15.0 18.0 5.0 53.1 15.0 115.0 32.1 0.0 38.0 \n",
"2395.0 19.0 14.0 12.0 4.0 42.9 16.0 68.0 31.5 0.0 39.0 \n",
"\n",
" Tkl+Int Clr Err Touches Def Pen Att Pen Succ% #Pl Megs \\\n",
"NaN 17.0 1.0 0.0 349.0 2.0 61.0 37.5 6.0 1.0 \n",
"NaN 7.0 1.0 0.0 201.0 1.0 38.0 80.0 8.0 0.0 \n",
"NaN 0.0 0.0 0.0 8.0 0.0 2.0 NaN 0.0 0.0 \n",
"1363.0 90.0 133.0 0.0 2050.0 125.0 17.0 33.3 7.0 0.0 \n",
"2395.0 49.0 60.0 1.0 1266.0 78.0 36.0 63.6 7.0 1.0 \n",
"\n",
" Carries CPA Mis Dis Targ Rec Rec% Mn/MP Min% \\\n",
"NaN 228.0 12.0 42.0 34.0 535.0 235.0 43.9 52 36.8 \n",
"NaN 124.0 4.0 29.0 15.0 357.0 143.0 40.1 47 23.1 \n",
"NaN 5.0 0.0 0.0 1.0 20.0 4.0 20.0 45 16.7 \n",
"1363.0 1071.0 2.0 18.0 19.0 1171.0 1094.0 93.4 85 89.7 \n",
"2395.0 723.0 8.0 11.0 13.0 797.0 715.0 89.7 79 46.5 \n",
"\n",
" Mn/Start Compl Subs Mn/Sub unSub PPM onG onGA +/- +/-90 \\\n",
"NaN 72.0 0.0 10 26.0 4 1.13 18.0 22.0 -4.0 -0.29 \n",
"NaN 68.0 NaN 8 23.0 11 0.88 12.0 17.0 -5.0 -0.57 \n",
"NaN NaN 0.0 1 45.0 1 3.00 0.0 0.0 0.0 0.00 \n",
"1363.0 NaN 30.0 1 NaN 1 1.14 45.0 60.0 -15.0 -0.44 \n",
"2395.0 85.0 16.0 2 30.0 7 1.30 21.0 26.0 -5.0 -0.28 \n",
"\n",
" On-Off onxG onxGA xG+/- xG+/-90 2CrdY Fls PKwon PKcon OG \\\n",
"NaN 0.17 15.6 19.8 -4.2 -0.30 0.0 16 2.0 0.0 0.0 \n",
"NaN -0.53 13.8 7.8 6.0 0.69 0.0 5 1.0 0.0 0.0 \n",
"NaN -0.40 1.0 0.7 0.3 0.68 0.0 0 0.0 0.0 0.0 \n",
"1363.0 0.84 38.0 51.5 -13.5 -0.40 0.0 20 0.0 0.0 0.0 \n",
"2395.0 -0.38 20.1 25.3 -5.3 -0.30 0.0 2 0.0 0.0 0.0 \n",
"\n",
" Recov Won Lost Won% GA GA90 SoTA Saves Save% W D L CS \\\n",
"NaN 54.0 14.0 48.0 22.6 NaN NaN NaN NaN NaN NaN NaN NaN NaN \n",
"NaN 28.0 11.0 30.0 26.8 NaN NaN NaN NaN NaN NaN NaN NaN NaN \n",
"NaN 3.0 0.0 2.0 0.0 NaN NaN NaN NaN NaN NaN NaN NaN NaN \n",
"1363.0 277.0 70.0 57.0 55.1 NaN NaN NaN NaN NaN NaN NaN NaN NaN \n",
"2395.0 169.0 22.0 14.0 61.1 NaN NaN NaN NaN NaN NaN NaN NaN NaN \n",
"\n",
" CS% PKA PKsv PKm PSxG PSxG/SoT PSxG+/- /90 Thr Launch% \\\n",
"NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN \n",
"NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN \n",
"NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN \n",
"1363.0 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN \n",
"2395.0 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN \n",
"\n",
" AvgLen Opp Stp Stp% #OPA #OPA/90 AvgDist \n",
"NaN NaN NaN NaN NaN NaN NaN NaN \n",
"NaN NaN NaN NaN NaN NaN NaN NaN \n",
"NaN NaN NaN NaN NaN NaN NaN NaN \n",
"1363.0 NaN NaN NaN NaN NaN NaN NaN \n",
"2395.0 NaN NaN NaN NaN NaN NaN NaN "
]
},
"execution_count": 122,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# Create DataFrame of string values\n",
"\n",
"## Select columns of interest\n",
"df_merge_fbref_tm_capology_select = df_merge_fbref_tm_capology[cols_export]\n",
"\n",
"## Drop duplicate column (duplicate 'team', temporary solution, needs to be moved up)\n",
"df_merge_fbref_tm_capology_select = df_merge_fbref_tm_capology_select.loc[:, ~df_merge_fbref_tm_capology_select.columns.duplicated()]\n",
"\n",
"## Display DataFrame\n",
"df_merge_fbref_tm_capology_select.head()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"\n",
"\n",
"### 5.5. Drop Null Values"
]
},
{
"cell_type": "code",
"execution_count": 123,
"metadata": {},
"outputs": [],
"source": [
"df_merge_fbref_tm_capology_select_notnull = df_merge_fbref_tm_capology_select[df_merge_fbref_tm_capology_select['player_name_fbref'].notna()]"
]
},
{
"cell_type": "code",
"execution_count": 124,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"No. rows in DataFrame BEFORE dropping NULL values: 12753\n",
"No. rows AFTER dropping NULL values: 12735\n",
"----------\n",
"\n",
"Variance in rows before and after dropping NULLs: -18\n",
"\n"
]
}
],
"source": [
"print('No. rows in DataFrame BEFORE dropping NULL values: {}'.format(len(df_merge_fbref_tm_capology_select)))\n",
"print('No. rows AFTER dropping NULL values: {}'.format(len(df_merge_fbref_tm_capology_select_notnull)))\n",
"print('-'*10+'\\n')\n",
"print('Variance in rows before and after dropping NULLs: {}\\n'.format(len(df_merge_fbref_tm_capology_select_notnull) - len(df_merge_fbref_tm_capology_select)))"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"---\n",
"\n",
"\n",
"\n",
"## 6. Quality Assessment\n",
"Spot checks of the data with real world checks"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"##### Row Counts"
]
},
{
"cell_type": "code",
"execution_count": 125,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"No. rows in FBref DataFrame BEFORE join to any datasets: 13680\n",
"No. rows in FBref-TM-Capology DataFrame AFTER join: 12735\n",
"----------\n",
"\n",
"Variance in rows before and after join: -945\n",
"\n"
]
}
],
"source": [
"print('No. rows in FBref DataFrame BEFORE join to any datasets: {}'.format(len(df_fbref_players)))\n",
"print('No. rows in FBref-TM-Capology DataFrame AFTER join: {}'.format(len(df_merge_fbref_tm_capology_select_notnull)))\n",
"print('-'*10+'\\n')\n",
"print('Variance in rows before and after join: {}\\n'.format(len(df_merge_fbref_tm_capology_select_notnull) - len(df_fbref_players)))"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Some players are removed but at this stage, the dataset is fine to be used for the next stage, but this will be fixed later."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"##### Pique"
]
},
{
"cell_type": "code",
"execution_count": 126,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" player_name_fbref | \n",
" season | \n",
" url_fbref | \n",
" url_tm | \n",
" tm_id | \n",
" fbref_id | \n",
" Squad | \n",
" Team Country | \n",
" Comp | \n",
" Pos | \n",
" Primary Pos | \n",
" TmPos | \n",
" Position Grouped | \n",
" outfielder_goalkeeper | \n",
" Age | \n",
" age_when_joining | \n",
" dob | \n",
" height | \n",
" foot | \n",
" pob | \n",
" cob | \n",
" Nationality Cleaned | \n",
" citizenship | \n",
" second_citizenship | \n",
" market_value_gbp | \n",
" market_value_eur | \n",
" joined | \n",
" years_since_joining | \n",
" years_until_contract_expiry | \n",
" contract_expires | \n",
" contract_option | \n",
" on_loan_from | \n",
" on_loan_from_country | \n",
" loan_contract_expiry | \n",
" weekly_gross_base_salary_gbp | \n",
" annual_gross_base_salary_gbp | \n",
" adj_current_gross_base_salary_gbp | \n",
" estimated_gross_total_gbp | \n",
" current_contract_status | \n",
" current_contract_expiration | \n",
" current_contract_length | \n",
" MP | \n",
" Starts | \n",
" Min | \n",
" 90s | \n",
" Gls | \n",
" Ast | \n",
" G-PK | \n",
" PK | \n",
" PKatt | \n",
" CrdY | \n",
" CrdR | \n",
" G+A | \n",
" G+A-PK | \n",
" xG | \n",
" npxG | \n",
" xA | \n",
" npxG+xA | \n",
" xG+xA | \n",
" Sh | \n",
" SoT | \n",
" SoT% | \n",
" Sh/90 | \n",
" SoT/90 | \n",
" G/Sh | \n",
" G/SoT | \n",
" Dist | \n",
" FK | \n",
" npxG/Sh | \n",
" G-xG | \n",
" np:G-xG | \n",
" Cmp | \n",
" Att | \n",
" Cmp% | \n",
" TotDist | \n",
" PrgDist | \n",
" A-xA | \n",
" KP | \n",
" 1/3 | \n",
" PPA | \n",
" CrsPA | \n",
" Prog | \n",
" Live | \n",
" Dead | \n",
" TB | \n",
" Press | \n",
" Sw | \n",
" Crs | \n",
" CK | \n",
" In | \n",
" Out | \n",
" Str | \n",
" Ground | \n",
" Low | \n",
" High | \n",
" Left | \n",
" Right | \n",
" Head | \n",
" TI | \n",
" Other | \n",
" Off | \n",
" Int | \n",
" Blocks | \n",
" SCA | \n",
" SCA90 | \n",
" PassLive | \n",
" PassDead | \n",
" Drib | \n",
" Fld | \n",
" Def | \n",
" GCA | \n",
" GCA90 | \n",
" PassDead.1 | \n",
" Tkl | \n",
" TklW | \n",
" Def 3rd | \n",
" Mid 3rd | \n",
" Att 3rd | \n",
" Tkl% | \n",
" Past | \n",
" Succ | \n",
" % | \n",
" ShSv | \n",
" Pass | \n",
" Tkl+Int | \n",
" Clr | \n",
" Err | \n",
" Touches | \n",
" Def Pen | \n",
" Att Pen | \n",
" Succ% | \n",
" #Pl | \n",
" Megs | \n",
" Carries | \n",
" CPA | \n",
" Mis | \n",
" Dis | \n",
" Targ | \n",
" Rec | \n",
" Rec% | \n",
" Mn/MP | \n",
" Min% | \n",
" Mn/Start | \n",
" Compl | \n",
" Subs | \n",
" Mn/Sub | \n",
" unSub | \n",
" PPM | \n",
" onG | \n",
" onGA | \n",
" +/- | \n",
" +/-90 | \n",
" On-Off | \n",
" onxG | \n",
" onxGA | \n",
" xG+/- | \n",
" xG+/-90 | \n",
" 2CrdY | \n",
" Fls | \n",
" PKwon | \n",
" PKcon | \n",
" OG | \n",
" Recov | \n",
" Won | \n",
" Lost | \n",
" Won% | \n",
" GA | \n",
" GA90 | \n",
" SoTA | \n",
" Saves | \n",
" Save% | \n",
" W | \n",
" D | \n",
" L | \n",
" CS | \n",
" CS% | \n",
" PKA | \n",
" PKsv | \n",
" PKm | \n",
" PSxG | \n",
" PSxG/SoT | \n",
" PSxG+/- | \n",
" /90 | \n",
" Thr | \n",
" Launch% | \n",
" AvgLen | \n",
" Opp | \n",
" Stp | \n",
" Stp% | \n",
" #OPA | \n",
" #OPA/90 | \n",
" AvgDist | \n",
"
\n",
" \n",
" \n",
" \n",
" 9270.0 | \n",
" Gerard Piqué | \n",
" 2017/2018 | \n",
" https://fbref.com/en/players/adfc9123/Gerard-P... | \n",
" https://www.transfermarkt.com/gerard-pique/pro... | \n",
" 18944 | \n",
" adfc9123 | \n",
" Barcelona | \n",
" Spain | \n",
" La Liga | \n",
" DF | \n",
" DF | \n",
" Centre-Back | \n",
" Defender | \n",
" Outfielder | \n",
" 30 | \n",
" 21.0 | \n",
" 1987-02-02 | \n",
" 194.0 | \n",
" right | \n",
" Barcelona | \n",
" Spain | \n",
" Spain | \n",
" Spain | \n",
" NaN | \n",
" 36000000.0 | \n",
" 40000000.0 | \n",
" 2008-07-01 | \n",
" 13.0 | \n",
" 2.0 | \n",
" 2024-06-30 | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" 218534.0 | \n",
" 11363788.0 | \n",
" 11406357.0 | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" 30 | \n",
" 29 | \n",
" 2631.0 | \n",
" 29.2 | \n",
" 2 | \n",
" 0 | \n",
" 2 | \n",
" 0 | \n",
" 0 | \n",
" 8 | \n",
" 0 | \n",
" 0.07 | \n",
" 0.07 | \n",
" 3.0 | \n",
" 3.0 | \n",
" 0.9 | \n",
" 3.8 | \n",
" 0.13 | \n",
" 18.0 | \n",
" 5.0 | \n",
" 27.8 | \n",
" 0.62 | \n",
" 0.17 | \n",
" 0.11 | \n",
" 0.40 | \n",
" 9.2 | \n",
" 0.0 | \n",
" 0.16 | \n",
" -1.0 | \n",
" -1.0 | \n",
" 1606.0 | \n",
" 1810.0 | \n",
" 88.7 | \n",
" 34428.0 | \n",
" 10291.0 | \n",
" -0.9 | \n",
" 6.0 | \n",
" 123.0 | \n",
" 4.0 | \n",
" 0.0 | \n",
" 90.0 | \n",
" 1764.0 | \n",
" 46.0 | \n",
" 0.0 | \n",
" 263.0 | \n",
" 70.0 | \n",
" 2.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 1436.0 | \n",
" 120.0 | \n",
" 254.0 | \n",
" 95.0 | \n",
" 1552.0 | \n",
" 106.0 | \n",
" 10.0 | \n",
" 8.0 | \n",
" 1.0 | \n",
" 19.0 | \n",
" 11.0 | \n",
" 17.0 | \n",
" 0.58 | \n",
" 13.0 | \n",
" 0.0 | \n",
" 1.0 | \n",
" 2.0 | \n",
" 0.0 | \n",
" 1.0 | \n",
" 0.03 | \n",
" 0.0 | \n",
" 30.0 | \n",
" 22.0 | \n",
" 22.0 | \n",
" 8.0 | \n",
" 0.0 | \n",
" 34.3 | \n",
" 23.0 | \n",
" 78.0 | \n",
" 32.5 | \n",
" 2.0 | \n",
" 26.0 | \n",
" 62.0 | \n",
" 103.0 | \n",
" 5.0 | \n",
" 2075.0 | \n",
" 318.0 | \n",
" 28.0 | \n",
" 60.0 | \n",
" 6.0 | \n",
" 0.0 | \n",
" 1419.0 | \n",
" 0.0 | \n",
" 4.0 | \n",
" 7.0 | \n",
" 1385.0 | \n",
" 1341.0 | \n",
" 96.8 | \n",
" 88 | \n",
" 76.9 | \n",
" NaN | \n",
" 27.0 | \n",
" 1 | \n",
" NaN | \n",
" 6 | \n",
" 2.57 | \n",
" 81.0 | \n",
" 23.0 | \n",
" 58.0 | \n",
" 1.98 | \n",
" 0.62 | \n",
" 65.0 | \n",
" 30.0 | \n",
" 35.1 | \n",
" 1.20 | \n",
" 0.0 | \n",
" 23 | \n",
" 1.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 353.0 | \n",
" 54.0 | \n",
" 19.0 | \n",
" 74.0 | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
"
\n",
" \n",
" 9412.0 | \n",
" Gerard Piqué | \n",
" 2018/2019 | \n",
" https://fbref.com/en/players/adfc9123/Gerard-P... | \n",
" https://www.transfermarkt.com/gerard-pique/pro... | \n",
" 18944 | \n",
" adfc9123 | \n",
" Barcelona | \n",
" Spain | \n",
" La Liga | \n",
" DF | \n",
" DF | \n",
" Centre-Back | \n",
" Defender | \n",
" Outfielder | \n",
" 31 | \n",
" 21.0 | \n",
" 1987-02-02 | \n",
" 194.0 | \n",
" right | \n",
" Barcelona | \n",
" Spain | \n",
" Spain | \n",
" Spain | \n",
" NaN | \n",
" 36000000.0 | \n",
" 40000000.0 | \n",
" 2008-07-01 | \n",
" 13.0 | \n",
" 2.0 | \n",
" 2024-06-30 | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" 220629.0 | \n",
" 11472752.0 | \n",
" 11435733.0 | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" 35 | \n",
" 35 | \n",
" 3150.0 | \n",
" 35.0 | \n",
" 4 | \n",
" 2 | \n",
" 4 | \n",
" 0 | \n",
" 0 | \n",
" 6 | \n",
" 0 | \n",
" 0.17 | \n",
" 0.17 | \n",
" 3.7 | \n",
" 3.7 | \n",
" 1.5 | \n",
" 5.2 | \n",
" 0.15 | \n",
" 20.0 | \n",
" 11.0 | \n",
" 55.0 | \n",
" 0.57 | \n",
" 0.31 | \n",
" 0.20 | \n",
" 0.36 | \n",
" 7.3 | \n",
" 0.0 | \n",
" 0.19 | \n",
" 0.3 | \n",
" 0.3 | \n",
" 2230.0 | \n",
" 2429.0 | \n",
" 91.8 | \n",
" 46352.0 | \n",
" 14931.0 | \n",
" 0.5 | \n",
" 8.0 | \n",
" 156.0 | \n",
" 5.0 | \n",
" 0.0 | \n",
" 103.0 | \n",
" 2347.0 | \n",
" 82.0 | \n",
" 3.0 | \n",
" 296.0 | \n",
" 58.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 1937.0 | \n",
" 190.0 | \n",
" 302.0 | \n",
" 97.0 | \n",
" 2125.0 | \n",
" 126.0 | \n",
" 12.0 | \n",
" 13.0 | \n",
" 5.0 | \n",
" 14.0 | \n",
" 13.0 | \n",
" 25.0 | \n",
" 0.71 | \n",
" 17.0 | \n",
" 0.0 | \n",
" 2.0 | \n",
" 1.0 | \n",
" 1.0 | \n",
" 6.0 | \n",
" 0.17 | \n",
" 0.0 | \n",
" 45.0 | \n",
" 27.0 | \n",
" 29.0 | \n",
" 15.0 | \n",
" 1.0 | \n",
" 54.1 | \n",
" 17.0 | \n",
" 87.0 | \n",
" 31.9 | \n",
" 2.0 | \n",
" 37.0 | \n",
" 77.0 | \n",
" 156.0 | \n",
" 2.0 | \n",
" 2760.0 | \n",
" 385.0 | \n",
" 32.0 | \n",
" 76.2 | \n",
" 16.0 | \n",
" 0.0 | \n",
" 1915.0 | \n",
" 1.0 | \n",
" 11.0 | \n",
" 9.0 | \n",
" 1963.0 | \n",
" 1889.0 | \n",
" 96.2 | \n",
" 90 | \n",
" 92.1 | \n",
" 90.0 | \n",
" 35.0 | \n",
" 0 | \n",
" NaN | \n",
" 1 | \n",
" 2.43 | \n",
" 86.0 | \n",
" 30.0 | \n",
" 56.0 | \n",
" 1.60 | \n",
" 2.27 | \n",
" 69.9 | \n",
" 35.6 | \n",
" 34.2 | \n",
" 0.98 | \n",
" 0.0 | \n",
" 24 | \n",
" 1.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 473.0 | \n",
" 91.0 | \n",
" 33.0 | \n",
" 73.4 | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
"
\n",
" \n",
" 9539.0 | \n",
" Gerard Piqué | \n",
" 2019/2020 | \n",
" https://fbref.com/en/players/adfc9123/Gerard-P... | \n",
" https://www.transfermarkt.com/gerard-pique/pro... | \n",
" 18944 | \n",
" adfc9123 | \n",
" Barcelona | \n",
" Spain | \n",
" La Liga | \n",
" DF | \n",
" DF | \n",
" Centre-Back | \n",
" Defender | \n",
" Outfielder | \n",
" 32 | \n",
" 21.0 | \n",
" 1987-02-02 | \n",
" 194.0 | \n",
" right | \n",
" Barcelona | \n",
" Spain | \n",
" Spain | \n",
" Spain | \n",
" NaN | \n",
" 22500000.0 | \n",
" 25000000.0 | \n",
" 2008-07-01 | \n",
" 13.0 | \n",
" 2.0 | \n",
" 2024-06-30 | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" 432946.0 | \n",
" 22513250.0 | \n",
" 22513250.0 | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" 35 | \n",
" 35 | \n",
" 3092.0 | \n",
" 34.4 | \n",
" 1 | \n",
" 0 | \n",
" 1 | \n",
" 0 | \n",
" 0 | \n",
" 15 | \n",
" 0 | \n",
" 0.03 | \n",
" 0.03 | \n",
" 2.3 | \n",
" 2.3 | \n",
" 0.6 | \n",
" 2.9 | \n",
" 0.08 | \n",
" 15.0 | \n",
" 6.0 | \n",
" 40.0 | \n",
" 0.44 | \n",
" 0.17 | \n",
" 0.07 | \n",
" 0.17 | \n",
" 8.4 | \n",
" 1.0 | \n",
" 0.15 | \n",
" -1.3 | \n",
" -1.3 | \n",
" 2469.0 | \n",
" 2659.0 | \n",
" 92.9 | \n",
" 53752.0 | \n",
" 14795.0 | \n",
" -0.6 | \n",
" 5.0 | \n",
" 192.0 | \n",
" 3.0 | \n",
" 0.0 | \n",
" 116.0 | \n",
" 2548.0 | \n",
" 111.0 | \n",
" 2.0 | \n",
" 275.0 | \n",
" 79.0 | \n",
" 3.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 2121.0 | \n",
" 227.0 | \n",
" 311.0 | \n",
" 113.0 | \n",
" 2364.0 | \n",
" 99.0 | \n",
" 9.0 | \n",
" 13.0 | \n",
" 1.0 | \n",
" 14.0 | \n",
" 14.0 | \n",
" 12.0 | \n",
" 0.35 | \n",
" 12.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 1.0 | \n",
" 0.03 | \n",
" 0.0 | \n",
" 37.0 | \n",
" 22.0 | \n",
" 21.0 | \n",
" 16.0 | \n",
" 0.0 | \n",
" 48.3 | \n",
" 15.0 | \n",
" 83.0 | \n",
" 34.0 | \n",
" 2.0 | \n",
" 40.0 | \n",
" 73.0 | \n",
" 182.0 | \n",
" 1.0 | \n",
" 2996.0 | \n",
" 427.0 | \n",
" 28.0 | \n",
" 100.0 | \n",
" 9.0 | \n",
" 0.0 | \n",
" 2084.0 | \n",
" 0.0 | \n",
" 9.0 | \n",
" 7.0 | \n",
" 2211.0 | \n",
" 2171.0 | \n",
" 98.2 | \n",
" 88 | \n",
" 90.4 | \n",
" 88.0 | \n",
" 31.0 | \n",
" 0 | \n",
" NaN | \n",
" 0 | \n",
" 2.09 | \n",
" 71.0 | \n",
" 36.0 | \n",
" 35.0 | \n",
" 1.02 | \n",
" -2.55 | \n",
" 56.2 | \n",
" 33.8 | \n",
" 22.4 | \n",
" 0.65 | \n",
" 0.0 | \n",
" 32 | \n",
" 0.0 | \n",
" 2.0 | \n",
" 0.0 | \n",
" 391.0 | \n",
" 128.0 | \n",
" 40.0 | \n",
" 76.2 | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
"
\n",
" \n",
" 9623.0 | \n",
" Gerard Piqué | \n",
" 2020/2021 | \n",
" https://fbref.com/en/players/adfc9123/Gerard-P... | \n",
" https://www.transfermarkt.com/gerard-pique/pro... | \n",
" 18944 | \n",
" adfc9123 | \n",
" Barcelona | \n",
" Spain | \n",
" La Liga | \n",
" DF | \n",
" DF | \n",
" Centre-Back | \n",
" Defender | \n",
" Outfielder | \n",
" 33 | \n",
" 21.0 | \n",
" 1987-02-02 | \n",
" 194.0 | \n",
" right | \n",
" Barcelona | \n",
" Spain | \n",
" Spain | \n",
" Spain | \n",
" NaN | \n",
" 13500000.0 | \n",
" 15000000.0 | \n",
" 2008-07-01 | \n",
" 13.0 | \n",
" 2.0 | \n",
" 2024-06-30 | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" 22166.0 | \n",
" 1152678.0 | \n",
" 1152678.0 | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" 18 | \n",
" 18 | \n",
" 1481.0 | \n",
" 16.5 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 4 | \n",
" 0 | \n",
" 0.00 | \n",
" 0.00 | \n",
" 0.6 | \n",
" 0.6 | \n",
" 0.5 | \n",
" 1.1 | \n",
" 0.07 | \n",
" 8.0 | \n",
" 2.0 | \n",
" 25.0 | \n",
" 0.49 | \n",
" 0.12 | \n",
" 0.00 | \n",
" 0.00 | \n",
" 9.3 | \n",
" 0.0 | \n",
" 0.08 | \n",
" -0.6 | \n",
" -0.6 | \n",
" 1173.0 | \n",
" 1247.0 | \n",
" 94.1 | \n",
" 24743.0 | \n",
" 6069.0 | \n",
" -0.5 | \n",
" 2.0 | \n",
" 82.0 | \n",
" 1.0 | \n",
" 0.0 | \n",
" 35.0 | \n",
" 1204.0 | \n",
" 43.0 | \n",
" 0.0 | \n",
" 91.0 | \n",
" 32.0 | \n",
" 1.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 1033.0 | \n",
" 93.0 | \n",
" 121.0 | \n",
" 72.0 | \n",
" 1079.0 | \n",
" 45.0 | \n",
" 5.0 | \n",
" 10.0 | \n",
" 1.0 | \n",
" 6.0 | \n",
" 4.0 | \n",
" 5.0 | \n",
" 0.30 | \n",
" 5.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 1.0 | \n",
" 0.06 | \n",
" 0.0 | \n",
" 21.0 | \n",
" 13.0 | \n",
" 13.0 | \n",
" 7.0 | \n",
" 1.0 | \n",
" 64.3 | \n",
" 5.0 | \n",
" 46.0 | \n",
" 40.4 | \n",
" 0.0 | \n",
" 13.0 | \n",
" 36.0 | \n",
" 65.0 | \n",
" 0.0 | \n",
" 1368.0 | \n",
" 161.0 | \n",
" 14.0 | \n",
" 100.0 | \n",
" 1.0 | \n",
" 0.0 | \n",
" 961.0 | \n",
" 0.0 | \n",
" 2.0 | \n",
" 3.0 | \n",
" 1046.0 | \n",
" 1015.0 | \n",
" 97.0 | \n",
" 82 | \n",
" 43.3 | \n",
" 82.0 | \n",
" 13.0 | \n",
" 0 | \n",
" NaN | \n",
" 1 | \n",
" 1.53 | \n",
" 34.0 | \n",
" 22.0 | \n",
" 12.0 | \n",
" 0.73 | \n",
" -0.90 | \n",
" 32.9 | \n",
" 16.1 | \n",
" 16.8 | \n",
" 1.02 | \n",
" 0.0 | \n",
" 13 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 182.0 | \n",
" 66.0 | \n",
" 21.0 | \n",
" 75.9 | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
"
\n",
" \n",
" NaN | \n",
" Gerard Piqué | \n",
" 2021/2022 | \n",
" https://fbref.com/en/players/adfc9123/Gerard-P... | \n",
" https://www.transfermarkt.com/gerard-pique/pro... | \n",
" 18944 | \n",
" adfc9123 | \n",
" Barcelona | \n",
" Spain | \n",
" La Liga | \n",
" DF | \n",
" DF | \n",
" Centre-Back | \n",
" Defender | \n",
" Outfielder | \n",
" 34 | \n",
" 21.0 | \n",
" 1987-02-02 | \n",
" 194.0 | \n",
" right | \n",
" Barcelona | \n",
" Spain | \n",
" Spain | \n",
" Spain | \n",
" NaN | \n",
" 9000000.0 | \n",
" 10000000.0 | \n",
" 2008-07-01 | \n",
" 13.0 | \n",
" 2.0 | \n",
" 2024-06-30 | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" 2 | \n",
" 2 | \n",
" 120.0 | \n",
" 1.3 | \n",
" 1 | \n",
" 0 | \n",
" 1 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0.75 | \n",
" 0.75 | \n",
" 0.2 | \n",
" 0.2 | \n",
" 0.0 | \n",
" 0.2 | \n",
" 0.15 | \n",
" 1.0 | \n",
" 1.0 | \n",
" 100.0 | \n",
" 0.75 | \n",
" 0.75 | \n",
" 1.00 | \n",
" 1.00 | \n",
" 8.0 | \n",
" 0.0 | \n",
" 0.19 | \n",
" 0.8 | \n",
" 0.8 | \n",
" 94.0 | \n",
" 97.0 | \n",
" 96.9 | \n",
" 2030.0 | \n",
" 415.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 3.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 2.0 | \n",
" 89.0 | \n",
" 8.0 | \n",
" 0.0 | \n",
" 9.0 | \n",
" 5.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 85.0 | \n",
" 5.0 | \n",
" 7.0 | \n",
" 11.0 | \n",
" 80.0 | \n",
" 1.0 | \n",
" 0.0 | \n",
" 1.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 1.0 | \n",
" 0.75 | \n",
" 1.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.00 | \n",
" 0.0 | \n",
" 1.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 1.0 | \n",
" 0.0 | \n",
" NaN | \n",
" 0.0 | \n",
" 2.0 | \n",
" 25.0 | \n",
" 0.0 | \n",
" 2.0 | \n",
" 4.0 | \n",
" 10.0 | \n",
" 0.0 | \n",
" 112.0 | \n",
" 24.0 | \n",
" 1.0 | \n",
" NaN | \n",
" 0.0 | \n",
" 0.0 | \n",
" 69.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 82.0 | \n",
" 79.0 | \n",
" 96.3 | \n",
" 60 | \n",
" 44.4 | \n",
" 60.0 | \n",
" 1.0 | \n",
" 0 | \n",
" NaN | \n",
" 0 | \n",
" 2.00 | \n",
" 4.0 | \n",
" 2.0 | \n",
" 2.0 | \n",
" 1.50 | \n",
" 0.90 | \n",
" 3.3 | \n",
" 1.5 | \n",
" 1.8 | \n",
" 1.35 | \n",
" 0.0 | \n",
" 1 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 9.0 | \n",
" 5.0 | \n",
" 1.0 | \n",
" 83.3 | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" player_name_fbref season \\\n",
"9270.0 Gerard Piqué 2017/2018 \n",
"9412.0 Gerard Piqué 2018/2019 \n",
"9539.0 Gerard Piqué 2019/2020 \n",
"9623.0 Gerard Piqué 2020/2021 \n",
"NaN Gerard Piqué 2021/2022 \n",
"\n",
" url_fbref \\\n",
"9270.0 https://fbref.com/en/players/adfc9123/Gerard-P... \n",
"9412.0 https://fbref.com/en/players/adfc9123/Gerard-P... \n",
"9539.0 https://fbref.com/en/players/adfc9123/Gerard-P... \n",
"9623.0 https://fbref.com/en/players/adfc9123/Gerard-P... \n",
"NaN https://fbref.com/en/players/adfc9123/Gerard-P... \n",
"\n",
" url_tm tm_id fbref_id \\\n",
"9270.0 https://www.transfermarkt.com/gerard-pique/pro... 18944 adfc9123 \n",
"9412.0 https://www.transfermarkt.com/gerard-pique/pro... 18944 adfc9123 \n",
"9539.0 https://www.transfermarkt.com/gerard-pique/pro... 18944 adfc9123 \n",
"9623.0 https://www.transfermarkt.com/gerard-pique/pro... 18944 adfc9123 \n",
"NaN https://www.transfermarkt.com/gerard-pique/pro... 18944 adfc9123 \n",
"\n",
" Squad Team Country Comp Pos Primary Pos TmPos \\\n",
"9270.0 Barcelona Spain La Liga DF DF Centre-Back \n",
"9412.0 Barcelona Spain La Liga DF DF Centre-Back \n",
"9539.0 Barcelona Spain La Liga DF DF Centre-Back \n",
"9623.0 Barcelona Spain La Liga DF DF Centre-Back \n",
"NaN Barcelona Spain La Liga DF DF Centre-Back \n",
"\n",
" Position Grouped outfielder_goalkeeper Age age_when_joining \\\n",
"9270.0 Defender Outfielder 30 21.0 \n",
"9412.0 Defender Outfielder 31 21.0 \n",
"9539.0 Defender Outfielder 32 21.0 \n",
"9623.0 Defender Outfielder 33 21.0 \n",
"NaN Defender Outfielder 34 21.0 \n",
"\n",
" dob height foot pob cob Nationality Cleaned \\\n",
"9270.0 1987-02-02 194.0 right Barcelona Spain Spain \n",
"9412.0 1987-02-02 194.0 right Barcelona Spain Spain \n",
"9539.0 1987-02-02 194.0 right Barcelona Spain Spain \n",
"9623.0 1987-02-02 194.0 right Barcelona Spain Spain \n",
"NaN 1987-02-02 194.0 right Barcelona Spain Spain \n",
"\n",
" citizenship second_citizenship market_value_gbp market_value_eur \\\n",
"9270.0 Spain NaN 36000000.0 40000000.0 \n",
"9412.0 Spain NaN 36000000.0 40000000.0 \n",
"9539.0 Spain NaN 22500000.0 25000000.0 \n",
"9623.0 Spain NaN 13500000.0 15000000.0 \n",
"NaN Spain NaN 9000000.0 10000000.0 \n",
"\n",
" joined years_since_joining years_until_contract_expiry \\\n",
"9270.0 2008-07-01 13.0 2.0 \n",
"9412.0 2008-07-01 13.0 2.0 \n",
"9539.0 2008-07-01 13.0 2.0 \n",
"9623.0 2008-07-01 13.0 2.0 \n",
"NaN 2008-07-01 13.0 2.0 \n",
"\n",
" contract_expires contract_option on_loan_from on_loan_from_country \\\n",
"9270.0 2024-06-30 NaN NaN NaN \n",
"9412.0 2024-06-30 NaN NaN NaN \n",
"9539.0 2024-06-30 NaN NaN NaN \n",
"9623.0 2024-06-30 NaN NaN NaN \n",
"NaN 2024-06-30 NaN NaN NaN \n",
"\n",
" loan_contract_expiry weekly_gross_base_salary_gbp \\\n",
"9270.0 NaN 218534.0 \n",
"9412.0 NaN 220629.0 \n",
"9539.0 NaN 432946.0 \n",
"9623.0 NaN 22166.0 \n",
"NaN NaN NaN \n",
"\n",
" annual_gross_base_salary_gbp adj_current_gross_base_salary_gbp \\\n",
"9270.0 11363788.0 11406357.0 \n",
"9412.0 11472752.0 11435733.0 \n",
"9539.0 22513250.0 22513250.0 \n",
"9623.0 1152678.0 1152678.0 \n",
"NaN NaN NaN \n",
"\n",
" estimated_gross_total_gbp current_contract_status \\\n",
"9270.0 NaN NaN \n",
"9412.0 NaN NaN \n",
"9539.0 NaN NaN \n",
"9623.0 NaN NaN \n",
"NaN NaN NaN \n",
"\n",
" current_contract_expiration current_contract_length MP Starts \\\n",
"9270.0 NaN NaN 30 29 \n",
"9412.0 NaN NaN 35 35 \n",
"9539.0 NaN NaN 35 35 \n",
"9623.0 NaN NaN 18 18 \n",
"NaN NaN NaN 2 2 \n",
"\n",
" Min 90s Gls Ast G-PK PK PKatt CrdY CrdR G+A G+A-PK \\\n",
"9270.0 2631.0 29.2 2 0 2 0 0 8 0 0.07 0.07 \n",
"9412.0 3150.0 35.0 4 2 4 0 0 6 0 0.17 0.17 \n",
"9539.0 3092.0 34.4 1 0 1 0 0 15 0 0.03 0.03 \n",
"9623.0 1481.0 16.5 0 0 0 0 0 4 0 0.00 0.00 \n",
"NaN 120.0 1.3 1 0 1 0 0 0 0 0.75 0.75 \n",
"\n",
" xG npxG xA npxG+xA xG+xA Sh SoT SoT% Sh/90 SoT/90 \\\n",
"9270.0 3.0 3.0 0.9 3.8 0.13 18.0 5.0 27.8 0.62 0.17 \n",
"9412.0 3.7 3.7 1.5 5.2 0.15 20.0 11.0 55.0 0.57 0.31 \n",
"9539.0 2.3 2.3 0.6 2.9 0.08 15.0 6.0 40.0 0.44 0.17 \n",
"9623.0 0.6 0.6 0.5 1.1 0.07 8.0 2.0 25.0 0.49 0.12 \n",
"NaN 0.2 0.2 0.0 0.2 0.15 1.0 1.0 100.0 0.75 0.75 \n",
"\n",
" G/Sh G/SoT Dist FK npxG/Sh G-xG np:G-xG Cmp Att Cmp% \\\n",
"9270.0 0.11 0.40 9.2 0.0 0.16 -1.0 -1.0 1606.0 1810.0 88.7 \n",
"9412.0 0.20 0.36 7.3 0.0 0.19 0.3 0.3 2230.0 2429.0 91.8 \n",
"9539.0 0.07 0.17 8.4 1.0 0.15 -1.3 -1.3 2469.0 2659.0 92.9 \n",
"9623.0 0.00 0.00 9.3 0.0 0.08 -0.6 -0.6 1173.0 1247.0 94.1 \n",
"NaN 1.00 1.00 8.0 0.0 0.19 0.8 0.8 94.0 97.0 96.9 \n",
"\n",
" TotDist PrgDist A-xA KP 1/3 PPA CrsPA Prog Live Dead \\\n",
"9270.0 34428.0 10291.0 -0.9 6.0 123.0 4.0 0.0 90.0 1764.0 46.0 \n",
"9412.0 46352.0 14931.0 0.5 8.0 156.0 5.0 0.0 103.0 2347.0 82.0 \n",
"9539.0 53752.0 14795.0 -0.6 5.0 192.0 3.0 0.0 116.0 2548.0 111.0 \n",
"9623.0 24743.0 6069.0 -0.5 2.0 82.0 1.0 0.0 35.0 1204.0 43.0 \n",
"NaN 2030.0 415.0 0.0 0.0 3.0 0.0 0.0 2.0 89.0 8.0 \n",
"\n",
" TB Press Sw Crs CK In Out Str Ground Low High \\\n",
"9270.0 0.0 263.0 70.0 2.0 0.0 0.0 0.0 0.0 1436.0 120.0 254.0 \n",
"9412.0 3.0 296.0 58.0 0.0 0.0 0.0 0.0 0.0 1937.0 190.0 302.0 \n",
"9539.0 2.0 275.0 79.0 3.0 0.0 0.0 0.0 0.0 2121.0 227.0 311.0 \n",
"9623.0 0.0 91.0 32.0 1.0 0.0 0.0 0.0 0.0 1033.0 93.0 121.0 \n",
"NaN 0.0 9.0 5.0 0.0 0.0 0.0 0.0 0.0 85.0 5.0 7.0 \n",
"\n",
" Left Right Head TI Other Off Int Blocks SCA SCA90 \\\n",
"9270.0 95.0 1552.0 106.0 10.0 8.0 1.0 19.0 11.0 17.0 0.58 \n",
"9412.0 97.0 2125.0 126.0 12.0 13.0 5.0 14.0 13.0 25.0 0.71 \n",
"9539.0 113.0 2364.0 99.0 9.0 13.0 1.0 14.0 14.0 12.0 0.35 \n",
"9623.0 72.0 1079.0 45.0 5.0 10.0 1.0 6.0 4.0 5.0 0.30 \n",
"NaN 11.0 80.0 1.0 0.0 1.0 0.0 0.0 0.0 1.0 0.75 \n",
"\n",
" PassLive PassDead Drib Fld Def GCA GCA90 PassDead.1 Tkl \\\n",
"9270.0 13.0 0.0 1.0 2.0 0.0 1.0 0.03 0.0 30.0 \n",
"9412.0 17.0 0.0 2.0 1.0 1.0 6.0 0.17 0.0 45.0 \n",
"9539.0 12.0 0.0 0.0 0.0 0.0 1.0 0.03 0.0 37.0 \n",
"9623.0 5.0 0.0 0.0 0.0 0.0 1.0 0.06 0.0 21.0 \n",
"NaN 1.0 0.0 0.0 0.0 0.0 0.0 0.00 0.0 1.0 \n",
"\n",
" TklW Def 3rd Mid 3rd Att 3rd Tkl% Past Succ % ShSv Pass \\\n",
"9270.0 22.0 22.0 8.0 0.0 34.3 23.0 78.0 32.5 2.0 26.0 \n",
"9412.0 27.0 29.0 15.0 1.0 54.1 17.0 87.0 31.9 2.0 37.0 \n",
"9539.0 22.0 21.0 16.0 0.0 48.3 15.0 83.0 34.0 2.0 40.0 \n",
"9623.0 13.0 13.0 7.0 1.0 64.3 5.0 46.0 40.4 0.0 13.0 \n",
"NaN 0.0 0.0 1.0 0.0 NaN 0.0 2.0 25.0 0.0 2.0 \n",
"\n",
" Tkl+Int Clr Err Touches Def Pen Att Pen Succ% #Pl Megs \\\n",
"9270.0 62.0 103.0 5.0 2075.0 318.0 28.0 60.0 6.0 0.0 \n",
"9412.0 77.0 156.0 2.0 2760.0 385.0 32.0 76.2 16.0 0.0 \n",
"9539.0 73.0 182.0 1.0 2996.0 427.0 28.0 100.0 9.0 0.0 \n",
"9623.0 36.0 65.0 0.0 1368.0 161.0 14.0 100.0 1.0 0.0 \n",
"NaN 4.0 10.0 0.0 112.0 24.0 1.0 NaN 0.0 0.0 \n",
"\n",
" Carries CPA Mis Dis Targ Rec Rec% Mn/MP Min% Mn/Start \\\n",
"9270.0 1419.0 0.0 4.0 7.0 1385.0 1341.0 96.8 88 76.9 NaN \n",
"9412.0 1915.0 1.0 11.0 9.0 1963.0 1889.0 96.2 90 92.1 90.0 \n",
"9539.0 2084.0 0.0 9.0 7.0 2211.0 2171.0 98.2 88 90.4 88.0 \n",
"9623.0 961.0 0.0 2.0 3.0 1046.0 1015.0 97.0 82 43.3 82.0 \n",
"NaN 69.0 0.0 0.0 0.0 82.0 79.0 96.3 60 44.4 60.0 \n",
"\n",
" Compl Subs Mn/Sub unSub PPM onG onGA +/- +/-90 On-Off \\\n",
"9270.0 27.0 1 NaN 6 2.57 81.0 23.0 58.0 1.98 0.62 \n",
"9412.0 35.0 0 NaN 1 2.43 86.0 30.0 56.0 1.60 2.27 \n",
"9539.0 31.0 0 NaN 0 2.09 71.0 36.0 35.0 1.02 -2.55 \n",
"9623.0 13.0 0 NaN 1 1.53 34.0 22.0 12.0 0.73 -0.90 \n",
"NaN 1.0 0 NaN 0 2.00 4.0 2.0 2.0 1.50 0.90 \n",
"\n",
" onxG onxGA xG+/- xG+/-90 2CrdY Fls PKwon PKcon OG Recov \\\n",
"9270.0 65.0 30.0 35.1 1.20 0.0 23 1.0 0.0 0.0 353.0 \n",
"9412.0 69.9 35.6 34.2 0.98 0.0 24 1.0 0.0 0.0 473.0 \n",
"9539.0 56.2 33.8 22.4 0.65 0.0 32 0.0 2.0 0.0 391.0 \n",
"9623.0 32.9 16.1 16.8 1.02 0.0 13 0.0 0.0 0.0 182.0 \n",
"NaN 3.3 1.5 1.8 1.35 0.0 1 0.0 0.0 0.0 9.0 \n",
"\n",
" Won Lost Won% GA GA90 SoTA Saves Save% W D L CS CS% \\\n",
"9270.0 54.0 19.0 74.0 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN \n",
"9412.0 91.0 33.0 73.4 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN \n",
"9539.0 128.0 40.0 76.2 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN \n",
"9623.0 66.0 21.0 75.9 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN \n",
"NaN 5.0 1.0 83.3 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN \n",
"\n",
" PKA PKsv PKm PSxG PSxG/SoT PSxG+/- /90 Thr Launch% AvgLen \\\n",
"9270.0 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN \n",
"9412.0 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN \n",
"9539.0 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN \n",
"9623.0 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN \n",
"NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN \n",
"\n",
" Opp Stp Stp% #OPA #OPA/90 AvgDist \n",
"9270.0 NaN NaN NaN NaN NaN NaN \n",
"9412.0 NaN NaN NaN NaN NaN NaN \n",
"9539.0 NaN NaN NaN NaN NaN NaN \n",
"9623.0 NaN NaN NaN NaN NaN NaN \n",
"NaN NaN NaN NaN NaN NaN NaN "
]
},
"execution_count": 126,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"df_merge_fbref_tm_capology_select_notnull[df_merge_fbref_tm_capology_select_notnull['player_name_fbref'].str.contains('Gerard Piqu', na=False)]"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"---\n",
"\n",
"\n",
"\n",
"## 7. Export Dataset\n",
"Export the two datasets - Golden ID and the Final Player Valuation Dataset"
]
},
{
"cell_type": "code",
"execution_count": 127,
"metadata": {},
"outputs": [],
"source": [
"# Export DataFrame as a CSV file\n",
"df_merge_fbref_tm_capology_select_notnull.to_csv(data_dir + f'/export/' + f'unified_fbref_tm_capology.csv', index=None, header=True)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## 8. Summary\n",
"This notebook joins the scraped and engineered player datasets including aggregated player performance data from [FBref](https://fbref.com/en/) (provided by [StatsBomb](https://statsbomb.com/)), [TransferMarkt](https://www.transfermarkt.co.uk/) estimated player values and [recorded transfer](https://github.com/ewenme/transfers) datasets, and player salaries dataset from [Capology](https://www.capology.com/), through the [record-linkage](https://pypi.org/project/recordlinkage/) library, to create one, unified source of information, that can be used for for further analysis of players performance statistics and financial valuations."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## 9. Next Steps\n",
"These final datasets are now ready for any further analysis including modeling and data visualisation."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## 10. References\n",
"\n",
"#### Fuzzy Matching through Record Linkage\n",
"* Record Linkage Wiki: https://en.wikipedia.org/wiki/Record_linkage\n",
"* [Official Record Linkage documentation web](https://recordlinkage.readthedocs.io/en/latest/about.html)\n",
"* [Official Record Linkage documentation PDF](https://readthedocs.org/projects/recordlinkage/downloads/pdf/stable/)\n",
" - [0. Preprocessing](https://recordlinkage.readthedocs.io/en/latest/ref-preprocessing.html)\n",
" - [1. Indexing](https://recordlinkage.readthedocs.io/en/latest/ref-index.html)\n",
" - [2. Comparing](https://recordlinkage.readthedocs.io/en/latest/ref-compare.html)\n",
" - [3. Classification](https://recordlinkage.readthedocs.io/en/latest/ref-classifiers.html)\n",
" - [4. Evaluation](https://recordlinkage.readthedocs.io/en/latest/ref-evaluation.html)\n",
"* Evaluation:https://recordlinkage.readthedocs.io/en/latest/ref-evaluation.html\n",
"* Python Tools for Record Linking and Fuzzy Matching by Chris Moffitt: https://pbpython.com/record-linking.html\n",
"* [Python Tools for Record Linking and Fuzzy Matching](https://pbpython.com/record-linking.html). For more information for record linking and fuzzy matching.\n",
"* [Python Package Index (PyPI) Jellyfish library](https://pypi.org/project/jellyfish/)."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"---\n",
"\n",
"***Visit my website [eddwebster.com](https://www.eddwebster.com) or my [GitHub Repository](https://github.com/eddwebster) for more projects. If you'd like to get in contact, my Twitter handle is [@eddwebster](http://www.twitter.com/eddwebster) and my email is: edd.j.webster@gmail.com.***"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"[Back to the top](#top)"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"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.7.6"
},
"varInspector": {
"cols": {
"lenName": 16,
"lenType": 16,
"lenVar": 40
},
"kernels_config": {
"python": {
"delete_cmd_postfix": "",
"delete_cmd_prefix": "del ",
"library": "var_list.py",
"varRefreshCmd": "print(var_dic_list())"
},
"r": {
"delete_cmd_postfix": ") ",
"delete_cmd_prefix": "rm(",
"library": "var_list.r",
"varRefreshCmd": "cat(var_dic_list()) "
}
},
"oldHeight": 642,
"position": {
"height": "664px",
"left": "1119px",
"right": "20px",
"top": "-7px",
"width": "489px"
},
"types_to_exclude": [
"module",
"function",
"builtin_function_or_method",
"instance",
"_Feature"
],
"varInspector_section_display": "block",
"window_display": false
}
},
"nbformat": 4,
"nbformat_minor": 2
}