{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Data Engineering of StatsBomb Data\n", "##### Notebook to engineer previous parsed JSON data from the [StatsBomb Open Data GitHub repository](https://github.com/statsbomb/open-data)\n", "\n", "### By [Edd Webster](https://www.twitter.com/eddwebster)\n", "Notebook first written: 10/11/2020
\n", "Notebook last updated: 18/02/2021\n", "\n", "![title](../../img/logos/stats-bomb-logo.png)\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", "## Introduction\n", "This notebook parses pubicly available [StatsBomb](https://statsbomb.com/) Event data, using [pandas](http://pandas.pydata.org/) for data manipulation through DataFrames.\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/edd_webster/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/3_data_engineering/StatsBomb%20Data%20Engineering.ipynb)." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "___\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. [Download the Data](#section3.2)
\n", " 3. [Read in the Datasets](#section3.3)
\n", " 4. [Join the Datasets](#section3.4)
\n", " 5. [Initial Data Handling](#section3.5)
\n", "4. [Data Engineering](#section4)
\n", " 1. [Sort the DataFrame](#section4.1)
\n", " 2. [Create New Features](#section4.2)
\n", " 3. [Subset DataFrame](#section4.3)
\n", "5. [Export DataFrame](#section5)
\n", "6. [Summary](#section6)
\n", "7. [Next Steps](#section7)
\n", "8. [Bibliography](#section8)
" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "___\n", "\n", "## 1. Notebook Dependencies" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "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", "* `tqdm` for a clean progress bar;\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": 3, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Setup Complete\n" ] } ], "source": [ "%load_ext autoreload\n", "%autoreload 2\n", "\n", "# 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 # version 1.0.3\n", "import os # used to read the csv filenames\n", "import re\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", "import codecs\n", "from pandas.io.json import json_normalize\n", "\n", "# Football Libraries\n", "from FCPython import createPitch\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 # visually display missing data\n", "\n", "# Progress Bar\n", "from tqdm import tqdm # a clean progress bar library\n", "\n", "# Display in Jupyter\n", "from IPython.display import Image, Video, 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": 4, "metadata": { "scrolled": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Python: 3.7.6\n", "NumPy: 1.18.0\n", "pandas: 1.2.0\n", "matplotlib: 3.3.2\n", "Seaborn: 0.11.1\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__))\n", "print('Seaborn: {}'.format(sns.__version__))" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Defined Variables" ] }, { "cell_type": "code", "execution_count": 5, "metadata": {}, "outputs": [], "source": [ "# Define today's date\n", "today = datetime.datetime.now().strftime('%d/%m/%Y').replace('/', '')" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Defined Filepaths" ] }, { "cell_type": "code", "execution_count": 6, "metadata": {}, "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_sb = os.path.join(base_dir, 'data', 'sb')\n", "scripts_dir = os.path.join(base_dir, 'scripts')\n", "scripts_dir_sb = os.path.join(base_dir, 'scripts', 'sb')\n", "data_dir_understat = os.path.join(base_dir, 'data', 'understat')\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": [ "### Custom Functions" ] }, { "cell_type": "code", "execution_count": 7, "metadata": {}, "outputs": [], "source": [ "# Define custom function to read JSON files that also handles the encoding of special characters e.g. accents in names of players and teams\n", "def read_json_file(filename):\n", " with open(filename, 'rb') as json_file:\n", " return BytesIO(json_file.read()).getvalue().decode('unicode_escape')\n", " \n", "# Define custom function to flatten pandas DataFrames with nested JSON columns. Source: https://stackoverflow.com/questions/39899005/how-to-flatten-a-pandas-dataframe-with-some-columns-as-json\n", "def flatten_nested_json_df(df):\n", "\n", " df = df.reset_index()\n", "\n", " print(f\"original shape: {df.shape}\")\n", " print(f\"original columns: {df.columns}\")\n", "\n", "\n", " # search for columns to explode/flatten\n", " s = (df.applymap(type) == list).all()\n", " list_columns = s[s].index.tolist()\n", "\n", " s = (df.applymap(type) == dict).all()\n", " dict_columns = s[s].index.tolist()\n", "\n", " print(f\"lists: {list_columns}, dicts: {dict_columns}\")\n", " while len(list_columns) > 0 or len(dict_columns) > 0:\n", " new_columns = []\n", "\n", " for col in dict_columns:\n", " print(f\"flattening: {col}\")\n", " # explode dictionaries horizontally, adding new columns\n", " horiz_exploded = pd.json_normalize(df[col]).add_prefix(f'{col}.')\n", " horiz_exploded.index = df.index\n", " df = pd.concat([df, horiz_exploded], axis=1).drop(columns=[col])\n", " new_columns.extend(horiz_exploded.columns) # inplace\n", "\n", " for col in list_columns:\n", " print(f\"exploding: {col}\")\n", " # explode lists vertically, adding new columns\n", " df = df.drop(columns=[col]).join(df[col].explode().to_frame())\n", " new_columns.append(col)\n", "\n", " # check if there are still dict o list fields to flatten\n", " s = (df[new_columns].applymap(type) == list).all()\n", " list_columns = s[s].index.tolist()\n", "\n", " s = (df[new_columns].applymap(type) == dict).all()\n", " dict_columns = s[s].index.tolist()\n", "\n", " print(f\"lists: {list_columns}, dicts: {dict_columns}\")\n", "\n", " print(f\"final shape: {df.shape}\")\n", " print(f\"final columns: {df.columns}\")\n", " return df" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Notebook Settings" ] }, { "cell_type": "code", "execution_count": 8, "metadata": {}, "outputs": [], "source": [ "pd.set_option('display.max_columns', None)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "---\n", "\n", "" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## 2. Project Brief\n", "This Jupyter notebook explores how to parse publicly available Event data from [StatsBomb](https://statsbomb.com/) using [pandas](http://pandas.pydata.org/) for data manipulation through DataFrames.\n", "\n", "\n", "The combined event data roduced in this notebook is exported to CSV. This data can be further analysed in Python, joined to other datasets, or explored using Tableau, PowerBI, Microsoft Excel.\n", "\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", "## 3. Data Sources" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### 3.1. Introduction" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "#### 3.1.1. About StatsBomb\n", "[StatsBomb](https://statsbomb.com/) are a football analytics and data company.\n", "\n", "![title](../../img/logos/stats-bomb-logo.png)\n", "\n", "Before conducting our EDA, the data needs to be imported as a DataFrame in the Data Sources section [Section 3](#section3) and Cleaned in the Data Engineering section [Section 4](#section4).\n", "\n", "We'll be using the [pandas](http://pandas.pydata.org/) library to import our data to this workbook as a DataFrame." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "#### 3.1.2. About the StatsBomb publicly available data\n", "The complete data set contains:\n", "- 7 competitions;\n", "- 879 matches;\n", "- 3,161,917 events; and\n", "- z players.\n", "\n", "The datasets we will be using are:\n", "- competitions;\n", "- matches;\n", "- events;\n", "- lineups; and\n", "- tactics;\n", "\n", "The data needs to be imported as a DataFrame in the Data Sources section [Section 3](#section3) and cleaned in the Data Engineering section [Section 4](#section4)." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### 3.2. Read in Data" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "#### 3.2.1. Data dictionary" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] }, { "cell_type": "markdown", "metadata": {}, "source": [ "#### 3.2.2. Read in data" ] }, { "cell_type": "code", "execution_count": 9, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "['../../data/sb/combined/raw/csv']\n" ] } ], "source": [ "# Show files in directory\n", "print(glob.glob(os.path.join(data_dir_sb, 'combined', 'raw', 'csv')))" ] }, { "cell_type": "code", "execution_count": 10, "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "/opt/anaconda3/lib/python3.7/site-packages/IPython/core/interactiveshell.py:3147: DtypeWarning: Columns (18,40,42,50,51,53,54,77,78,79,80,81,84,85,86,87,89,91,93,96,97,98,99,100,101,102,103,104,106,107,108,109,110,111,112,113,114,116,118,120,121,122,123,125,127,128,129,130,131,132,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,159,160,165,169,170,176,177,190) have mixed types.Specify dtype option on import or set low_memory=False.\n", " interactivity=interactivity, compiler=compiler, result=result)\n" ] } ], "source": [ "# Read CSV file as a pandas DataFrame\n", "df_sb = pd.read_csv(os.path.join(data_dir_sb, 'combined', 'raw', 'csv', 'combined.csv'))" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### 3.3. Initial Data Handling" ] }, { "cell_type": "code", "execution_count": 11, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
level_0idindex_xperiodtimestampminutesecondpossessiondurationtype_idtype_namepossession_team_idpossession_team_nameplay_pattern_idplay_pattern_nameteam_idteam_nametactics_formationtactics_lineuprelated_eventslocationplayer_idplayer_nameposition_idposition_namepass_recipient_idpass_recipient_namepass_lengthpass_anglepass_height_idpass_height_namepass_end_locationpass_type_idpass_type_namepass_body_part_idpass_body_part_namecarry_end_locationpass_outcome_idpass_outcome_nameunder_pressureclearance_headclearance_body_part_idclearance_body_part_namecounterpressduel_outcome_idduel_outcome_nameduel_type_idduel_type_nameball_receipt_outcome_idball_receipt_outcome_nameoutclearance_left_footpass_switchoff_cameraclearance_aerial_wondribble_outcome_iddribble_outcome_namepass_crosspass_assisted_shot_idpass_shot_assistshot_statsbomb_xgshot_end_locationshot_key_pass_idshot_body_part_idshot_body_part_nameshot_technique_idshot_technique_nameshot_outcome_idshot_outcome_nameshot_type_idshot_type_nameshot_freeze_framegoalkeeper_end_locationgoalkeeper_type_idgoalkeeper_type_namegoalkeeper_position_idgoalkeeper_position_nameball_recovery_recovery_failurefoul_committed_advantagefoul_won_advantagedribble_overrunclearance_right_footinterception_outcome_idinterception_outcome_namefoul_won_defensivepass_aerial_wonpass_deflectedpass_inswingingpass_technique_idpass_technique_namegoalkeeper_body_part_idgoalkeeper_body_part_namegoalkeeper_technique_idgoalkeeper_technique_namegoalkeeper_outcome_idgoalkeeper_outcome_namepass_outswingingpass_goal_assistshot_one_on_onemiscontrol_aerial_wonshot_deflectedblock_deflectionshot_first_timeblock_offensivepass_through_ballfoul_committed_card_idfoul_committed_card_namefoul_committed_penaltyfoul_won_penaltydribble_nutmegpass_miscommunicationpass_no_touchfoul_committed_offensivegoalkeeper_lost_outpass_straightsubstitution_outcome_idsubstitution_outcome_namesubstitution_replacement_idsubstitution_replacement_namematch_idgoalkeeper_punched_outshot_aerial_wonpass_cut_backgoalkeeper_success_in_play50_50_outcome_id50_50_outcome_namefoul_committed_type_idfoul_committed_type_nameball_recovery_offensiveshot_saved_off_targetgoalkeeper_shot_saved_off_targetshot_open_goaldribble_no_touchbad_behaviour_card_idbad_behaviour_card_namehalf_start_late_video_startblock_save_blockshot_follows_dribbleclearance_othergoalkeeper_shot_saved_to_postshot_redirectinjury_stoppage_in_chainshot_saved_to_postgoalkeeper_success_outgoalkeeper_lost_in_playhalf_end_early_video_endplayer_off_permanentgoalkeeper_saved_to_postpass_backheelshot_kick_offgoalkeeper_penalty_saved_to_postindex_ymatch_datekick_offhome_scoreaway_scorematch_statuslast_updatedmatch_weekrefereestadiumcompetition_competition_idcompetition_country_namecompetition_competition_nameseason_season_idseason_season_namehome_team_home_team_idhome_team_home_team_namehome_team_home_team_genderhome_team_home_team_grouphome_team_managershome_team_country_idhome_team_country_nameaway_team_away_team_idaway_team_away_team_nameaway_team_away_team_genderaway_team_away_team_groupaway_team_managersaway_team_country_idaway_team_country_namemetadata_data_versionmetadata_shot_fidelity_versionmetadata_xy_fidelity_versioncompetition_stage_idcompetition_stage_namecompetition_idseason_idcountry_namecompetition_namecompetition_genderseason_namematch_updatedmatch_available
0041e0ff39-da7c-451a-8f08-82d3a9b369f21100:00:00.0000010.00000035Starting XI1Arsenal1Regular Play1Arsenal442.0[{'player': {'id': 20015, 'name': 'Jens Lehman...NaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaN3749257NaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaN02004-05-1516:00:00.00021available2020-08-30T08:12:14.57903738{'id': 1279, 'name': 'None'}NaN2EnglandPremier League442003/20041ArsenalmaleNaN[{'id': 577, 'name': 'Arsène Wenger', 'nicknam...68England22Leicester CitymaleNaN[{'id': 2974, 'name': 'Micky Adams', 'nickname...68England1.1.02.02.01Regular Season244EnglandPremier Leaguemale2003/20042020-08-31T20:40:28.9696352020-08-31T20:40:28.969635
11d8c32d32-494b-4ae1-bb0c-d2f738952e3c2100:00:00.0000010.00000035Starting XI1Arsenal1Regular Play22Leicester City442.0[{'player': {'id': 40236, 'name': 'Ian Walker'...NaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaN3749257NaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaN02004-05-1516:00:00.00021available2020-08-30T08:12:14.57903738{'id': 1279, 'name': 'None'}NaN2EnglandPremier League442003/20041ArsenalmaleNaN[{'id': 577, 'name': 'Arsène Wenger', 'nicknam...68England22Leicester CitymaleNaN[{'id': 2974, 'name': 'Micky Adams', 'nickname...68England1.1.02.02.01Regular Season244EnglandPremier Leaguemale2003/20042020-08-31T20:40:28.9696352020-08-31T20:40:28.969635
226e678cba-67c3-4e9a-acca-78ab69b7d68b3100:00:00.0000010.00000018Half Start1Arsenal1Regular Play1ArsenalNaNNaN['b31e69b0-a75e-4721-b023-c06094ddcfa0']NaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaN3749257NaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaN02004-05-1516:00:00.00021available2020-08-30T08:12:14.57903738{'id': 1279, 'name': 'None'}NaN2EnglandPremier League442003/20041ArsenalmaleNaN[{'id': 577, 'name': 'Arsène Wenger', 'nicknam...68England22Leicester CitymaleNaN[{'id': 2974, 'name': 'Micky Adams', 'nickname...68England1.1.02.02.01Regular Season244EnglandPremier Leaguemale2003/20042020-08-31T20:40:28.9696352020-08-31T20:40:28.969635
33b31e69b0-a75e-4721-b023-c06094ddcfa04100:00:00.0000010.00000018Half Start1Arsenal1Regular Play22Leicester CityNaNNaN['6e678cba-67c3-4e9a-acca-78ab69b7d68b']NaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaN3749257NaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaN02004-05-1516:00:00.00021available2020-08-30T08:12:14.57903738{'id': 1279, 'name': 'None'}NaN2EnglandPremier League442003/20041ArsenalmaleNaN[{'id': 577, 'name': 'Arsène Wenger', 'nicknam...68England22Leicester CitymaleNaN[{'id': 2974, 'name': 'Micky Adams', 'nickname...68England1.1.02.02.01Regular Season244EnglandPremier Leaguemale2003/20042020-08-31T20:40:28.9696352020-08-31T20:40:28.969635
440613063a-1cd4-4a18-83a7-9722be2d9f405100:00:01.0360120.23829230Pass22Leicester City9From Kick Off22Leicester CityNaNNaN['500a6fd9-61c7-4b61-bb3c-8e6605c24084'][61.0, 40.1]40240.0Paul Dickov24.0Left Center Forward40242.0Marcus Bent1.104536-1.6614561.0Ground Pass[60.9, 39.0]65.0Kick Off38.0Left FootNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaN3749257NaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaN02004-05-1516:00:00.00021available2020-08-30T08:12:14.57903738{'id': 1279, 'name': 'None'}NaN2EnglandPremier League442003/20041ArsenalmaleNaN[{'id': 577, 'name': 'Arsène Wenger', 'nicknam...68England22Leicester CitymaleNaN[{'id': 2974, 'name': 'Micky Adams', 'nickname...68England1.1.02.02.01Regular Season244EnglandPremier Leaguemale2003/20042020-08-31T20:40:28.9696352020-08-31T20:40:28.969635
\n", "
" ], "text/plain": [ " level_0 id index_x period \\\n", "0 0 41e0ff39-da7c-451a-8f08-82d3a9b369f2 1 1 \n", "1 1 d8c32d32-494b-4ae1-bb0c-d2f738952e3c 2 1 \n", "2 2 6e678cba-67c3-4e9a-acca-78ab69b7d68b 3 1 \n", "3 3 b31e69b0-a75e-4721-b023-c06094ddcfa0 4 1 \n", "4 4 0613063a-1cd4-4a18-83a7-9722be2d9f40 5 1 \n", "\n", " timestamp minute second possession duration type_id type_name \\\n", "0 00:00:00.000 0 0 1 0.000000 35 Starting XI \n", "1 00:00:00.000 0 0 1 0.000000 35 Starting XI \n", "2 00:00:00.000 0 0 1 0.000000 18 Half Start \n", "3 00:00:00.000 0 0 1 0.000000 18 Half Start \n", "4 00:00:01.036 0 1 2 0.238292 30 Pass \n", "\n", " possession_team_id possession_team_name play_pattern_id play_pattern_name \\\n", "0 1 Arsenal 1 Regular Play \n", "1 1 Arsenal 1 Regular Play \n", "2 1 Arsenal 1 Regular Play \n", "3 1 Arsenal 1 Regular Play \n", "4 22 Leicester City 9 From Kick Off \n", "\n", " team_id team_name tactics_formation \\\n", "0 1 Arsenal 442.0 \n", "1 22 Leicester City 442.0 \n", "2 1 Arsenal NaN \n", "3 22 Leicester City NaN \n", "4 22 Leicester City NaN \n", "\n", " tactics_lineup \\\n", "0 [{'player': {'id': 20015, 'name': 'Jens Lehman... \n", "1 [{'player': {'id': 40236, 'name': 'Ian Walker'... \n", "2 NaN \n", "3 NaN \n", "4 NaN \n", "\n", " related_events location player_id \\\n", "0 NaN NaN NaN \n", "1 NaN NaN NaN \n", "2 ['b31e69b0-a75e-4721-b023-c06094ddcfa0'] NaN NaN \n", "3 ['6e678cba-67c3-4e9a-acca-78ab69b7d68b'] NaN NaN \n", "4 ['500a6fd9-61c7-4b61-bb3c-8e6605c24084'] [61.0, 40.1] 40240.0 \n", "\n", " player_name position_id position_name pass_recipient_id \\\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 Paul Dickov 24.0 Left Center Forward 40242.0 \n", "\n", " pass_recipient_name pass_length pass_angle pass_height_id \\\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 Marcus Bent 1.104536 -1.661456 1.0 \n", "\n", " pass_height_name pass_end_location pass_type_id pass_type_name \\\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 Ground Pass [60.9, 39.0] 65.0 Kick Off \n", "\n", " pass_body_part_id pass_body_part_name carry_end_location pass_outcome_id \\\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 38.0 Left Foot NaN NaN \n", "\n", " pass_outcome_name under_pressure clearance_head clearance_body_part_id \\\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", " clearance_body_part_name counterpress duel_outcome_id duel_outcome_name \\\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", " duel_type_id duel_type_name ball_receipt_outcome_id \\\n", "0 NaN NaN NaN \n", "1 NaN NaN NaN \n", "2 NaN NaN NaN \n", "3 NaN NaN NaN \n", "4 NaN NaN NaN \n", "\n", " ball_receipt_outcome_name out clearance_left_foot pass_switch off_camera \\\n", "0 NaN NaN NaN NaN NaN \n", "1 NaN NaN NaN NaN NaN \n", "2 NaN NaN NaN NaN NaN \n", "3 NaN NaN NaN NaN NaN \n", "4 NaN NaN NaN NaN NaN \n", "\n", " clearance_aerial_won dribble_outcome_id dribble_outcome_name pass_cross \\\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", " pass_assisted_shot_id pass_shot_assist shot_statsbomb_xg shot_end_location \\\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", " shot_key_pass_id shot_body_part_id shot_body_part_name shot_technique_id \\\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", " shot_technique_name shot_outcome_id shot_outcome_name shot_type_id \\\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", " shot_type_name shot_freeze_frame goalkeeper_end_location \\\n", "0 NaN NaN NaN \n", "1 NaN NaN NaN \n", "2 NaN NaN NaN \n", "3 NaN NaN NaN \n", "4 NaN NaN NaN \n", "\n", " goalkeeper_type_id goalkeeper_type_name goalkeeper_position_id \\\n", "0 NaN NaN NaN \n", "1 NaN NaN NaN \n", "2 NaN NaN NaN \n", "3 NaN NaN NaN \n", "4 NaN NaN NaN \n", "\n", " goalkeeper_position_name ball_recovery_recovery_failure \\\n", "0 NaN NaN \n", "1 NaN NaN \n", "2 NaN NaN \n", "3 NaN NaN \n", "4 NaN NaN \n", "\n", " foul_committed_advantage foul_won_advantage dribble_overrun \\\n", "0 NaN NaN NaN \n", "1 NaN NaN NaN \n", "2 NaN NaN NaN \n", "3 NaN NaN NaN \n", "4 NaN NaN NaN \n", "\n", " clearance_right_foot interception_outcome_id interception_outcome_name \\\n", "0 NaN NaN NaN \n", "1 NaN NaN NaN \n", "2 NaN NaN NaN \n", "3 NaN NaN NaN \n", "4 NaN NaN NaN \n", "\n", " foul_won_defensive pass_aerial_won pass_deflected pass_inswinging \\\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", " pass_technique_id pass_technique_name goalkeeper_body_part_id \\\n", "0 NaN NaN NaN \n", "1 NaN NaN NaN \n", "2 NaN NaN NaN \n", "3 NaN NaN NaN \n", "4 NaN NaN NaN \n", "\n", " goalkeeper_body_part_name goalkeeper_technique_id \\\n", "0 NaN NaN \n", "1 NaN NaN \n", "2 NaN NaN \n", "3 NaN NaN \n", "4 NaN NaN \n", "\n", " goalkeeper_technique_name goalkeeper_outcome_id goalkeeper_outcome_name \\\n", "0 NaN NaN NaN \n", "1 NaN NaN NaN \n", "2 NaN NaN NaN \n", "3 NaN NaN NaN \n", "4 NaN NaN NaN \n", "\n", " pass_outswinging pass_goal_assist shot_one_on_one miscontrol_aerial_won \\\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", " shot_deflected block_deflection shot_first_time block_offensive \\\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", " pass_through_ball foul_committed_card_id foul_committed_card_name \\\n", "0 NaN NaN NaN \n", "1 NaN NaN NaN \n", "2 NaN NaN NaN \n", "3 NaN NaN NaN \n", "4 NaN NaN NaN \n", "\n", " foul_committed_penalty foul_won_penalty dribble_nutmeg \\\n", "0 NaN NaN NaN \n", "1 NaN NaN NaN \n", "2 NaN NaN NaN \n", "3 NaN NaN NaN \n", "4 NaN NaN NaN \n", "\n", " pass_miscommunication pass_no_touch foul_committed_offensive \\\n", "0 NaN NaN NaN \n", "1 NaN NaN NaN \n", "2 NaN NaN NaN \n", "3 NaN NaN NaN \n", "4 NaN NaN NaN \n", "\n", " goalkeeper_lost_out pass_straight substitution_outcome_id \\\n", "0 NaN NaN NaN \n", "1 NaN NaN NaN \n", "2 NaN NaN NaN \n", "3 NaN NaN NaN \n", "4 NaN NaN NaN \n", "\n", " substitution_outcome_name substitution_replacement_id \\\n", "0 NaN NaN \n", "1 NaN NaN \n", "2 NaN NaN \n", "3 NaN NaN \n", "4 NaN NaN \n", "\n", " substitution_replacement_name match_id goalkeeper_punched_out \\\n", "0 NaN 3749257 NaN \n", "1 NaN 3749257 NaN \n", "2 NaN 3749257 NaN \n", "3 NaN 3749257 NaN \n", "4 NaN 3749257 NaN \n", "\n", " shot_aerial_won pass_cut_back goalkeeper_success_in_play 50_50_outcome_id \\\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", " 50_50_outcome_name foul_committed_type_id foul_committed_type_name \\\n", "0 NaN NaN NaN \n", "1 NaN NaN NaN \n", "2 NaN NaN NaN \n", "3 NaN NaN NaN \n", "4 NaN NaN NaN \n", "\n", " ball_recovery_offensive shot_saved_off_target \\\n", "0 NaN NaN \n", "1 NaN NaN \n", "2 NaN NaN \n", "3 NaN NaN \n", "4 NaN NaN \n", "\n", " goalkeeper_shot_saved_off_target shot_open_goal dribble_no_touch \\\n", "0 NaN NaN NaN \n", "1 NaN NaN NaN \n", "2 NaN NaN NaN \n", "3 NaN NaN NaN \n", "4 NaN NaN NaN \n", "\n", " bad_behaviour_card_id bad_behaviour_card_name half_start_late_video_start \\\n", "0 NaN NaN NaN \n", "1 NaN NaN NaN \n", "2 NaN NaN NaN \n", "3 NaN NaN NaN \n", "4 NaN NaN NaN \n", "\n", " block_save_block shot_follows_dribble clearance_other \\\n", "0 NaN NaN NaN \n", "1 NaN NaN NaN \n", "2 NaN NaN NaN \n", "3 NaN NaN NaN \n", "4 NaN NaN NaN \n", "\n", " goalkeeper_shot_saved_to_post shot_redirect injury_stoppage_in_chain \\\n", "0 NaN NaN NaN \n", "1 NaN NaN NaN \n", "2 NaN NaN NaN \n", "3 NaN NaN NaN \n", "4 NaN NaN NaN \n", "\n", " shot_saved_to_post goalkeeper_success_out goalkeeper_lost_in_play \\\n", "0 NaN NaN NaN \n", "1 NaN NaN NaN \n", "2 NaN NaN NaN \n", "3 NaN NaN NaN \n", "4 NaN NaN NaN \n", "\n", " half_end_early_video_end player_off_permanent goalkeeper_saved_to_post \\\n", "0 NaN NaN NaN \n", "1 NaN NaN NaN \n", "2 NaN NaN NaN \n", "3 NaN NaN NaN \n", "4 NaN NaN NaN \n", "\n", " pass_backheel shot_kick_off goalkeeper_penalty_saved_to_post index_y \\\n", "0 NaN NaN NaN 0 \n", "1 NaN NaN NaN 0 \n", "2 NaN NaN NaN 0 \n", "3 NaN NaN NaN 0 \n", "4 NaN NaN NaN 0 \n", "\n", " match_date kick_off home_score away_score match_status \\\n", "0 2004-05-15 16:00:00.000 2 1 available \n", "1 2004-05-15 16:00:00.000 2 1 available \n", "2 2004-05-15 16:00:00.000 2 1 available \n", "3 2004-05-15 16:00:00.000 2 1 available \n", "4 2004-05-15 16:00:00.000 2 1 available \n", "\n", " last_updated match_week referee \\\n", "0 2020-08-30T08:12:14.579037 38 {'id': 1279, 'name': 'None'} \n", "1 2020-08-30T08:12:14.579037 38 {'id': 1279, 'name': 'None'} \n", "2 2020-08-30T08:12:14.579037 38 {'id': 1279, 'name': 'None'} \n", "3 2020-08-30T08:12:14.579037 38 {'id': 1279, 'name': 'None'} \n", "4 2020-08-30T08:12:14.579037 38 {'id': 1279, 'name': 'None'} \n", "\n", " stadium competition_competition_id competition_country_name \\\n", "0 NaN 2 England \n", "1 NaN 2 England \n", "2 NaN 2 England \n", "3 NaN 2 England \n", "4 NaN 2 England \n", "\n", " competition_competition_name season_season_id season_season_name \\\n", "0 Premier League 44 2003/2004 \n", "1 Premier League 44 2003/2004 \n", "2 Premier League 44 2003/2004 \n", "3 Premier League 44 2003/2004 \n", "4 Premier League 44 2003/2004 \n", "\n", " home_team_home_team_id home_team_home_team_name home_team_home_team_gender \\\n", "0 1 Arsenal male \n", "1 1 Arsenal male \n", "2 1 Arsenal male \n", "3 1 Arsenal male \n", "4 1 Arsenal male \n", "\n", " home_team_home_team_group \\\n", "0 NaN \n", "1 NaN \n", "2 NaN \n", "3 NaN \n", "4 NaN \n", "\n", " home_team_managers home_team_country_id \\\n", "0 [{'id': 577, 'name': 'Arsène Wenger', 'nicknam... 68 \n", "1 [{'id': 577, 'name': 'Arsène Wenger', 'nicknam... 68 \n", "2 [{'id': 577, 'name': 'Arsène Wenger', 'nicknam... 68 \n", "3 [{'id': 577, 'name': 'Arsène Wenger', 'nicknam... 68 \n", "4 [{'id': 577, 'name': 'Arsène Wenger', 'nicknam... 68 \n", "\n", " home_team_country_name away_team_away_team_id away_team_away_team_name \\\n", "0 England 22 Leicester City \n", "1 England 22 Leicester City \n", "2 England 22 Leicester City \n", "3 England 22 Leicester City \n", "4 England 22 Leicester City \n", "\n", " away_team_away_team_gender away_team_away_team_group \\\n", "0 male NaN \n", "1 male NaN \n", "2 male NaN \n", "3 male NaN \n", "4 male NaN \n", "\n", " away_team_managers away_team_country_id \\\n", "0 [{'id': 2974, 'name': 'Micky Adams', 'nickname... 68 \n", "1 [{'id': 2974, 'name': 'Micky Adams', 'nickname... 68 \n", "2 [{'id': 2974, 'name': 'Micky Adams', 'nickname... 68 \n", "3 [{'id': 2974, 'name': 'Micky Adams', 'nickname... 68 \n", "4 [{'id': 2974, 'name': 'Micky Adams', 'nickname... 68 \n", "\n", " away_team_country_name metadata_data_version \\\n", "0 England 1.1.0 \n", "1 England 1.1.0 \n", "2 England 1.1.0 \n", "3 England 1.1.0 \n", "4 England 1.1.0 \n", "\n", " metadata_shot_fidelity_version metadata_xy_fidelity_version \\\n", "0 2.0 2.0 \n", "1 2.0 2.0 \n", "2 2.0 2.0 \n", "3 2.0 2.0 \n", "4 2.0 2.0 \n", "\n", " competition_stage_id competition_stage_name competition_id season_id \\\n", "0 1 Regular Season 2 44 \n", "1 1 Regular Season 2 44 \n", "2 1 Regular Season 2 44 \n", "3 1 Regular Season 2 44 \n", "4 1 Regular Season 2 44 \n", "\n", " country_name competition_name competition_gender season_name \\\n", "0 England Premier League male 2003/2004 \n", "1 England Premier League male 2003/2004 \n", "2 England Premier League male 2003/2004 \n", "3 England Premier League male 2003/2004 \n", "4 England Premier League male 2003/2004 \n", "\n", " match_updated match_available \n", "0 2020-08-31T20:40:28.969635 2020-08-31T20:40:28.969635 \n", "1 2020-08-31T20:40:28.969635 2020-08-31T20:40:28.969635 \n", "2 2020-08-31T20:40:28.969635 2020-08-31T20:40:28.969635 \n", "3 2020-08-31T20:40:28.969635 2020-08-31T20:40:28.969635 \n", "4 2020-08-31T20:40:28.969635 2020-08-31T20:40:28.969635 " ] }, "execution_count": 11, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# Display the first 5 rows of the raw DataFrame, df_sb\n", "df_sb.head()" ] }, { "cell_type": "code", "execution_count": 12, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
level_0idindex_xperiodtimestampminutesecondpossessiondurationtype_idtype_namepossession_team_idpossession_team_nameplay_pattern_idplay_pattern_nameteam_idteam_nametactics_formationtactics_lineuprelated_eventslocationplayer_idplayer_nameposition_idposition_namepass_recipient_idpass_recipient_namepass_lengthpass_anglepass_height_idpass_height_namepass_end_locationpass_type_idpass_type_namepass_body_part_idpass_body_part_namecarry_end_locationpass_outcome_idpass_outcome_nameunder_pressureclearance_headclearance_body_part_idclearance_body_part_namecounterpressduel_outcome_idduel_outcome_nameduel_type_idduel_type_nameball_receipt_outcome_idball_receipt_outcome_nameoutclearance_left_footpass_switchoff_cameraclearance_aerial_wondribble_outcome_iddribble_outcome_namepass_crosspass_assisted_shot_idpass_shot_assistshot_statsbomb_xgshot_end_locationshot_key_pass_idshot_body_part_idshot_body_part_nameshot_technique_idshot_technique_nameshot_outcome_idshot_outcome_nameshot_type_idshot_type_nameshot_freeze_framegoalkeeper_end_locationgoalkeeper_type_idgoalkeeper_type_namegoalkeeper_position_idgoalkeeper_position_nameball_recovery_recovery_failurefoul_committed_advantagefoul_won_advantagedribble_overrunclearance_right_footinterception_outcome_idinterception_outcome_namefoul_won_defensivepass_aerial_wonpass_deflectedpass_inswingingpass_technique_idpass_technique_namegoalkeeper_body_part_idgoalkeeper_body_part_namegoalkeeper_technique_idgoalkeeper_technique_namegoalkeeper_outcome_idgoalkeeper_outcome_namepass_outswingingpass_goal_assistshot_one_on_onemiscontrol_aerial_wonshot_deflectedblock_deflectionshot_first_timeblock_offensivepass_through_ballfoul_committed_card_idfoul_committed_card_namefoul_committed_penaltyfoul_won_penaltydribble_nutmegpass_miscommunicationpass_no_touchfoul_committed_offensivegoalkeeper_lost_outpass_straightsubstitution_outcome_idsubstitution_outcome_namesubstitution_replacement_idsubstitution_replacement_namematch_idgoalkeeper_punched_outshot_aerial_wonpass_cut_backgoalkeeper_success_in_play50_50_outcome_id50_50_outcome_namefoul_committed_type_idfoul_committed_type_nameball_recovery_offensiveshot_saved_off_targetgoalkeeper_shot_saved_off_targetshot_open_goaldribble_no_touchbad_behaviour_card_idbad_behaviour_card_namehalf_start_late_video_startblock_save_blockshot_follows_dribbleclearance_othergoalkeeper_shot_saved_to_postshot_redirectinjury_stoppage_in_chainshot_saved_to_postgoalkeeper_success_outgoalkeeper_lost_in_playhalf_end_early_video_endplayer_off_permanentgoalkeeper_saved_to_postpass_backheelshot_kick_offgoalkeeper_penalty_saved_to_postindex_ymatch_datekick_offhome_scoreaway_scorematch_statuslast_updatedmatch_weekrefereestadiumcompetition_competition_idcompetition_country_namecompetition_competition_nameseason_season_idseason_season_namehome_team_home_team_idhome_team_home_team_namehome_team_home_team_genderhome_team_home_team_grouphome_team_managershome_team_country_idhome_team_country_nameaway_team_away_team_idaway_team_away_team_nameaway_team_away_team_genderaway_team_away_team_groupaway_team_managersaway_team_country_idaway_team_country_namemetadata_data_versionmetadata_shot_fidelity_versionmetadata_xy_fidelity_versioncompetition_stage_idcompetition_stage_namecompetition_idseason_idcountry_namecompetition_namecompetition_genderseason_namematch_updatedmatch_available
315815342373821ac0d-f832-4bbd-a9c3-f00dc45bfd2a4238400:22:30.391127302680.04000043Carry858Sweden Women's4From Throw In858Sweden Women'sNaNNaN['4d7320fa-dde2-4191-9172-05745c4e25d2', '633c...[106.0, 3.8]10222.0Jonna Andersson6.0Left BackNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaN[106.0, 3.8]NaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaN69284NaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaN512019-07-0321:00:00.00010available2020-07-29T05:006{'id': 1627, 'name': 'M. Beaudoin'}{'id': 193, 'name': 'Groupama Stadium', 'count...72InternationalWomen's World Cup302019851Netherlands Women'sfemaleNaN[{'id': 45, 'name': 'Sarina Glotzbach-Wiegman'...160Netherlands858Sweden Women'sfemaleNaN[{'id': 3016, 'name': 'Peter Gerhardsson', 'ni...220Sweden1.1.02.02.015Semi-finals7230InternationalWomen's World Cupfemale20192020-07-29T05:002020-07-29T05:00
31581544238633cac33-a3e7-4e4e-9bc8-10c8bf67c5ca4239400:22:30.431127302682.17691930Pass858Sweden Women's4From Throw In858Sweden Women'sNaNNaN['2a96c784-b880-4d0e-a66e-5b4f765cf924'][106.0, 3.8]10222.0Jonna Andersson6.0Left BackNaNNaN38.5523031.4355023.0High Pass[111.2, 42.0]NaNNaN38.0Left FootNaN9.0IncompleteNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNTrueNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaN69284NaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaN512019-07-0321:00:00.00010available2020-07-29T05:006{'id': 1627, 'name': 'M. Beaudoin'}{'id': 193, 'name': 'Groupama Stadium', 'count...72InternationalWomen's World Cup302019851Netherlands Women'sfemaleNaN[{'id': 45, 'name': 'Sarina Glotzbach-Wiegman'...160Netherlands858Sweden Women'sfemaleNaN[{'id': 3016, 'name': 'Peter Gerhardsson', 'ni...220Sweden1.1.02.02.015Semi-finals7230InternationalWomen's World Cupfemale20192020-07-29T05:002020-07-29T05:00
315815542392a96c784-b880-4d0e-a66e-5b4f765cf9244240400:22:32.608127322690.00000023Goal Keeper851Netherlands Women's8From Keeper851Netherlands Women'sNaNNaN['633cac33-a3e7-4e4e-9bc8-10c8bf67c5ca'][9.8, 39.0]10646.0Sari van Veenendaal1.0GoalkeeperNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaN25.0CollectedNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaN15.0SuccessNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaN69284NaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaN512019-07-0321:00:00.00010available2020-07-29T05:006{'id': 1627, 'name': 'M. Beaudoin'}{'id': 193, 'name': 'Groupama Stadium', 'count...72InternationalWomen's World Cup302019851Netherlands Women'sfemaleNaN[{'id': 45, 'name': 'Sarina Glotzbach-Wiegman'...160Netherlands858Sweden Women'sfemaleNaN[{'id': 3016, 'name': 'Peter Gerhardsson', 'ni...220Sweden1.1.02.02.015Semi-finals7230InternationalWomen's World Cupfemale20192020-07-29T05:002020-07-29T05:00
31581564240dc2ac9d4-03bb-4e2f-b462-ddf16187934c4241400:22:38.347127382690.00000034Half End851Netherlands Women's8From Keeper858Sweden Women'sNaNNaN['9125ce39-0492-406a-8186-0332f1669dc7']NaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaN69284NaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaN512019-07-0321:00:00.00010available2020-07-29T05:006{'id': 1627, 'name': 'M. Beaudoin'}{'id': 193, 'name': 'Groupama Stadium', 'count...72InternationalWomen's World Cup302019851Netherlands Women'sfemaleNaN[{'id': 45, 'name': 'Sarina Glotzbach-Wiegman'...160Netherlands858Sweden Women'sfemaleNaN[{'id': 3016, 'name': 'Peter Gerhardsson', 'ni...220Sweden1.1.02.02.015Semi-finals7230InternationalWomen's World Cupfemale20192020-07-29T05:002020-07-29T05:00
315815742419125ce39-0492-406a-8186-0332f1669dc74242400:22:38.347127382690.00000034Half End851Netherlands Women's8From Keeper851Netherlands Women'sNaNNaN['dc2ac9d4-03bb-4e2f-b462-ddf16187934c']NaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaN69284NaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaN512019-07-0321:00:00.00010available2020-07-29T05:006{'id': 1627, 'name': 'M. Beaudoin'}{'id': 193, 'name': 'Groupama Stadium', 'count...72InternationalWomen's World Cup302019851Netherlands Women'sfemaleNaN[{'id': 45, 'name': 'Sarina Glotzbach-Wiegman'...160Netherlands858Sweden Women'sfemaleNaN[{'id': 3016, 'name': 'Peter Gerhardsson', 'ni...220Sweden1.1.02.02.015Semi-finals7230InternationalWomen's World Cupfemale20192020-07-29T05:002020-07-29T05:00
\n", "
" ], "text/plain": [ " level_0 id index_x period \\\n", "3158153 4237 3821ac0d-f832-4bbd-a9c3-f00dc45bfd2a 4238 4 \n", "3158154 4238 633cac33-a3e7-4e4e-9bc8-10c8bf67c5ca 4239 4 \n", "3158155 4239 2a96c784-b880-4d0e-a66e-5b4f765cf924 4240 4 \n", "3158156 4240 dc2ac9d4-03bb-4e2f-b462-ddf16187934c 4241 4 \n", "3158157 4241 9125ce39-0492-406a-8186-0332f1669dc7 4242 4 \n", "\n", " timestamp minute second possession duration type_id \\\n", "3158153 00:22:30.391 127 30 268 0.040000 43 \n", "3158154 00:22:30.431 127 30 268 2.176919 30 \n", "3158155 00:22:32.608 127 32 269 0.000000 23 \n", "3158156 00:22:38.347 127 38 269 0.000000 34 \n", "3158157 00:22:38.347 127 38 269 0.000000 34 \n", "\n", " type_name possession_team_id possession_team_name \\\n", "3158153 Carry 858 Sweden Women's \n", "3158154 Pass 858 Sweden Women's \n", "3158155 Goal Keeper 851 Netherlands Women's \n", "3158156 Half End 851 Netherlands Women's \n", "3158157 Half End 851 Netherlands Women's \n", "\n", " play_pattern_id play_pattern_name team_id team_name \\\n", "3158153 4 From Throw In 858 Sweden Women's \n", "3158154 4 From Throw In 858 Sweden Women's \n", "3158155 8 From Keeper 851 Netherlands Women's \n", "3158156 8 From Keeper 858 Sweden Women's \n", "3158157 8 From Keeper 851 Netherlands Women's \n", "\n", " tactics_formation tactics_lineup \\\n", "3158153 NaN NaN \n", "3158154 NaN NaN \n", "3158155 NaN NaN \n", "3158156 NaN NaN \n", "3158157 NaN NaN \n", "\n", " related_events location \\\n", "3158153 ['4d7320fa-dde2-4191-9172-05745c4e25d2', '633c... [106.0, 3.8] \n", "3158154 ['2a96c784-b880-4d0e-a66e-5b4f765cf924'] [106.0, 3.8] \n", "3158155 ['633cac33-a3e7-4e4e-9bc8-10c8bf67c5ca'] [9.8, 39.0] \n", "3158156 ['9125ce39-0492-406a-8186-0332f1669dc7'] NaN \n", "3158157 ['dc2ac9d4-03bb-4e2f-b462-ddf16187934c'] NaN \n", "\n", " player_id player_name position_id position_name \\\n", "3158153 10222.0 Jonna Andersson 6.0 Left Back \n", "3158154 10222.0 Jonna Andersson 6.0 Left Back \n", "3158155 10646.0 Sari van Veenendaal 1.0 Goalkeeper \n", "3158156 NaN NaN NaN NaN \n", "3158157 NaN NaN NaN NaN \n", "\n", " pass_recipient_id pass_recipient_name pass_length pass_angle \\\n", "3158153 NaN NaN NaN NaN \n", "3158154 NaN NaN 38.552303 1.435502 \n", "3158155 NaN NaN NaN NaN \n", "3158156 NaN NaN NaN NaN \n", "3158157 NaN NaN NaN NaN \n", "\n", " pass_height_id pass_height_name pass_end_location pass_type_id \\\n", "3158153 NaN NaN NaN NaN \n", "3158154 3.0 High Pass [111.2, 42.0] NaN \n", "3158155 NaN NaN NaN NaN \n", "3158156 NaN NaN NaN NaN \n", "3158157 NaN NaN NaN NaN \n", "\n", " pass_type_name pass_body_part_id pass_body_part_name \\\n", "3158153 NaN NaN NaN \n", "3158154 NaN 38.0 Left Foot \n", "3158155 NaN NaN NaN \n", "3158156 NaN NaN NaN \n", "3158157 NaN NaN NaN \n", "\n", " carry_end_location pass_outcome_id pass_outcome_name under_pressure \\\n", "3158153 [106.0, 3.8] NaN NaN NaN \n", "3158154 NaN 9.0 Incomplete NaN \n", "3158155 NaN NaN NaN NaN \n", "3158156 NaN NaN NaN NaN \n", "3158157 NaN NaN NaN NaN \n", "\n", " clearance_head clearance_body_part_id clearance_body_part_name \\\n", "3158153 NaN NaN NaN \n", "3158154 NaN NaN NaN \n", "3158155 NaN NaN NaN \n", "3158156 NaN NaN NaN \n", "3158157 NaN NaN NaN \n", "\n", " counterpress duel_outcome_id duel_outcome_name duel_type_id \\\n", "3158153 NaN NaN NaN NaN \n", "3158154 NaN NaN NaN NaN \n", "3158155 NaN NaN NaN NaN \n", "3158156 NaN NaN NaN NaN \n", "3158157 NaN NaN NaN NaN \n", "\n", " duel_type_name ball_receipt_outcome_id ball_receipt_outcome_name \\\n", "3158153 NaN NaN NaN \n", "3158154 NaN NaN NaN \n", "3158155 NaN NaN NaN \n", "3158156 NaN NaN NaN \n", "3158157 NaN NaN NaN \n", "\n", " out clearance_left_foot pass_switch off_camera clearance_aerial_won \\\n", "3158153 NaN NaN NaN NaN NaN \n", "3158154 NaN NaN NaN NaN NaN \n", "3158155 NaN NaN NaN NaN NaN \n", "3158156 NaN NaN NaN NaN NaN \n", "3158157 NaN NaN NaN NaN NaN \n", "\n", " dribble_outcome_id dribble_outcome_name pass_cross \\\n", "3158153 NaN NaN NaN \n", "3158154 NaN NaN True \n", "3158155 NaN NaN NaN \n", "3158156 NaN NaN NaN \n", "3158157 NaN NaN NaN \n", "\n", " pass_assisted_shot_id pass_shot_assist shot_statsbomb_xg \\\n", "3158153 NaN NaN NaN \n", "3158154 NaN NaN NaN \n", "3158155 NaN NaN NaN \n", "3158156 NaN NaN NaN \n", "3158157 NaN NaN NaN \n", "\n", " shot_end_location shot_key_pass_id shot_body_part_id \\\n", "3158153 NaN NaN NaN \n", "3158154 NaN NaN NaN \n", "3158155 NaN NaN NaN \n", "3158156 NaN NaN NaN \n", "3158157 NaN NaN NaN \n", "\n", " shot_body_part_name shot_technique_id shot_technique_name \\\n", "3158153 NaN NaN NaN \n", "3158154 NaN NaN NaN \n", "3158155 NaN NaN NaN \n", "3158156 NaN NaN NaN \n", "3158157 NaN NaN NaN \n", "\n", " shot_outcome_id shot_outcome_name shot_type_id shot_type_name \\\n", "3158153 NaN NaN NaN NaN \n", "3158154 NaN NaN NaN NaN \n", "3158155 NaN NaN NaN NaN \n", "3158156 NaN NaN NaN NaN \n", "3158157 NaN NaN NaN NaN \n", "\n", " shot_freeze_frame goalkeeper_end_location goalkeeper_type_id \\\n", "3158153 NaN NaN NaN \n", "3158154 NaN NaN NaN \n", "3158155 NaN NaN 25.0 \n", "3158156 NaN NaN NaN \n", "3158157 NaN NaN NaN \n", "\n", " goalkeeper_type_name goalkeeper_position_id goalkeeper_position_name \\\n", "3158153 NaN NaN NaN \n", "3158154 NaN NaN NaN \n", "3158155 Collected NaN NaN \n", "3158156 NaN NaN NaN \n", "3158157 NaN NaN NaN \n", "\n", " ball_recovery_recovery_failure foul_committed_advantage \\\n", "3158153 NaN NaN \n", "3158154 NaN NaN \n", "3158155 NaN NaN \n", "3158156 NaN NaN \n", "3158157 NaN NaN \n", "\n", " foul_won_advantage dribble_overrun clearance_right_foot \\\n", "3158153 NaN NaN NaN \n", "3158154 NaN NaN NaN \n", "3158155 NaN NaN NaN \n", "3158156 NaN NaN NaN \n", "3158157 NaN NaN NaN \n", "\n", " interception_outcome_id interception_outcome_name foul_won_defensive \\\n", "3158153 NaN NaN NaN \n", "3158154 NaN NaN NaN \n", "3158155 NaN NaN NaN \n", "3158156 NaN NaN NaN \n", "3158157 NaN NaN NaN \n", "\n", " pass_aerial_won pass_deflected pass_inswinging pass_technique_id \\\n", "3158153 NaN NaN NaN NaN \n", "3158154 NaN NaN NaN NaN \n", "3158155 NaN NaN NaN NaN \n", "3158156 NaN NaN NaN NaN \n", "3158157 NaN NaN NaN NaN \n", "\n", " pass_technique_name goalkeeper_body_part_id \\\n", "3158153 NaN NaN \n", "3158154 NaN NaN \n", "3158155 NaN NaN \n", "3158156 NaN NaN \n", "3158157 NaN NaN \n", "\n", " goalkeeper_body_part_name goalkeeper_technique_id \\\n", "3158153 NaN NaN \n", "3158154 NaN NaN \n", "3158155 NaN NaN \n", "3158156 NaN NaN \n", "3158157 NaN NaN \n", "\n", " goalkeeper_technique_name goalkeeper_outcome_id \\\n", "3158153 NaN NaN \n", "3158154 NaN NaN \n", "3158155 NaN 15.0 \n", "3158156 NaN NaN \n", "3158157 NaN NaN \n", "\n", " goalkeeper_outcome_name pass_outswinging pass_goal_assist \\\n", "3158153 NaN NaN NaN \n", "3158154 NaN NaN NaN \n", "3158155 Success NaN NaN \n", "3158156 NaN NaN NaN \n", "3158157 NaN NaN NaN \n", "\n", " shot_one_on_one miscontrol_aerial_won shot_deflected block_deflection \\\n", "3158153 NaN NaN NaN NaN \n", "3158154 NaN NaN NaN NaN \n", "3158155 NaN NaN NaN NaN \n", "3158156 NaN NaN NaN NaN \n", "3158157 NaN NaN NaN NaN \n", "\n", " shot_first_time block_offensive pass_through_ball \\\n", "3158153 NaN NaN NaN \n", "3158154 NaN NaN NaN \n", "3158155 NaN NaN NaN \n", "3158156 NaN NaN NaN \n", "3158157 NaN NaN NaN \n", "\n", " foul_committed_card_id foul_committed_card_name \\\n", "3158153 NaN NaN \n", "3158154 NaN NaN \n", "3158155 NaN NaN \n", "3158156 NaN NaN \n", "3158157 NaN NaN \n", "\n", " foul_committed_penalty foul_won_penalty dribble_nutmeg \\\n", "3158153 NaN NaN NaN \n", "3158154 NaN NaN NaN \n", "3158155 NaN NaN NaN \n", "3158156 NaN NaN NaN \n", "3158157 NaN NaN NaN \n", "\n", " pass_miscommunication pass_no_touch foul_committed_offensive \\\n", "3158153 NaN NaN NaN \n", "3158154 NaN NaN NaN \n", "3158155 NaN NaN NaN \n", "3158156 NaN NaN NaN \n", "3158157 NaN NaN NaN \n", "\n", " goalkeeper_lost_out pass_straight substitution_outcome_id \\\n", "3158153 NaN NaN NaN \n", "3158154 NaN NaN NaN \n", "3158155 NaN NaN NaN \n", "3158156 NaN NaN NaN \n", "3158157 NaN NaN NaN \n", "\n", " substitution_outcome_name substitution_replacement_id \\\n", "3158153 NaN NaN \n", "3158154 NaN NaN \n", "3158155 NaN NaN \n", "3158156 NaN NaN \n", "3158157 NaN NaN \n", "\n", " substitution_replacement_name match_id goalkeeper_punched_out \\\n", "3158153 NaN 69284 NaN \n", "3158154 NaN 69284 NaN \n", "3158155 NaN 69284 NaN \n", "3158156 NaN 69284 NaN \n", "3158157 NaN 69284 NaN \n", "\n", " shot_aerial_won pass_cut_back goalkeeper_success_in_play \\\n", "3158153 NaN NaN NaN \n", "3158154 NaN NaN NaN \n", "3158155 NaN NaN NaN \n", "3158156 NaN NaN NaN \n", "3158157 NaN NaN NaN \n", "\n", " 50_50_outcome_id 50_50_outcome_name foul_committed_type_id \\\n", "3158153 NaN NaN NaN \n", "3158154 NaN NaN NaN \n", "3158155 NaN NaN NaN \n", "3158156 NaN NaN NaN \n", "3158157 NaN NaN NaN \n", "\n", " foul_committed_type_name ball_recovery_offensive \\\n", "3158153 NaN NaN \n", "3158154 NaN NaN \n", "3158155 NaN NaN \n", "3158156 NaN NaN \n", "3158157 NaN NaN \n", "\n", " shot_saved_off_target goalkeeper_shot_saved_off_target shot_open_goal \\\n", "3158153 NaN NaN NaN \n", "3158154 NaN NaN NaN \n", "3158155 NaN NaN NaN \n", "3158156 NaN NaN NaN \n", "3158157 NaN NaN NaN \n", "\n", " dribble_no_touch bad_behaviour_card_id bad_behaviour_card_name \\\n", "3158153 NaN NaN NaN \n", "3158154 NaN NaN NaN \n", "3158155 NaN NaN NaN \n", "3158156 NaN NaN NaN \n", "3158157 NaN NaN NaN \n", "\n", " half_start_late_video_start block_save_block shot_follows_dribble \\\n", "3158153 NaN NaN NaN \n", "3158154 NaN NaN NaN \n", "3158155 NaN NaN NaN \n", "3158156 NaN NaN NaN \n", "3158157 NaN NaN NaN \n", "\n", " clearance_other goalkeeper_shot_saved_to_post shot_redirect \\\n", "3158153 NaN NaN NaN \n", "3158154 NaN NaN NaN \n", "3158155 NaN NaN NaN \n", "3158156 NaN NaN NaN \n", "3158157 NaN NaN NaN \n", "\n", " injury_stoppage_in_chain shot_saved_to_post goalkeeper_success_out \\\n", "3158153 NaN NaN NaN \n", "3158154 NaN NaN NaN \n", "3158155 NaN NaN NaN \n", "3158156 NaN NaN NaN \n", "3158157 NaN NaN NaN \n", "\n", " goalkeeper_lost_in_play half_end_early_video_end player_off_permanent \\\n", "3158153 NaN NaN NaN \n", "3158154 NaN NaN NaN \n", "3158155 NaN NaN NaN \n", "3158156 NaN NaN NaN \n", "3158157 NaN NaN NaN \n", "\n", " goalkeeper_saved_to_post pass_backheel shot_kick_off \\\n", "3158153 NaN NaN NaN \n", "3158154 NaN NaN NaN \n", "3158155 NaN NaN NaN \n", "3158156 NaN NaN NaN \n", "3158157 NaN NaN NaN \n", "\n", " goalkeeper_penalty_saved_to_post index_y match_date kick_off \\\n", "3158153 NaN 51 2019-07-03 21:00:00.000 \n", "3158154 NaN 51 2019-07-03 21:00:00.000 \n", "3158155 NaN 51 2019-07-03 21:00:00.000 \n", "3158156 NaN 51 2019-07-03 21:00:00.000 \n", "3158157 NaN 51 2019-07-03 21:00:00.000 \n", "\n", " home_score away_score match_status last_updated match_week \\\n", "3158153 1 0 available 2020-07-29T05:00 6 \n", "3158154 1 0 available 2020-07-29T05:00 6 \n", "3158155 1 0 available 2020-07-29T05:00 6 \n", "3158156 1 0 available 2020-07-29T05:00 6 \n", "3158157 1 0 available 2020-07-29T05:00 6 \n", "\n", " referee \\\n", "3158153 {'id': 1627, 'name': 'M. Beaudoin'} \n", "3158154 {'id': 1627, 'name': 'M. Beaudoin'} \n", "3158155 {'id': 1627, 'name': 'M. Beaudoin'} \n", "3158156 {'id': 1627, 'name': 'M. Beaudoin'} \n", "3158157 {'id': 1627, 'name': 'M. Beaudoin'} \n", "\n", " stadium \\\n", "3158153 {'id': 193, 'name': 'Groupama Stadium', 'count... \n", "3158154 {'id': 193, 'name': 'Groupama Stadium', 'count... \n", "3158155 {'id': 193, 'name': 'Groupama Stadium', 'count... \n", "3158156 {'id': 193, 'name': 'Groupama Stadium', 'count... \n", "3158157 {'id': 193, 'name': 'Groupama Stadium', 'count... \n", "\n", " competition_competition_id competition_country_name \\\n", "3158153 72 International \n", "3158154 72 International \n", "3158155 72 International \n", "3158156 72 International \n", "3158157 72 International \n", "\n", " competition_competition_name season_season_id season_season_name \\\n", "3158153 Women's World Cup 30 2019 \n", "3158154 Women's World Cup 30 2019 \n", "3158155 Women's World Cup 30 2019 \n", "3158156 Women's World Cup 30 2019 \n", "3158157 Women's World Cup 30 2019 \n", "\n", " home_team_home_team_id home_team_home_team_name \\\n", "3158153 851 Netherlands Women's \n", "3158154 851 Netherlands Women's \n", "3158155 851 Netherlands Women's \n", "3158156 851 Netherlands Women's \n", "3158157 851 Netherlands Women's \n", "\n", " home_team_home_team_gender home_team_home_team_group \\\n", "3158153 female NaN \n", "3158154 female NaN \n", "3158155 female NaN \n", "3158156 female NaN \n", "3158157 female NaN \n", "\n", " home_team_managers \\\n", "3158153 [{'id': 45, 'name': 'Sarina Glotzbach-Wiegman'... \n", "3158154 [{'id': 45, 'name': 'Sarina Glotzbach-Wiegman'... \n", "3158155 [{'id': 45, 'name': 'Sarina Glotzbach-Wiegman'... \n", "3158156 [{'id': 45, 'name': 'Sarina Glotzbach-Wiegman'... \n", "3158157 [{'id': 45, 'name': 'Sarina Glotzbach-Wiegman'... \n", "\n", " home_team_country_id home_team_country_name away_team_away_team_id \\\n", "3158153 160 Netherlands 858 \n", "3158154 160 Netherlands 858 \n", "3158155 160 Netherlands 858 \n", "3158156 160 Netherlands 858 \n", "3158157 160 Netherlands 858 \n", "\n", " away_team_away_team_name away_team_away_team_gender \\\n", "3158153 Sweden Women's female \n", "3158154 Sweden Women's female \n", "3158155 Sweden Women's female \n", "3158156 Sweden Women's female \n", "3158157 Sweden Women's female \n", "\n", " away_team_away_team_group \\\n", "3158153 NaN \n", "3158154 NaN \n", "3158155 NaN \n", "3158156 NaN \n", "3158157 NaN \n", "\n", " away_team_managers \\\n", "3158153 [{'id': 3016, 'name': 'Peter Gerhardsson', 'ni... \n", "3158154 [{'id': 3016, 'name': 'Peter Gerhardsson', 'ni... \n", "3158155 [{'id': 3016, 'name': 'Peter Gerhardsson', 'ni... \n", "3158156 [{'id': 3016, 'name': 'Peter Gerhardsson', 'ni... \n", "3158157 [{'id': 3016, 'name': 'Peter Gerhardsson', 'ni... \n", "\n", " away_team_country_id away_team_country_name metadata_data_version \\\n", "3158153 220 Sweden 1.1.0 \n", "3158154 220 Sweden 1.1.0 \n", "3158155 220 Sweden 1.1.0 \n", "3158156 220 Sweden 1.1.0 \n", "3158157 220 Sweden 1.1.0 \n", "\n", " metadata_shot_fidelity_version metadata_xy_fidelity_version \\\n", "3158153 2.0 2.0 \n", "3158154 2.0 2.0 \n", "3158155 2.0 2.0 \n", "3158156 2.0 2.0 \n", "3158157 2.0 2.0 \n", "\n", " competition_stage_id competition_stage_name competition_id \\\n", "3158153 15 Semi-finals 72 \n", "3158154 15 Semi-finals 72 \n", "3158155 15 Semi-finals 72 \n", "3158156 15 Semi-finals 72 \n", "3158157 15 Semi-finals 72 \n", "\n", " season_id country_name competition_name competition_gender \\\n", "3158153 30 International Women's World Cup female \n", "3158154 30 International Women's World Cup female \n", "3158155 30 International Women's World Cup female \n", "3158156 30 International Women's World Cup female \n", "3158157 30 International Women's World Cup female \n", "\n", " season_name match_updated match_available \n", "3158153 2019 2020-07-29T05:00 2020-07-29T05:00 \n", "3158154 2019 2020-07-29T05:00 2020-07-29T05:00 \n", "3158155 2019 2020-07-29T05:00 2020-07-29T05:00 \n", "3158156 2019 2020-07-29T05:00 2020-07-29T05:00 \n", "3158157 2019 2020-07-29T05:00 2020-07-29T05:00 " ] }, "execution_count": 12, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# Display the last 5 rows of the raw DataFrame, df_sb\n", "df_sb.tail()" ] }, { "cell_type": "code", "execution_count": 13, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "(3158158, 193)\n" ] } ], "source": [ "# Print the shape of the raw DataFrame, df_sb\n", "print(df_sb.shape)" ] }, { "cell_type": "code", "execution_count": 14, "metadata": { "scrolled": true }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Index(['level_0', 'id', 'index_x', 'period', 'timestamp', 'minute', 'second',\n", " 'possession', 'duration', 'type_id',\n", " ...\n", " 'competition_stage_id', 'competition_stage_name', 'competition_id',\n", " 'season_id', 'country_name', 'competition_name', 'competition_gender',\n", " 'season_name', 'match_updated', 'match_available'],\n", " dtype='object', length=193)\n" ] } ], "source": [ "# Print the column names of the raw DataFrame, df_sb\n", "print(df_sb.columns)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "The joined dataset has one hundred and ninety three features (columns). Full details of these attributes can be found in the [Data Dictionary](section3.2.1)." ] }, { "cell_type": "code", "execution_count": 21, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "level_0 int64\n", "id object\n", "index_x int64\n", "period int64\n", "timestamp object\n", "minute int64\n", "second int64\n", "possession int64\n", "duration float64\n", "type_id int64\n", "type_name object\n", "possession_team_id int64\n", "possession_team_name object\n", "play_pattern_id int64\n", "play_pattern_name object\n", "team_id int64\n", "team_name object\n", "tactics_formation float64\n", "tactics_lineup object\n", "related_events object\n", "location object\n", "player_id float64\n", "player_name object\n", "position_id float64\n", "position_name object\n", "pass_recipient_id float64\n", "pass_recipient_name object\n", "pass_length float64\n", "pass_angle float64\n", "pass_height_id float64\n", "pass_height_name object\n", "pass_end_location object\n", "pass_type_id float64\n", "pass_type_name object\n", "pass_body_part_id float64\n", "pass_body_part_name object\n", "carry_end_location object\n", "pass_outcome_id float64\n", "pass_outcome_name object\n", "under_pressure object\n", "clearance_head object\n", "clearance_body_part_id float64\n", "clearance_body_part_name object\n", "counterpress object\n", "duel_outcome_id float64\n", "duel_outcome_name object\n", "duel_type_id float64\n", "duel_type_name object\n", "ball_receipt_outcome_id float64\n", "ball_receipt_outcome_name object\n", "out object\n", "clearance_left_foot object\n", "pass_switch object\n", "off_camera object\n", "clearance_aerial_won object\n", "dribble_outcome_id float64\n", "dribble_outcome_name object\n", "pass_cross object\n", "pass_assisted_shot_id object\n", "pass_shot_assist object\n", "shot_statsbomb_xg float64\n", "shot_end_location object\n", "shot_key_pass_id object\n", "shot_body_part_id float64\n", "shot_body_part_name object\n", "shot_technique_id float64\n", "shot_technique_name object\n", "shot_outcome_id float64\n", "shot_outcome_name object\n", "shot_type_id float64\n", "shot_type_name object\n", "shot_freeze_frame object\n", "goalkeeper_end_location object\n", "goalkeeper_type_id float64\n", "goalkeeper_type_name object\n", "goalkeeper_position_id float64\n", "goalkeeper_position_name object\n", "ball_recovery_recovery_failure object\n", "foul_committed_advantage object\n", "foul_won_advantage object\n", "dribble_overrun object\n", "clearance_right_foot object\n", "interception_outcome_id float64\n", "interception_outcome_name object\n", "foul_won_defensive object\n", "pass_aerial_won object\n", "pass_deflected object\n", "pass_inswinging object\n", "pass_technique_id float64\n", "pass_technique_name object\n", "goalkeeper_body_part_id float64\n", "goalkeeper_body_part_name object\n", "goalkeeper_technique_id float64\n", "goalkeeper_technique_name object\n", "goalkeeper_outcome_id float64\n", "goalkeeper_outcome_name object\n", "pass_outswinging object\n", "pass_goal_assist object\n", "shot_one_on_one object\n", "miscontrol_aerial_won object\n", "shot_deflected object\n", "block_deflection object\n", "shot_first_time object\n", "block_offensive object\n", "pass_through_ball object\n", "foul_committed_card_id float64\n", "foul_committed_card_name object\n", "foul_committed_penalty object\n", "foul_won_penalty object\n", "dribble_nutmeg object\n", "pass_miscommunication object\n", "pass_no_touch object\n", "foul_committed_offensive object\n", "goalkeeper_lost_out object\n", "pass_straight object\n", "substitution_outcome_id float64\n", "substitution_outcome_name object\n", "substitution_replacement_id float64\n", "substitution_replacement_name object\n", "match_id int64\n", "goalkeeper_punched_out object\n", "shot_aerial_won object\n", "pass_cut_back object\n", "goalkeeper_success_in_play object\n", "50_50_outcome_id float64\n", "50_50_outcome_name object\n", "foul_committed_type_id float64\n", "foul_committed_type_name object\n", "ball_recovery_offensive object\n", "shot_saved_off_target object\n", "goalkeeper_shot_saved_off_target object\n", "shot_open_goal object\n", "dribble_no_touch object\n", "bad_behaviour_card_id float64\n", "bad_behaviour_card_name object\n", "half_start_late_video_start object\n", "block_save_block object\n", "shot_follows_dribble object\n", "clearance_other object\n", "goalkeeper_shot_saved_to_post object\n", "shot_redirect object\n", "injury_stoppage_in_chain object\n", "shot_saved_to_post object\n", "goalkeeper_success_out object\n", "goalkeeper_lost_in_play object\n", "half_end_early_video_end object\n", "player_off_permanent object\n", "goalkeeper_saved_to_post object\n", "pass_backheel object\n", "shot_kick_off object\n", "goalkeeper_penalty_saved_to_post object\n", "index_y int64\n", "match_date object\n", "kick_off object\n", "home_score int64\n", "away_score int64\n", "match_status object\n", "last_updated object\n", "match_week int64\n", "referee object\n", "stadium object\n", "competition_competition_id int64\n", "competition_country_name object\n", "competition_competition_name object\n", "season_season_id int64\n", "season_season_name object\n", "home_team_home_team_id int64\n", "home_team_home_team_name object\n", "home_team_home_team_gender object\n", "home_team_home_team_group object\n", "home_team_managers object\n", "home_team_country_id int64\n", "home_team_country_name object\n", "away_team_away_team_id int64\n", "away_team_away_team_name object\n", "away_team_away_team_gender object\n", "away_team_away_team_group object\n", "away_team_managers object\n", "away_team_country_id int64\n", "away_team_country_name object\n", "metadata_data_version object\n", "metadata_shot_fidelity_version float64\n", "metadata_xy_fidelity_version float64\n", "competition_stage_id int64\n", "competition_stage_name object\n", "competition_id int64\n", "season_id int64\n", "country_name object\n", "competition_name object\n", "competition_gender object\n", "season_name object\n", "match_updated object\n", "match_available object\n", "dtype: object\n" ] } ], "source": [ "# Data types of the features of the raw DataFrame, df_sb\n", "with pd.option_context('display.max_rows', None, 'display.max_columns', None):\n", " print(df_sb.dtypes)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Full details of these attributes and their data types can be found in the [Data Dictionary](section3.3.1)." ] }, { "cell_type": "code", "execution_count": 16, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "\n", "RangeIndex: 3158158 entries, 0 to 3158157\n", "Columns: 193 entries, level_0 to match_available\n", "dtypes: float64(36), int64(24), object(133)\n", "memory usage: 4.5+ GB\n" ] } ], "source": [ "# Info for the raw DataFrame, df_sb\n", "df_sb.info()" ] }, { "cell_type": "code", "execution_count": 17, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
level_0index_xperiodminutesecondpossessiondurationtype_idpossession_team_idplay_pattern_idteam_idtactics_formationplayer_idposition_idpass_recipient_idpass_lengthpass_anglepass_height_idpass_type_idpass_body_part_idpass_outcome_idclearance_body_part_idduel_outcome_idduel_type_idball_receipt_outcome_iddribble_outcome_idshot_statsbomb_xgshot_body_part_idshot_technique_idshot_outcome_idshot_type_idgoalkeeper_type_idgoalkeeper_position_idinterception_outcome_idpass_technique_idgoalkeeper_body_part_idgoalkeeper_technique_idgoalkeeper_outcome_idfoul_committed_card_idsubstitution_outcome_idsubstitution_replacement_idmatch_id50_50_outcome_idfoul_committed_type_idbad_behaviour_card_idindex_yhome_scoreaway_scorematch_weekcompetition_competition_idseason_season_idhome_team_home_team_idhome_team_country_idaway_team_away_team_idaway_team_country_idmetadata_shot_fidelity_versionmetadata_xy_fidelity_versioncompetition_stage_idcompetition_idseason_id
count3.158158e+063.158158e+063.158158e+063.158158e+063.158158e+063.158158e+062.313994e+063.158158e+063.158158e+063.158158e+063.158158e+063301.0000003.141590e+063.141590e+06809438.000000871308.000000871308.000000871308.000000171945.00000819407.000000185449.00000030932.00000034423.00000055407.000000123579.036494.00000022357.00000022357.00000022357.00000022357.00000022357.00000026473.00000022337.00000016815.00000010304.0000006448.0000008660.00000012634.0000002799.0000004842.0000004847.0000003.158158e+061366.0000001575.000000628.0000003.158158e+063.158158e+063.158158e+063.158158e+063.158158e+063.158158e+063.158158e+063.158158e+063.158158e+063.158158e+062494494.02154338.03.158158e+063.158158e+063.158158e+06
mean1.820498e+031.821498e+031.500939e+004.486634e+012.930872e+019.664262e+011.273816e+003.236920e+014.930352e+022.823449e+004.976638e+024814.2523481.263005e+041.124376e+0112222.93157621.0585180.0134941.55518965.1301039.88249719.26454738.25313611.89419910.6212759.08.3817890.11700938.99816692.90607098.16339485.52838031.25886843.85253210.267023106.53668536.55117945.56108540.6093876.931404102.94547714064.6505054.397187e+052.03660323.2742866.9394902.397784e+011.808959e+001.436360e+001.491716e+012.319544e+012.205346e+015.127428e+021.671042e+025.100286e+021.666108e+022.02.02.563879e+002.319544e+012.205346e+01
std1.076392e+031.076392e+035.160235e-012.714136e+011.738708e+015.767026e+012.148291e+001.213322e+013.640865e+022.198834e+003.655942e+0211433.5675828.832031e+037.189082e+008679.00381914.2755841.5422110.8151641.919964.43495924.0143662.6430924.9370000.4850740.00.4858320.1573061.9998090.8300462.0648605.9190486.6522520.5027795.2589711.7322512.2728810.49628320.1572840.3289840.2270709347.3894799.243830e+051.1798581.2500340.3187412.130848e+011.694212e+001.428223e+001.084382e+011.809714e+011.553319e+013.683820e+026.943479e+013.717773e+027.005726e+010.00.05.538984e+001.809714e+011.553319e+01
min0.000000e+001.000000e+001.000000e+000.000000e+000.000000e+001.000000e+00-7.398828e+022.000000e+001.000000e+001.000000e+001.000000e+0055.0000002.941000e+030.000000e+002941.0000000.000000-3.1385621.00000061.0000037.0000009.00000037.0000004.00000010.0000009.08.0000000.00000037.00000089.00000096.00000061.00000025.00000042.0000004.000000104.00000035.00000045.0000001.0000005.000000102.0000002948.0000007.430000e+031.00000019.0000005.0000000.000000e+000.000000e+000.000000e+001.000000e+002.000000e+001.000000e+001.000000e+001.100000e+011.000000e+001.100000e+012.02.01.000000e+002.000000e+001.000000e+00
25%8.990000e+029.000000e+021.000000e+002.100000e+011.400000e+014.700000e+013.653680e-013.000000e+012.170000e+021.000000e+002.170000e+02433.0000005.216000e+035.000000e+005216.00000011.313708-1.1626471.00000063.0000038.0000009.00000037.0000004.00000010.0000009.08.0000000.02608338.00000093.00000097.00000087.00000030.00000044.0000004.000000105.00000035.00000045.00000015.0000007.000000103.0000005528.5000001.975700e+041.00000023.0000007.0000009.000000e+001.000000e+000.000000e+005.000000e+001.100000e+014.000000e+002.170000e+026.800000e+012.170000e+026.800000e+012.02.01.000000e+001.100000e+014.000000e+00
50%1.798000e+031.799000e+031.000000e+004.500000e+012.900000e+019.500000e+011.059719e+003.800000e+012.170000e+022.000000e+002.170000e+02442.0000007.179000e+031.100000e+016829.00000017.0880070.0000001.00000066.0000040.0000009.00000037.00000014.00000011.0000009.08.0000000.05393940.00000093.00000098.00000087.00000032.00000044.00000013.000000108.00000035.00000046.00000052.0000007.000000103.00000010650.0000006.923400e+041.00000024.0000007.0000001.900000e+011.000000e+001.000000e+001.300000e+011.100000e+012.400000e+012.200000e+022.140000e+022.200000e+022.140000e+022.02.01.000000e+001.100000e+012.400000e+01
75%2.700000e+032.701000e+032.000000e+006.800000e+014.400000e+011.430000e+021.737000e+004.200000e+018.520000e+024.000000e+008.570000e+024231.0000001.976700e+041.700000e+0119419.00000026.4196901.1958642.00000066.0000040.0000009.00000040.00000016.00000011.0000009.09.0000000.13206540.00000093.000000100.00000087.00000032.00000044.00000016.000000108.00000039.00000046.00000055.0000007.000000103.00000023791.0000002.666690e+053.00000024.0000007.0000003.000000e+013.000000e+002.000000e+002.300000e+013.700000e+013.900000e+018.650000e+022.140000e+029.010000e+022.140000e+022.02.01.000000e+003.700000e+013.900000e+01
max5.025000e+035.026000e+035.000000e+001.280000e+025.900000e+013.020000e+021.471906e+034.300000e+011.475000e+039.000000e+001.475000e+03312112.0000004.112500e+042.500000e+0141125.000000119.1994103.1415933.00000067.00000106.00000077.00000070.00000017.00000011.0000009.09.0000000.93174070.00000095.000000116.00000088.000000114.00000044.00000017.000000108.00000041.00000046.000000117.0000007.000000103.00000041125.0000003.752619e+064.00000024.0000007.0000001.060000e+021.300000e+018.000000e+003.800000e+017.200000e+014.400000e+011.475000e+032.550000e+021.475000e+032.420000e+022.02.03.300000e+017.200000e+014.400000e+01
\n", "
" ], "text/plain": [ " level_0 index_x period minute second \\\n", "count 3.158158e+06 3.158158e+06 3.158158e+06 3.158158e+06 3.158158e+06 \n", "mean 1.820498e+03 1.821498e+03 1.500939e+00 4.486634e+01 2.930872e+01 \n", "std 1.076392e+03 1.076392e+03 5.160235e-01 2.714136e+01 1.738708e+01 \n", "min 0.000000e+00 1.000000e+00 1.000000e+00 0.000000e+00 0.000000e+00 \n", "25% 8.990000e+02 9.000000e+02 1.000000e+00 2.100000e+01 1.400000e+01 \n", "50% 1.798000e+03 1.799000e+03 1.000000e+00 4.500000e+01 2.900000e+01 \n", "75% 2.700000e+03 2.701000e+03 2.000000e+00 6.800000e+01 4.400000e+01 \n", "max 5.025000e+03 5.026000e+03 5.000000e+00 1.280000e+02 5.900000e+01 \n", "\n", " possession duration type_id possession_team_id \\\n", "count 3.158158e+06 2.313994e+06 3.158158e+06 3.158158e+06 \n", "mean 9.664262e+01 1.273816e+00 3.236920e+01 4.930352e+02 \n", "std 5.767026e+01 2.148291e+00 1.213322e+01 3.640865e+02 \n", "min 1.000000e+00 -7.398828e+02 2.000000e+00 1.000000e+00 \n", "25% 4.700000e+01 3.653680e-01 3.000000e+01 2.170000e+02 \n", "50% 9.500000e+01 1.059719e+00 3.800000e+01 2.170000e+02 \n", "75% 1.430000e+02 1.737000e+00 4.200000e+01 8.520000e+02 \n", "max 3.020000e+02 1.471906e+03 4.300000e+01 1.475000e+03 \n", "\n", " play_pattern_id team_id tactics_formation player_id \\\n", "count 3.158158e+06 3.158158e+06 3301.000000 3.141590e+06 \n", "mean 2.823449e+00 4.976638e+02 4814.252348 1.263005e+04 \n", "std 2.198834e+00 3.655942e+02 11433.567582 8.832031e+03 \n", "min 1.000000e+00 1.000000e+00 55.000000 2.941000e+03 \n", "25% 1.000000e+00 2.170000e+02 433.000000 5.216000e+03 \n", "50% 2.000000e+00 2.170000e+02 442.000000 7.179000e+03 \n", "75% 4.000000e+00 8.570000e+02 4231.000000 1.976700e+04 \n", "max 9.000000e+00 1.475000e+03 312112.000000 4.112500e+04 \n", "\n", " position_id pass_recipient_id pass_length pass_angle \\\n", "count 3.141590e+06 809438.000000 871308.000000 871308.000000 \n", "mean 1.124376e+01 12222.931576 21.058518 0.013494 \n", "std 7.189082e+00 8679.003819 14.275584 1.542211 \n", "min 0.000000e+00 2941.000000 0.000000 -3.138562 \n", "25% 5.000000e+00 5216.000000 11.313708 -1.162647 \n", "50% 1.100000e+01 6829.000000 17.088007 0.000000 \n", "75% 1.700000e+01 19419.000000 26.419690 1.195864 \n", "max 2.500000e+01 41125.000000 119.199410 3.141593 \n", "\n", " pass_height_id pass_type_id pass_body_part_id pass_outcome_id \\\n", "count 871308.000000 171945.00000 819407.000000 185449.000000 \n", "mean 1.555189 65.13010 39.882497 19.264547 \n", "std 0.815164 1.91996 4.434959 24.014366 \n", "min 1.000000 61.00000 37.000000 9.000000 \n", "25% 1.000000 63.00000 38.000000 9.000000 \n", "50% 1.000000 66.00000 40.000000 9.000000 \n", "75% 2.000000 66.00000 40.000000 9.000000 \n", "max 3.000000 67.00000 106.000000 77.000000 \n", "\n", " clearance_body_part_id duel_outcome_id duel_type_id \\\n", "count 30932.000000 34423.000000 55407.000000 \n", "mean 38.253136 11.894199 10.621275 \n", "std 2.643092 4.937000 0.485074 \n", "min 37.000000 4.000000 10.000000 \n", "25% 37.000000 4.000000 10.000000 \n", "50% 37.000000 14.000000 11.000000 \n", "75% 40.000000 16.000000 11.000000 \n", "max 70.000000 17.000000 11.000000 \n", "\n", " ball_receipt_outcome_id dribble_outcome_id shot_statsbomb_xg \\\n", "count 123579.0 36494.000000 22357.000000 \n", "mean 9.0 8.381789 0.117009 \n", "std 0.0 0.485832 0.157306 \n", "min 9.0 8.000000 0.000000 \n", "25% 9.0 8.000000 0.026083 \n", "50% 9.0 8.000000 0.053939 \n", "75% 9.0 9.000000 0.132065 \n", "max 9.0 9.000000 0.931740 \n", "\n", " shot_body_part_id shot_technique_id shot_outcome_id shot_type_id \\\n", "count 22357.000000 22357.000000 22357.000000 22357.000000 \n", "mean 38.998166 92.906070 98.163394 85.528380 \n", "std 1.999809 0.830046 2.064860 5.919048 \n", "min 37.000000 89.000000 96.000000 61.000000 \n", "25% 38.000000 93.000000 97.000000 87.000000 \n", "50% 40.000000 93.000000 98.000000 87.000000 \n", "75% 40.000000 93.000000 100.000000 87.000000 \n", "max 70.000000 95.000000 116.000000 88.000000 \n", "\n", " goalkeeper_type_id goalkeeper_position_id interception_outcome_id \\\n", "count 26473.000000 22337.000000 16815.000000 \n", "mean 31.258868 43.852532 10.267023 \n", "std 6.652252 0.502779 5.258971 \n", "min 25.000000 42.000000 4.000000 \n", "25% 30.000000 44.000000 4.000000 \n", "50% 32.000000 44.000000 13.000000 \n", "75% 32.000000 44.000000 16.000000 \n", "max 114.000000 44.000000 17.000000 \n", "\n", " pass_technique_id goalkeeper_body_part_id goalkeeper_technique_id \\\n", "count 10304.000000 6448.000000 8660.000000 \n", "mean 106.536685 36.551179 45.561085 \n", "std 1.732251 2.272881 0.496283 \n", "min 104.000000 35.000000 45.000000 \n", "25% 105.000000 35.000000 45.000000 \n", "50% 108.000000 35.000000 46.000000 \n", "75% 108.000000 39.000000 46.000000 \n", "max 108.000000 41.000000 46.000000 \n", "\n", " goalkeeper_outcome_id foul_committed_card_id substitution_outcome_id \\\n", "count 12634.000000 2799.000000 4842.000000 \n", "mean 40.609387 6.931404 102.945477 \n", "std 20.157284 0.328984 0.227070 \n", "min 1.000000 5.000000 102.000000 \n", "25% 15.000000 7.000000 103.000000 \n", "50% 52.000000 7.000000 103.000000 \n", "75% 55.000000 7.000000 103.000000 \n", "max 117.000000 7.000000 103.000000 \n", "\n", " substitution_replacement_id match_id 50_50_outcome_id \\\n", "count 4847.000000 3.158158e+06 1366.000000 \n", "mean 14064.650505 4.397187e+05 2.036603 \n", "std 9347.389479 9.243830e+05 1.179858 \n", "min 2948.000000 7.430000e+03 1.000000 \n", "25% 5528.500000 1.975700e+04 1.000000 \n", "50% 10650.000000 6.923400e+04 1.000000 \n", "75% 23791.000000 2.666690e+05 3.000000 \n", "max 41125.000000 3.752619e+06 4.000000 \n", "\n", " foul_committed_type_id bad_behaviour_card_id index_y \\\n", "count 1575.000000 628.000000 3.158158e+06 \n", "mean 23.274286 6.939490 2.397784e+01 \n", "std 1.250034 0.318741 2.130848e+01 \n", "min 19.000000 5.000000 0.000000e+00 \n", "25% 23.000000 7.000000 9.000000e+00 \n", "50% 24.000000 7.000000 1.900000e+01 \n", "75% 24.000000 7.000000 3.000000e+01 \n", "max 24.000000 7.000000 1.060000e+02 \n", "\n", " home_score away_score match_week competition_competition_id \\\n", "count 3.158158e+06 3.158158e+06 3.158158e+06 3.158158e+06 \n", "mean 1.808959e+00 1.436360e+00 1.491716e+01 2.319544e+01 \n", "std 1.694212e+00 1.428223e+00 1.084382e+01 1.809714e+01 \n", "min 0.000000e+00 0.000000e+00 1.000000e+00 2.000000e+00 \n", "25% 1.000000e+00 0.000000e+00 5.000000e+00 1.100000e+01 \n", "50% 1.000000e+00 1.000000e+00 1.300000e+01 1.100000e+01 \n", "75% 3.000000e+00 2.000000e+00 2.300000e+01 3.700000e+01 \n", "max 1.300000e+01 8.000000e+00 3.800000e+01 7.200000e+01 \n", "\n", " season_season_id home_team_home_team_id home_team_country_id \\\n", "count 3.158158e+06 3.158158e+06 3.158158e+06 \n", "mean 2.205346e+01 5.127428e+02 1.671042e+02 \n", "std 1.553319e+01 3.683820e+02 6.943479e+01 \n", "min 1.000000e+00 1.000000e+00 1.100000e+01 \n", "25% 4.000000e+00 2.170000e+02 6.800000e+01 \n", "50% 2.400000e+01 2.200000e+02 2.140000e+02 \n", "75% 3.900000e+01 8.650000e+02 2.140000e+02 \n", "max 4.400000e+01 1.475000e+03 2.550000e+02 \n", "\n", " away_team_away_team_id away_team_country_id \\\n", "count 3.158158e+06 3.158158e+06 \n", "mean 5.100286e+02 1.666108e+02 \n", "std 3.717773e+02 7.005726e+01 \n", "min 1.000000e+00 1.100000e+01 \n", "25% 2.170000e+02 6.800000e+01 \n", "50% 2.200000e+02 2.140000e+02 \n", "75% 9.010000e+02 2.140000e+02 \n", "max 1.475000e+03 2.420000e+02 \n", "\n", " metadata_shot_fidelity_version metadata_xy_fidelity_version \\\n", "count 2494494.0 2154338.0 \n", "mean 2.0 2.0 \n", "std 0.0 0.0 \n", "min 2.0 2.0 \n", "25% 2.0 2.0 \n", "50% 2.0 2.0 \n", "75% 2.0 2.0 \n", "max 2.0 2.0 \n", "\n", " competition_stage_id competition_id season_id \n", "count 3.158158e+06 3.158158e+06 3.158158e+06 \n", "mean 2.563879e+00 2.319544e+01 2.205346e+01 \n", "std 5.538984e+00 1.809714e+01 1.553319e+01 \n", "min 1.000000e+00 2.000000e+00 1.000000e+00 \n", "25% 1.000000e+00 1.100000e+01 4.000000e+00 \n", "50% 1.000000e+00 1.100000e+01 2.400000e+01 \n", "75% 1.000000e+00 3.700000e+01 3.900000e+01 \n", "max 3.300000e+01 7.200000e+01 4.400000e+01 " ] }, "execution_count": 17, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# Description of the raw DataFrame, df_sb, showing some summary statistics for each numberical column in the DataFrame\n", "df_sb.describe()" ] }, { "cell_type": "code", "execution_count": 19, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "'\\n# Plot visualisation of the missing values for each feature of the raw DataFrame, df_sb\\nmsno.matrix(df_sb, figsize = (30, 7))\\n'" ] }, "execution_count": 19, "metadata": {}, "output_type": "execute_result" } ], "source": [ "\"\"\"\n", "# Plot visualisation of the missing values for each feature of the raw DataFrame, df_sb\n", "msno.matrix(df_sb, figsize = (30, 7))\n", "\"\"\"" ] }, { "cell_type": "code", "execution_count": 20, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "duration 844164\n", "tactics_formation 3154857\n", "tactics_lineup 3154857\n", "related_events 134286\n", "location 24733\n", " ... \n", "home_team_managers 340420\n", "away_team_away_team_group 2841295\n", "away_team_managers 340420\n", "metadata_shot_fidelity_version 663664\n", "metadata_xy_fidelity_version 1003820\n", "Length: 143, dtype: int64" ] }, "execution_count": 20, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# Counts of missing values\n", "null_value_stats = df_sb.isnull().sum(axis=0)\n", "null_value_stats[null_value_stats != 0]" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "The visualisation shows us that there are no missing values in the DataFrame." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "---\n", "\n", "## 4. Data Engineering\n", "Before conducting an [Exploratory Data Analysis (EDA)](#section5) of the data, we'll first need to clean and wrangle the datasets to a form that meet our needs." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### 4.1. Sort DataFrame\n", "Sort data by `match_date`, `kick_off`, and `period`, `timestamp`, as well as a few other attributes to be sure. Important for when determining previous events. which are attributes created for the DataFrame in the Data Engineering notebook." ] }, { "cell_type": "code", "execution_count": 26, "metadata": {}, "outputs": [], "source": [ "# Sort data by match_date, kick_off, period, timestamp, and a few other attributes to be sure\n", "df_sb = df_sb.sort_values(['match_date', 'kick_off', 'competition_name', 'season_name', 'home_team_home_team_name', 'away_team_away_team_name', 'period', 'timestamp', 'index_x'])" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### 4.2. Create Engineered Attributes" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "#### 4.2.1. Create `Team` and `Opponent` Attributes" ] }, { "cell_type": "code", "execution_count": 29, "metadata": {}, "outputs": [], "source": [ "df_sb['team'] = np.where(df_sb['team_name'] == df_sb['home_team_home_team_name'], df_sb['home_team_home_team_name'], df_sb['away_team_away_team_name'])\n", "df_sb['opponent'] = np.where(df_sb['team_name'] == df_sb['away_team_away_team_name'], df_sb['home_team_home_team_name'], df_sb['away_team_away_team_name'])" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "#### 4.2.2. Create `Full_Fixture_Date` Attribute" ] }, { "cell_type": "code", "execution_count": 31, "metadata": {}, "outputs": [], "source": [ "df_sb['full_fixture_date'] = df_sb['match_date'].astype(str) + ' ' + df_sb['home_team_home_team_name'].astype(str) + ' ' + df_sb['home_score'].astype(str) + ' ' + ' vs. ' + ' ' + df_sb['away_score'].astype(str) + ' ' + df_sb['away_team_away_team_name'].astype(str)" ] }, { "cell_type": "code", "execution_count": 32, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
level_0idindex_xperiodtimestampminutesecondpossessiondurationtype_idtype_namepossession_team_idpossession_team_nameplay_pattern_idplay_pattern_nameteam_idteam_nametactics_formationtactics_lineuprelated_eventslocationplayer_idplayer_nameposition_idposition_namepass_recipient_idpass_recipient_namepass_lengthpass_anglepass_height_idpass_height_namepass_end_locationpass_type_idpass_type_namepass_body_part_idpass_body_part_namecarry_end_locationpass_outcome_idpass_outcome_nameunder_pressureclearance_headclearance_body_part_idclearance_body_part_namecounterpressduel_outcome_idduel_outcome_nameduel_type_idduel_type_nameball_receipt_outcome_idball_receipt_outcome_nameoutclearance_left_footpass_switchoff_cameraclearance_aerial_wondribble_outcome_iddribble_outcome_namepass_crosspass_assisted_shot_idpass_shot_assistshot_statsbomb_xgshot_end_locationshot_key_pass_idshot_body_part_idshot_body_part_nameshot_technique_idshot_technique_nameshot_outcome_idshot_outcome_nameshot_type_idshot_type_nameshot_freeze_framegoalkeeper_end_locationgoalkeeper_type_idgoalkeeper_type_namegoalkeeper_position_idgoalkeeper_position_nameball_recovery_recovery_failurefoul_committed_advantagefoul_won_advantagedribble_overrunclearance_right_footinterception_outcome_idinterception_outcome_namefoul_won_defensivepass_aerial_wonpass_deflectedpass_inswingingpass_technique_idpass_technique_namegoalkeeper_body_part_idgoalkeeper_body_part_namegoalkeeper_technique_idgoalkeeper_technique_namegoalkeeper_outcome_idgoalkeeper_outcome_namepass_outswingingpass_goal_assistshot_one_on_onemiscontrol_aerial_wonshot_deflectedblock_deflectionshot_first_timeblock_offensivepass_through_ballfoul_committed_card_idfoul_committed_card_namefoul_committed_penaltyfoul_won_penaltydribble_nutmegpass_miscommunicationpass_no_touchfoul_committed_offensivegoalkeeper_lost_outpass_straightsubstitution_outcome_idsubstitution_outcome_namesubstitution_replacement_idsubstitution_replacement_namematch_idgoalkeeper_punched_outshot_aerial_wonpass_cut_backgoalkeeper_success_in_play50_50_outcome_id50_50_outcome_namefoul_committed_type_idfoul_committed_type_nameball_recovery_offensiveshot_saved_off_targetgoalkeeper_shot_saved_off_targetshot_open_goaldribble_no_touchbad_behaviour_card_idbad_behaviour_card_namehalf_start_late_video_startblock_save_blockshot_follows_dribbleclearance_othergoalkeeper_shot_saved_to_postshot_redirectinjury_stoppage_in_chainshot_saved_to_postgoalkeeper_success_outgoalkeeper_lost_in_playhalf_end_early_video_endplayer_off_permanentgoalkeeper_saved_to_postpass_backheelshot_kick_offgoalkeeper_penalty_saved_to_postindex_ymatch_datekick_offhome_scoreaway_scorematch_statuslast_updatedmatch_weekrefereestadiumcompetition_competition_idcompetition_country_namecompetition_competition_nameseason_season_idseason_season_namehome_team_home_team_idhome_team_home_team_namehome_team_home_team_genderhome_team_home_team_grouphome_team_managershome_team_country_idhome_team_country_nameaway_team_away_team_idaway_team_away_team_nameaway_team_away_team_genderaway_team_away_team_groupaway_team_managersaway_team_country_idaway_team_country_namemetadata_data_versionmetadata_shot_fidelity_versionmetadata_xy_fidelity_versioncompetition_stage_idcompetition_stage_namecompetition_idseason_idcountry_namecompetition_namecompetition_genderseason_namematch_updatedmatch_availableteamopponentfull_fixture_date
656440d78142c2-54c8-48fd-8346-67ab75d01a5e1100:00:00.0000010.00000035Starting XI1Arsenal1Regular Play1Arsenal442.0[{'player': {'id': 20015, 'name': 'Jens Lehman...NaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaN3749493NaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaN192003-08-1616:00:00.00021available2020-07-29T05:001{'id': 1279, 'name': 'None'}NaN2EnglandPremier League442003/20041ArsenalmaleNaNNaN68England29EvertonmaleNaNNaN68England1.1.02.02.01Regular Season244EnglandPremier Leaguemale2003/20042020-08-31T20:40:28.9696352020-08-31T20:40:28.969635ArsenalEverton2003-08-16 Arsenal 2 vs. 1 Everton
6564519815d71d-139d-430d-9c7a-5260db57773f2100:00:00.0000010.00000035Starting XI1Arsenal1Regular Play29Everton442.0[{'player': {'id': 40280, 'name': 'Richard Wri...NaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaN3749493NaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaN192003-08-1616:00:00.00021available2020-07-29T05:001{'id': 1279, 'name': 'None'}NaN2EnglandPremier League442003/20041ArsenalmaleNaNNaN68England29EvertonmaleNaNNaN68England1.1.02.02.01Regular Season244EnglandPremier Leaguemale2003/20042020-08-31T20:40:28.9696352020-08-31T20:40:28.969635EvertonArsenal2003-08-16 Arsenal 2 vs. 1 Everton
656462d9b7e5eb-8235-4295-84e9-db9d84b847ee3100:00:00.0000010.00000018Half Start1Arsenal1Regular Play1ArsenalNaNNaN['c1d423be-aee9-4e1b-a6d5-ec99ed7a0551']NaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaN3749493NaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaN192003-08-1616:00:00.00021available2020-07-29T05:001{'id': 1279, 'name': 'None'}NaN2EnglandPremier League442003/20041ArsenalmaleNaNNaN68England29EvertonmaleNaNNaN68England1.1.02.02.01Regular Season244EnglandPremier Leaguemale2003/20042020-08-31T20:40:28.9696352020-08-31T20:40:28.969635ArsenalEverton2003-08-16 Arsenal 2 vs. 1 Everton
656473c1d423be-aee9-4e1b-a6d5-ec99ed7a05514100:00:00.0000010.00000018Half Start1Arsenal1Regular Play29EvertonNaNNaN['d9b7e5eb-8235-4295-84e9-db9d84b847ee']NaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaN3749493NaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaN192003-08-1616:00:00.00021available2020-07-29T05:001{'id': 1279, 'name': 'None'}NaN2EnglandPremier League442003/20041ArsenalmaleNaNNaN68England29EvertonmaleNaNNaN68England1.1.02.02.01Regular Season244EnglandPremier Leaguemale2003/20042020-08-31T20:40:28.9696352020-08-31T20:40:28.969635EvertonArsenal2003-08-16 Arsenal 2 vs. 1 Everton
656484729957b9-d479-49ab-995f-608a19177be55100:00:00.9830021.27863430Pass1Arsenal9From Kick Off1ArsenalNaNNaN['1deff0f2-ee63-4951-90ba-f8a8ff399960'][60.0, 40.0]15512.0Sylvain Wiltord22.0Right Center Forward15515.0Patrick Vieira11.294689-2.789041.0Ground Pass[49.4, 36.1]65.0Kick Off40.0Right FootNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaN3749493NaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaN192003-08-1616:00:00.00021available2020-07-29T05:001{'id': 1279, 'name': 'None'}NaN2EnglandPremier League442003/20041ArsenalmaleNaNNaN68England29EvertonmaleNaNNaN68England1.1.02.02.01Regular Season244EnglandPremier Leaguemale2003/20042020-08-31T20:40:28.9696352020-08-31T20:40:28.969635ArsenalEverton2003-08-16 Arsenal 2 vs. 1 Everton
\n", "
" ], "text/plain": [ " level_0 id index_x period \\\n", "65644 0 d78142c2-54c8-48fd-8346-67ab75d01a5e 1 1 \n", "65645 1 9815d71d-139d-430d-9c7a-5260db57773f 2 1 \n", "65646 2 d9b7e5eb-8235-4295-84e9-db9d84b847ee 3 1 \n", "65647 3 c1d423be-aee9-4e1b-a6d5-ec99ed7a0551 4 1 \n", "65648 4 729957b9-d479-49ab-995f-608a19177be5 5 1 \n", "\n", " timestamp minute second possession duration type_id \\\n", "65644 00:00:00.000 0 0 1 0.000000 35 \n", "65645 00:00:00.000 0 0 1 0.000000 35 \n", "65646 00:00:00.000 0 0 1 0.000000 18 \n", "65647 00:00:00.000 0 0 1 0.000000 18 \n", "65648 00:00:00.983 0 0 2 1.278634 30 \n", "\n", " type_name possession_team_id possession_team_name play_pattern_id \\\n", "65644 Starting XI 1 Arsenal 1 \n", "65645 Starting XI 1 Arsenal 1 \n", "65646 Half Start 1 Arsenal 1 \n", "65647 Half Start 1 Arsenal 1 \n", "65648 Pass 1 Arsenal 9 \n", "\n", " play_pattern_name team_id team_name tactics_formation \\\n", "65644 Regular Play 1 Arsenal 442.0 \n", "65645 Regular Play 29 Everton 442.0 \n", "65646 Regular Play 1 Arsenal NaN \n", "65647 Regular Play 29 Everton NaN \n", "65648 From Kick Off 1 Arsenal NaN \n", "\n", " tactics_lineup \\\n", "65644 [{'player': {'id': 20015, 'name': 'Jens Lehman... \n", "65645 [{'player': {'id': 40280, 'name': 'Richard Wri... \n", "65646 NaN \n", "65647 NaN \n", "65648 NaN \n", "\n", " related_events location player_id \\\n", "65644 NaN NaN NaN \n", "65645 NaN NaN NaN \n", "65646 ['c1d423be-aee9-4e1b-a6d5-ec99ed7a0551'] NaN NaN \n", "65647 ['d9b7e5eb-8235-4295-84e9-db9d84b847ee'] NaN NaN \n", "65648 ['1deff0f2-ee63-4951-90ba-f8a8ff399960'] [60.0, 40.0] 15512.0 \n", "\n", " player_name position_id position_name pass_recipient_id \\\n", "65644 NaN NaN NaN NaN \n", "65645 NaN NaN NaN NaN \n", "65646 NaN NaN NaN NaN \n", "65647 NaN NaN NaN NaN \n", "65648 Sylvain Wiltord 22.0 Right Center Forward 15515.0 \n", "\n", " pass_recipient_name pass_length pass_angle pass_height_id \\\n", "65644 NaN NaN NaN NaN \n", "65645 NaN NaN NaN NaN \n", "65646 NaN NaN NaN NaN \n", "65647 NaN NaN NaN NaN \n", "65648 Patrick Vieira 11.294689 -2.78904 1.0 \n", "\n", " pass_height_name pass_end_location pass_type_id pass_type_name \\\n", "65644 NaN NaN NaN NaN \n", "65645 NaN NaN NaN NaN \n", "65646 NaN NaN NaN NaN \n", "65647 NaN NaN NaN NaN \n", "65648 Ground Pass [49.4, 36.1] 65.0 Kick Off \n", "\n", " pass_body_part_id pass_body_part_name carry_end_location \\\n", "65644 NaN NaN NaN \n", "65645 NaN NaN NaN \n", "65646 NaN NaN NaN \n", "65647 NaN NaN NaN \n", "65648 40.0 Right Foot NaN \n", "\n", " pass_outcome_id pass_outcome_name under_pressure clearance_head \\\n", "65644 NaN NaN NaN NaN \n", "65645 NaN NaN NaN NaN \n", "65646 NaN NaN NaN NaN \n", "65647 NaN NaN NaN NaN \n", "65648 NaN NaN NaN NaN \n", "\n", " clearance_body_part_id clearance_body_part_name counterpress \\\n", "65644 NaN NaN NaN \n", "65645 NaN NaN NaN \n", "65646 NaN NaN NaN \n", "65647 NaN NaN NaN \n", "65648 NaN NaN NaN \n", "\n", " duel_outcome_id duel_outcome_name duel_type_id duel_type_name \\\n", "65644 NaN NaN NaN NaN \n", "65645 NaN NaN NaN NaN \n", "65646 NaN NaN NaN NaN \n", "65647 NaN NaN NaN NaN \n", "65648 NaN NaN NaN NaN \n", "\n", " ball_receipt_outcome_id ball_receipt_outcome_name out \\\n", "65644 NaN NaN NaN \n", "65645 NaN NaN NaN \n", "65646 NaN NaN NaN \n", "65647 NaN NaN NaN \n", "65648 NaN NaN NaN \n", "\n", " clearance_left_foot pass_switch off_camera clearance_aerial_won \\\n", "65644 NaN NaN NaN NaN \n", "65645 NaN NaN NaN NaN \n", "65646 NaN NaN NaN NaN \n", "65647 NaN NaN NaN NaN \n", "65648 NaN NaN NaN NaN \n", "\n", " dribble_outcome_id dribble_outcome_name pass_cross \\\n", "65644 NaN NaN NaN \n", "65645 NaN NaN NaN \n", "65646 NaN NaN NaN \n", "65647 NaN NaN NaN \n", "65648 NaN NaN NaN \n", "\n", " pass_assisted_shot_id pass_shot_assist shot_statsbomb_xg \\\n", "65644 NaN NaN NaN \n", "65645 NaN NaN NaN \n", "65646 NaN NaN NaN \n", "65647 NaN NaN NaN \n", "65648 NaN NaN NaN \n", "\n", " shot_end_location shot_key_pass_id shot_body_part_id \\\n", "65644 NaN NaN NaN \n", "65645 NaN NaN NaN \n", "65646 NaN NaN NaN \n", "65647 NaN NaN NaN \n", "65648 NaN NaN NaN \n", "\n", " shot_body_part_name shot_technique_id shot_technique_name \\\n", "65644 NaN NaN NaN \n", "65645 NaN NaN NaN \n", "65646 NaN NaN NaN \n", "65647 NaN NaN NaN \n", "65648 NaN NaN NaN \n", "\n", " shot_outcome_id shot_outcome_name shot_type_id shot_type_name \\\n", "65644 NaN NaN NaN NaN \n", "65645 NaN NaN NaN NaN \n", "65646 NaN NaN NaN NaN \n", "65647 NaN NaN NaN NaN \n", "65648 NaN NaN NaN NaN \n", "\n", " shot_freeze_frame goalkeeper_end_location goalkeeper_type_id \\\n", "65644 NaN NaN NaN \n", "65645 NaN NaN NaN \n", "65646 NaN NaN NaN \n", "65647 NaN NaN NaN \n", "65648 NaN NaN NaN \n", "\n", " goalkeeper_type_name goalkeeper_position_id goalkeeper_position_name \\\n", "65644 NaN NaN NaN \n", "65645 NaN NaN NaN \n", "65646 NaN NaN NaN \n", "65647 NaN NaN NaN \n", "65648 NaN NaN NaN \n", "\n", " ball_recovery_recovery_failure foul_committed_advantage \\\n", "65644 NaN NaN \n", "65645 NaN NaN \n", "65646 NaN NaN \n", "65647 NaN NaN \n", "65648 NaN NaN \n", "\n", " foul_won_advantage dribble_overrun clearance_right_foot \\\n", "65644 NaN NaN NaN \n", "65645 NaN NaN NaN \n", "65646 NaN NaN NaN \n", "65647 NaN NaN NaN \n", "65648 NaN NaN NaN \n", "\n", " interception_outcome_id interception_outcome_name foul_won_defensive \\\n", "65644 NaN NaN NaN \n", "65645 NaN NaN NaN \n", "65646 NaN NaN NaN \n", "65647 NaN NaN NaN \n", "65648 NaN NaN NaN \n", "\n", " pass_aerial_won pass_deflected pass_inswinging pass_technique_id \\\n", "65644 NaN NaN NaN NaN \n", "65645 NaN NaN NaN NaN \n", "65646 NaN NaN NaN NaN \n", "65647 NaN NaN NaN NaN \n", "65648 NaN NaN NaN NaN \n", "\n", " pass_technique_name goalkeeper_body_part_id goalkeeper_body_part_name \\\n", "65644 NaN NaN NaN \n", "65645 NaN NaN NaN \n", "65646 NaN NaN NaN \n", "65647 NaN NaN NaN \n", "65648 NaN NaN NaN \n", "\n", " goalkeeper_technique_id goalkeeper_technique_name \\\n", "65644 NaN NaN \n", "65645 NaN NaN \n", "65646 NaN NaN \n", "65647 NaN NaN \n", "65648 NaN NaN \n", "\n", " goalkeeper_outcome_id goalkeeper_outcome_name pass_outswinging \\\n", "65644 NaN NaN NaN \n", "65645 NaN NaN NaN \n", "65646 NaN NaN NaN \n", "65647 NaN NaN NaN \n", "65648 NaN NaN NaN \n", "\n", " pass_goal_assist shot_one_on_one miscontrol_aerial_won shot_deflected \\\n", "65644 NaN NaN NaN NaN \n", "65645 NaN NaN NaN NaN \n", "65646 NaN NaN NaN NaN \n", "65647 NaN NaN NaN NaN \n", "65648 NaN NaN NaN NaN \n", "\n", " block_deflection shot_first_time block_offensive pass_through_ball \\\n", "65644 NaN NaN NaN NaN \n", "65645 NaN NaN NaN NaN \n", "65646 NaN NaN NaN NaN \n", "65647 NaN NaN NaN NaN \n", "65648 NaN NaN NaN NaN \n", "\n", " foul_committed_card_id foul_committed_card_name foul_committed_penalty \\\n", "65644 NaN NaN NaN \n", "65645 NaN NaN NaN \n", "65646 NaN NaN NaN \n", "65647 NaN NaN NaN \n", "65648 NaN NaN NaN \n", "\n", " foul_won_penalty dribble_nutmeg pass_miscommunication pass_no_touch \\\n", "65644 NaN NaN NaN NaN \n", "65645 NaN NaN NaN NaN \n", "65646 NaN NaN NaN NaN \n", "65647 NaN NaN NaN NaN \n", "65648 NaN NaN NaN NaN \n", "\n", " foul_committed_offensive goalkeeper_lost_out pass_straight \\\n", "65644 NaN NaN NaN \n", "65645 NaN NaN NaN \n", "65646 NaN NaN NaN \n", "65647 NaN NaN NaN \n", "65648 NaN NaN NaN \n", "\n", " substitution_outcome_id substitution_outcome_name \\\n", "65644 NaN NaN \n", "65645 NaN NaN \n", "65646 NaN NaN \n", "65647 NaN NaN \n", "65648 NaN NaN \n", "\n", " substitution_replacement_id substitution_replacement_name match_id \\\n", "65644 NaN NaN 3749493 \n", "65645 NaN NaN 3749493 \n", "65646 NaN NaN 3749493 \n", "65647 NaN NaN 3749493 \n", "65648 NaN NaN 3749493 \n", "\n", " goalkeeper_punched_out shot_aerial_won pass_cut_back \\\n", "65644 NaN NaN NaN \n", "65645 NaN NaN NaN \n", "65646 NaN NaN NaN \n", "65647 NaN NaN NaN \n", "65648 NaN NaN NaN \n", "\n", " goalkeeper_success_in_play 50_50_outcome_id 50_50_outcome_name \\\n", "65644 NaN NaN NaN \n", "65645 NaN NaN NaN \n", "65646 NaN NaN NaN \n", "65647 NaN NaN NaN \n", "65648 NaN NaN NaN \n", "\n", " foul_committed_type_id foul_committed_type_name \\\n", "65644 NaN NaN \n", "65645 NaN NaN \n", "65646 NaN NaN \n", "65647 NaN NaN \n", "65648 NaN NaN \n", "\n", " ball_recovery_offensive shot_saved_off_target \\\n", "65644 NaN NaN \n", "65645 NaN NaN \n", "65646 NaN NaN \n", "65647 NaN NaN \n", "65648 NaN NaN \n", "\n", " goalkeeper_shot_saved_off_target shot_open_goal dribble_no_touch \\\n", "65644 NaN NaN NaN \n", "65645 NaN NaN NaN \n", "65646 NaN NaN NaN \n", "65647 NaN NaN NaN \n", "65648 NaN NaN NaN \n", "\n", " bad_behaviour_card_id bad_behaviour_card_name \\\n", "65644 NaN NaN \n", "65645 NaN NaN \n", "65646 NaN NaN \n", "65647 NaN NaN \n", "65648 NaN NaN \n", "\n", " half_start_late_video_start block_save_block shot_follows_dribble \\\n", "65644 NaN NaN NaN \n", "65645 NaN NaN NaN \n", "65646 NaN NaN NaN \n", "65647 NaN NaN NaN \n", "65648 NaN NaN NaN \n", "\n", " clearance_other goalkeeper_shot_saved_to_post shot_redirect \\\n", "65644 NaN NaN NaN \n", "65645 NaN NaN NaN \n", "65646 NaN NaN NaN \n", "65647 NaN NaN NaN \n", "65648 NaN NaN NaN \n", "\n", " injury_stoppage_in_chain shot_saved_to_post goalkeeper_success_out \\\n", "65644 NaN NaN NaN \n", "65645 NaN NaN NaN \n", "65646 NaN NaN NaN \n", "65647 NaN NaN NaN \n", "65648 NaN NaN NaN \n", "\n", " goalkeeper_lost_in_play half_end_early_video_end player_off_permanent \\\n", "65644 NaN NaN NaN \n", "65645 NaN NaN NaN \n", "65646 NaN NaN NaN \n", "65647 NaN NaN NaN \n", "65648 NaN NaN NaN \n", "\n", " goalkeeper_saved_to_post pass_backheel shot_kick_off \\\n", "65644 NaN NaN NaN \n", "65645 NaN NaN NaN \n", "65646 NaN NaN NaN \n", "65647 NaN NaN NaN \n", "65648 NaN NaN NaN \n", "\n", " goalkeeper_penalty_saved_to_post index_y match_date kick_off \\\n", "65644 NaN 19 2003-08-16 16:00:00.000 \n", "65645 NaN 19 2003-08-16 16:00:00.000 \n", "65646 NaN 19 2003-08-16 16:00:00.000 \n", "65647 NaN 19 2003-08-16 16:00:00.000 \n", "65648 NaN 19 2003-08-16 16:00:00.000 \n", "\n", " home_score away_score match_status last_updated match_week \\\n", "65644 2 1 available 2020-07-29T05:00 1 \n", "65645 2 1 available 2020-07-29T05:00 1 \n", "65646 2 1 available 2020-07-29T05:00 1 \n", "65647 2 1 available 2020-07-29T05:00 1 \n", "65648 2 1 available 2020-07-29T05:00 1 \n", "\n", " referee stadium competition_competition_id \\\n", "65644 {'id': 1279, 'name': 'None'} NaN 2 \n", "65645 {'id': 1279, 'name': 'None'} NaN 2 \n", "65646 {'id': 1279, 'name': 'None'} NaN 2 \n", "65647 {'id': 1279, 'name': 'None'} NaN 2 \n", "65648 {'id': 1279, 'name': 'None'} NaN 2 \n", "\n", " competition_country_name competition_competition_name season_season_id \\\n", "65644 England Premier League 44 \n", "65645 England Premier League 44 \n", "65646 England Premier League 44 \n", "65647 England Premier League 44 \n", "65648 England Premier League 44 \n", "\n", " season_season_name home_team_home_team_id home_team_home_team_name \\\n", "65644 2003/2004 1 Arsenal \n", "65645 2003/2004 1 Arsenal \n", "65646 2003/2004 1 Arsenal \n", "65647 2003/2004 1 Arsenal \n", "65648 2003/2004 1 Arsenal \n", "\n", " home_team_home_team_gender home_team_home_team_group home_team_managers \\\n", "65644 male NaN NaN \n", "65645 male NaN NaN \n", "65646 male NaN NaN \n", "65647 male NaN NaN \n", "65648 male NaN NaN \n", "\n", " home_team_country_id home_team_country_name away_team_away_team_id \\\n", "65644 68 England 29 \n", "65645 68 England 29 \n", "65646 68 England 29 \n", "65647 68 England 29 \n", "65648 68 England 29 \n", "\n", " away_team_away_team_name away_team_away_team_gender \\\n", "65644 Everton male \n", "65645 Everton male \n", "65646 Everton male \n", "65647 Everton male \n", "65648 Everton male \n", "\n", " away_team_away_team_group away_team_managers away_team_country_id \\\n", "65644 NaN NaN 68 \n", "65645 NaN NaN 68 \n", "65646 NaN NaN 68 \n", "65647 NaN NaN 68 \n", "65648 NaN NaN 68 \n", "\n", " away_team_country_name metadata_data_version \\\n", "65644 England 1.1.0 \n", "65645 England 1.1.0 \n", "65646 England 1.1.0 \n", "65647 England 1.1.0 \n", "65648 England 1.1.0 \n", "\n", " metadata_shot_fidelity_version metadata_xy_fidelity_version \\\n", "65644 2.0 2.0 \n", "65645 2.0 2.0 \n", "65646 2.0 2.0 \n", "65647 2.0 2.0 \n", "65648 2.0 2.0 \n", "\n", " competition_stage_id competition_stage_name competition_id season_id \\\n", "65644 1 Regular Season 2 44 \n", "65645 1 Regular Season 2 44 \n", "65646 1 Regular Season 2 44 \n", "65647 1 Regular Season 2 44 \n", "65648 1 Regular Season 2 44 \n", "\n", " country_name competition_name competition_gender season_name \\\n", "65644 England Premier League male 2003/2004 \n", "65645 England Premier League male 2003/2004 \n", "65646 England Premier League male 2003/2004 \n", "65647 England Premier League male 2003/2004 \n", "65648 England Premier League male 2003/2004 \n", "\n", " match_updated match_available team \\\n", "65644 2020-08-31T20:40:28.969635 2020-08-31T20:40:28.969635 Arsenal \n", "65645 2020-08-31T20:40:28.969635 2020-08-31T20:40:28.969635 Everton \n", "65646 2020-08-31T20:40:28.969635 2020-08-31T20:40:28.969635 Arsenal \n", "65647 2020-08-31T20:40:28.969635 2020-08-31T20:40:28.969635 Everton \n", "65648 2020-08-31T20:40:28.969635 2020-08-31T20:40:28.969635 Arsenal \n", "\n", " opponent full_fixture_date \n", "65644 Everton 2003-08-16 Arsenal 2 vs. 1 Everton \n", "65645 Arsenal 2003-08-16 Arsenal 2 vs. 1 Everton \n", "65646 Everton 2003-08-16 Arsenal 2 vs. 1 Everton \n", "65647 Arsenal 2003-08-16 Arsenal 2 vs. 1 Everton \n", "65648 Everton 2003-08-16 Arsenal 2 vs. 1 Everton " ] }, "execution_count": 32, "metadata": {}, "output_type": "execute_result" } ], "source": [ "df_sb.head()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### 4.3. Subset DataFrame\n", "Subset DataFrame into\n", "- In-play Events only\n", "- Lineups - Starting XI\n", "- Tactical Changes\n", "- Halves" ] }, { "cell_type": "code", "execution_count": 34, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "['50/50',\n", " 'Bad Behaviour',\n", " 'Ball Receipt*',\n", " 'Ball Recovery',\n", " 'Block',\n", " 'Camera On',\n", " 'Camera off',\n", " 'Carry',\n", " 'Clearance',\n", " 'Dispossessed',\n", " 'Dribble',\n", " 'Dribbled Past',\n", " 'Duel',\n", " 'Error',\n", " 'Foul Committed',\n", " 'Foul Won',\n", " 'Goal Keeper',\n", " 'Half End',\n", " 'Half Start',\n", " 'Injury Stoppage',\n", " 'Interception',\n", " 'Miscontrol',\n", " 'Offside',\n", " 'Own Goal Against',\n", " 'Own Goal For',\n", " 'Pass',\n", " 'Player Off',\n", " 'Player On',\n", " 'Pressure',\n", " 'Referee Ball-Drop',\n", " 'Shield',\n", " 'Shot',\n", " 'Starting XI',\n", " 'Substitution',\n", " 'Tactical Shift']" ] }, "execution_count": 34, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# List unique values in the df_sb['type_name'] column\n", "sorted(df_sb['type_name'].unique())" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "#### 4.3.1. Isolate In-Play Events\n", "DataFrame of only player's actions i.e. removing line ups, halves, etc." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "##### 4.3.1.1. Remove Non-Event rows" ] }, { "cell_type": "code", "execution_count": 35, "metadata": {}, "outputs": [], "source": [ "lst_events = ['50/50',\n", " 'Bad Behaviour',\n", " 'Ball Receipt*',\n", " 'Ball Recovery',\n", " 'Block',\n", " 'Carry',\n", " 'Clearance',\n", " 'Dispossessed',\n", " 'Dribble',\n", " 'Dribbled Past',\n", " 'Duel',\n", " 'Error',\n", " 'Foul Committed',\n", " 'Foul Won',\n", " 'Goal Keeper',\n", " 'Interception',\n", " 'Miscontrol',\n", " 'Offside',\n", " 'Own Goal Against',\n", " 'Own Goal For',\n", " 'Pass',\n", " 'Pressure',\n", " 'Shield',\n", " 'Shot',\n", " ]" ] }, { "cell_type": "code", "execution_count": 36, "metadata": {}, "outputs": [], "source": [ "df_sb_events = df_sb[df_sb['type_name'].isin(lst_events)]" ] }, { "cell_type": "code", "execution_count": 37, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "(3133322, 196)" ] }, "execution_count": 37, "metadata": {}, "output_type": "execute_result" } ], "source": [ "df_sb_events.shape" ] }, { "cell_type": "code", "execution_count": 39, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "(3158158, 196)" ] }, "execution_count": 39, "metadata": {}, "output_type": "execute_result" } ], "source": [ "df_sb.shape" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "##### 4.4.1.2. Break down all `location` attributes into seperate attribute for X, Y (and sometimes Z) coordinates" ] }, { "cell_type": "code", "execution_count": 40, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "location\n", "pass_end_location\n", "carry_end_location\n", "shot_end_location\n", "goalkeeper_end_location\n" ] } ], "source": [ "# Display all location columns\n", "for col in df_sb_events.columns:\n", " if 'location' in col:\n", " print(col)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "There are the following five 'location' attributes:\n", "- `location`\n", "- `pass.end_location`\n", "- `carry.end_location`\n", "- `shot.end_location`\n", "- `goalkeeper.end_location`\n", "\n", "From reviewing the official documentation [[link](https://statsbomb.com/stat-definitions/)], the five attributes have the following dimensionality:\n", "- `location` [x, y]\n", "- `pass.end_location` [x, y]\n", "- `carry.end_location` [x, y]\n", "- `shot.end_location` [x, y, z]\n", "- `goalkeeper.end_location` [x, y]" ] }, { "cell_type": "code", "execution_count": 44, "metadata": { "scrolled": true }, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
level_0idindex_xperiodtimestampminutesecondpossessiondurationtype_idtype_namepossession_team_idpossession_team_nameplay_pattern_idplay_pattern_nameteam_idteam_nametactics_formationtactics_lineuprelated_eventslocationplayer_idplayer_nameposition_idposition_namepass_recipient_idpass_recipient_namepass_lengthpass_anglepass_height_idpass_height_namepass_end_locationpass_type_idpass_type_namepass_body_part_idpass_body_part_namecarry_end_locationpass_outcome_idpass_outcome_nameunder_pressureclearance_headclearance_body_part_idclearance_body_part_namecounterpressduel_outcome_idduel_outcome_nameduel_type_idduel_type_nameball_receipt_outcome_idball_receipt_outcome_nameoutclearance_left_footpass_switchoff_cameraclearance_aerial_wondribble_outcome_iddribble_outcome_namepass_crosspass_assisted_shot_idpass_shot_assistshot_statsbomb_xgshot_end_locationshot_key_pass_idshot_body_part_idshot_body_part_nameshot_technique_idshot_technique_nameshot_outcome_idshot_outcome_nameshot_type_idshot_type_nameshot_freeze_framegoalkeeper_end_locationgoalkeeper_type_idgoalkeeper_type_namegoalkeeper_position_idgoalkeeper_position_nameball_recovery_recovery_failurefoul_committed_advantagefoul_won_advantagedribble_overrunclearance_right_footinterception_outcome_idinterception_outcome_namefoul_won_defensivepass_aerial_wonpass_deflectedpass_inswingingpass_technique_idpass_technique_namegoalkeeper_body_part_idgoalkeeper_body_part_namegoalkeeper_technique_idgoalkeeper_technique_namegoalkeeper_outcome_idgoalkeeper_outcome_namepass_outswingingpass_goal_assistshot_one_on_onemiscontrol_aerial_wonshot_deflectedblock_deflectionshot_first_timeblock_offensivepass_through_ballfoul_committed_card_idfoul_committed_card_namefoul_committed_penaltyfoul_won_penaltydribble_nutmegpass_miscommunicationpass_no_touchfoul_committed_offensivegoalkeeper_lost_outpass_straightsubstitution_outcome_idsubstitution_outcome_namesubstitution_replacement_idsubstitution_replacement_namematch_idgoalkeeper_punched_outshot_aerial_wonpass_cut_backgoalkeeper_success_in_play50_50_outcome_id50_50_outcome_namefoul_committed_type_idfoul_committed_type_nameball_recovery_offensiveshot_saved_off_targetgoalkeeper_shot_saved_off_targetshot_open_goaldribble_no_touchbad_behaviour_card_idbad_behaviour_card_namehalf_start_late_video_startblock_save_blockshot_follows_dribbleclearance_othergoalkeeper_shot_saved_to_postshot_redirectinjury_stoppage_in_chainshot_saved_to_postgoalkeeper_success_outgoalkeeper_lost_in_playhalf_end_early_video_endplayer_off_permanentgoalkeeper_saved_to_postpass_backheelshot_kick_offgoalkeeper_penalty_saved_to_postindex_ymatch_datekick_offhome_scoreaway_scorematch_statuslast_updatedmatch_weekrefereestadiumcompetition_competition_idcompetition_country_namecompetition_competition_nameseason_season_idseason_season_namehome_team_home_team_idhome_team_home_team_namehome_team_home_team_genderhome_team_home_team_grouphome_team_managershome_team_country_idhome_team_country_nameaway_team_away_team_idaway_team_away_team_nameaway_team_away_team_genderaway_team_away_team_groupaway_team_managersaway_team_country_idaway_team_country_namemetadata_data_versionmetadata_shot_fidelity_versionmetadata_xy_fidelity_versioncompetition_stage_idcompetition_stage_namecompetition_idseason_idcountry_namecompetition_namecompetition_genderseason_namematch_updatedmatch_availableteamopponentfull_fixture_datelocation_xlocation_ypass_end_location_xpass_end_location_ycarry_end_location_xcarry_end_location_yshot_end_location_xshot_end_location_yshot_end_location_zgoalkeeper_end_location_xgoalkeeper_end_location_y
6582217852e9cf2c-e406-48f0-b950-26acbfbf18a8179100:03:51.13435191.75328916Shot1Arsenal1Regular Play1ArsenalNaNNaN['e92d30d5-dc0a-4c0c-830e-a45076d77f71']91.5, 37.115512.0Sylvain Wiltord22.0Right Center ForwardNaNNaNNaNNaNNaNNaNnanNaNNaNNaNNaNnanNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaN0.022911120.0, 26.7, 6.2282abb6d-2f41-46bd-ba22-a411ce0d7a8c38.0Left Foot93.0Normal98.0Off T87.0Open Play[{'location': [85.1, 52.6], 'player': {'id': 4...nanNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaN3749493NaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaN192003-08-1616:00:00.00021available2020-07-29T05:001{'id': 1279, 'name': 'None'}NaN2EnglandPremier League442003/20041ArsenalmaleNaNNaN68England29EvertonmaleNaNNaN68England1.1.02.02.01Regular Season244EnglandPremier Leaguemale2003/20042020-08-31T20:40:28.9696352020-08-31T20:40:28.969635ArsenalEverton2003-08-16 Arsenal 2 vs. 1 Everton91.537.1nanNaNnanNaN120.026.76.2nanNaN
6583118795f3617d-e00d-4e68-aad3-3566a19583ae188100:04:23.834423101.78639516Shot29Everton7From Goal Kick29EvertonNaNNaN['650321cc-f4b8-4f43-a9c6-c3f175290901', '84ee...80.7, 28.440289.0Mark Pembridge16.0Left MidfieldNaNNaNNaNNaNNaNNaNnanNaNNaNNaNNaNnanNaNNaNTrueNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaN0.006424118.6, 42.5, 2.1NaN38.0Left Foot91.0Half Volley100.0Saved87.0Open Play[{'location': [81.0, 31.5], 'player': {'id': 4...nanNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaN3749493NaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaN192003-08-1616:00:00.00021available2020-07-29T05:001{'id': 1279, 'name': 'None'}NaN2EnglandPremier League442003/20041ArsenalmaleNaNNaN68England29EvertonmaleNaNNaN68England1.1.02.02.01Regular Season244EnglandPremier Leaguemale2003/20042020-08-31T20:40:28.9696352020-08-31T20:40:28.969635EvertonArsenal2003-08-16 Arsenal 2 vs. 1 Everton80.728.4nanNaNnanNaN118.642.52.1nanNaN
659212777a82b711-af7e-40c6-b895-3d79e28c7f5f278100:06:10.511610160.45236816Shot29Everton1Regular Play29EvertonNaNNaN['e2445ac4-39cc-44c4-ae48-c3ce3fd51128']111.7, 39.340283.0Nick Chadwick24.0Left Center ForwardNaNNaNNaNNaNNaNNaNnanNaNNaNNaNNaNnanNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaN0.277126117.5, 42.1, 0.23925e6b6-525c-4738-b710-46e47c825ae640.0Right Foot93.0Normal100.0Saved87.0Open Play[{'location': [101.9, 32.2], 'player': {'id': ...nanNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNTrueNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaN3749493NaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaN192003-08-1616:00:00.00021available2020-07-29T05:001{'id': 1279, 'name': 'None'}NaN2EnglandPremier League442003/20041ArsenalmaleNaNNaN68England29EvertonmaleNaNNaN68England1.1.02.02.01Regular Season244EnglandPremier Leaguemale2003/20042020-08-31T20:40:28.9696352020-08-31T20:40:28.969635EvertonArsenal2003-08-16 Arsenal 2 vs. 1 Everton111.739.3nanNaNnanNaN117.542.10.2nanNaN
65925281bfc075ba-5b6b-4f02-9027-2c59afcc13fd282100:06:14.029614160.28183316Shot29Everton1Regular Play29EvertonNaNNaN['47022283-c052-42da-ba2e-c85f76e4ccb4', '4ac9...109.8, 23.940289.0Mark Pembridge16.0Left MidfieldNaNNaNNaNNaNNaNNaNnanNaNNaNNaNNaNnanNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaN0.018100110.5, 25.0NaN38.0Left Foot95.0Volley96.0Blocked87.0Open Play[{'location': [119.0, 37.1], 'player': {'id': ...nanNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNTrueNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaN3749493NaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaN192003-08-1616:00:00.00021available2020-07-29T05:001{'id': 1279, 'name': 'None'}NaN2EnglandPremier League442003/20041ArsenalmaleNaNNaN68England29EvertonmaleNaNNaN68England1.1.02.02.01Regular Season244EnglandPremier Leaguemale2003/20042020-08-31T20:40:28.9696352020-08-31T20:40:28.969635EvertonArsenal2003-08-16 Arsenal 2 vs. 1 Everton109.823.9nanNaNnanNaN110.525.0NaNnanNaN
66018374d66902a9-dd0f-45e0-b5f5-b0f17dd918a2375100:10:31.5001031241.20423516Shot1Arsenal3From Free Kick1ArsenalNaNNaN['dd519855-d60c-49a6-a4ae-7a394792c545']92.5, 11.915516.0Thierry Henry24.0Left Center ForwardNaNNaNNaNNaNNaNNaNnanNaNNaNNaNNaNnanNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaN0.077935120.0, 39.0, 3.5NaN40.0Right Foot93.0Normal98.0Off T62.0Free Kick[{'location': [109.8, 36.7], 'player': {'id': ...nanNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaN3749493NaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaN192003-08-1616:00:00.00021available2020-07-29T05:001{'id': 1279, 'name': 'None'}NaN2EnglandPremier League442003/20041ArsenalmaleNaNNaN68England29EvertonmaleNaNNaN68England1.1.02.02.01Regular Season244EnglandPremier Leaguemale2003/20042020-08-31T20:40:28.9696352020-08-31T20:40:28.969635ArsenalEverton2003-08-16 Arsenal 2 vs. 1 Everton92.511.9nanNaNnanNaN120.039.03.5nanNaN
................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
157408335578deb6ee1-3cef-44bd-8040-677d43ea8ea13558200:36:54.73781541471.07914316Shot206Deportivo Alavés1Regular Play206Deportivo AlavésNaNNaN['9caa99c4-5cce-489b-8cef-d2e02645ff6d']102.7, 43.83265.0José Luis Sanmartín Mato23.0Center ForwardNaNNaNNaNNaNNaNNaNnanNaNNaNNaNNaNnanNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaN0.138089120.0, 45.1, 0.61bf0f6bd-2a77-4038-8ab4-c4fc60fcdcc237.0Head93.0Normal98.0Off T87.0Open Play[{'location': [110.5, 41.1], 'player': {'id': ...nanNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNTrueNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaN303421NaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaN02020-07-1917:00:00.00005available2020-07-29T05:0038{'id': 207, 'name': 'Juan Martínez', 'country'...{'id': 348, 'name': 'Estadio de Mendizorroza',...11SpainLa Liga422019/2020206Deportivo AlavésmaleNaN[{'id': 2, 'name': 'Juan Ramón López Muñiz', '...214Spain217BarcelonamaleNaN[{'id': 238, 'name': 'Enrique Setién Solar', '...214Spain1.1.02.02.01Regular Season1142SpainLa Ligamale2019/20202020-10-11T20:05:57.7037302020-10-11T20:05:57.703730Deportivo AlavésBarcelona2020-07-19 Deportivo Alavés 0 vs. 5 Barcelona102.743.8nanNaNnanNaN120.045.10.6nanNaN
1574143361708294b81-c46f-4c05-8e88-a591b5716de43618200:39:28.64384281510.66386516Shot206Deportivo Alavés3From Free Kick206Deportivo AlavésNaNNaN['99b38aab-91a4-49ec-972f-33a4b455d6be']105.6, 22.93265.0José Luis Sanmartín Mato23.0Center ForwardNaNNaNNaNNaNNaNNaNnanNaNNaNNaNNaNnanNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaN0.033484120.0, 46.2, 1.2NaN40.0Right Foot93.0Normal98.0Off T87.0Open Play[{'location': [118.3, 36.0], 'player': {'id': ...nanNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaN303421NaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaN02020-07-1917:00:00.00005available2020-07-29T05:0038{'id': 207, 'name': 'Juan Martínez', 'country'...{'id': 348, 'name': 'Estadio de Mendizorroza',...11SpainLa Liga422019/2020206Deportivo AlavésmaleNaN[{'id': 2, 'name': 'Juan Ramón López Muñiz', '...214Spain217BarcelonamaleNaN[{'id': 238, 'name': 'Enrique Setién Solar', '...214Spain1.1.02.02.01Regular Season1142SpainLa Ligamale2019/20202020-10-11T20:05:57.7037302020-10-11T20:05:57.703730Deportivo AlavésBarcelona2020-07-19 Deportivo Alavés 0 vs. 5 Barcelona105.622.9nanNaNnanNaN120.046.21.2nanNaN
1574329380339a97936-7ca4-4277-8af5-464e6dde5d9b3804200:44:10.35189101590.79748816Shot217Barcelona3From Free Kick217BarcelonaNaNNaN['d1267bcc-086a-4a6c-8abc-09452cd61dbb', 'edf0...113.6, 28.64447.0Martin Braithwaite Christensen21.0Left WingNaNNaNNaNNaNNaNNaNnanNaNNaNNaNNaNnanNaNNaNTrueNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaN0.132526119.1, 43.83a7f0714-0ec5-4ac6-83f2-83dd06be8e4838.0Left Foot91.0Half Volley101.0Wayward87.0Open Play[{'location': [110.1, 38.4], 'player': {'id': ...nanNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNTrueNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaN303421NaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaN02020-07-1917:00:00.00005available2020-07-29T05:0038{'id': 207, 'name': 'Juan Martínez', 'country'...{'id': 348, 'name': 'Estadio de Mendizorroza',...11SpainLa Liga422019/2020206Deportivo AlavésmaleNaN[{'id': 2, 'name': 'Juan Ramón López Muñiz', '...214Spain217BarcelonamaleNaN[{'id': 238, 'name': 'Enrique Setién Solar', '...214Spain1.1.02.02.01Regular Season1142SpainLa Ligamale2019/20202020-10-11T20:05:57.7037302020-10-11T20:05:57.703730BarcelonaDeportivo Alavés2020-07-19 Deportivo Alavés 0 vs. 5 Barcelona113.628.6nanNaNnanNaN119.143.8NaNnanNaN
1574332380689d8acd7-2997-4467-8573-518aa1fb86dd3807200:44:11.77189111590.12405316Shot217Barcelona3From Free Kick217BarcelonaNaNNaN['6446d18b-9f7c-4a1a-9296-a992556f4618']118.9, 45.35246.0Luis Alberto Suárez Díaz23.0Center ForwardNaNNaNNaNNaNNaNNaNnanNaNNaNNaNNaNnanNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaN0.238426120.0, 44.7, 0.2NaN40.0Right Foot93.0Normal98.0Off T87.0Open Play[{'location': [120.0, 27.5], 'player': {'id': ...nanNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaN303421NaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNTrueNaNNaNNaNNaNNaNNaNNaNNaNNaNNaN02020-07-1917:00:00.00005available2020-07-29T05:0038{'id': 207, 'name': 'Juan Martínez', 'country'...{'id': 348, 'name': 'Estadio de Mendizorroza',...11SpainLa Liga422019/2020206Deportivo AlavésmaleNaN[{'id': 2, 'name': 'Juan Ramón López Muñiz', '...214Spain217BarcelonamaleNaN[{'id': 238, 'name': 'Enrique Setién Solar', '...214Spain1.1.02.02.01Regular Season1142SpainLa Ligamale2019/20202020-10-11T20:05:57.7037302020-10-11T20:05:57.703730BarcelonaDeportivo Alavés2020-07-19 Deportivo Alavés 0 vs. 5 Barcelona118.945.3nanNaNnanNaN120.044.70.2nanNaN
15744923966801b268e-8f4e-4236-879d-c2b72360a1133967200:48:57.72793571660.10861116Shot206Deportivo Alavés3From Free Kick206Deportivo AlavésNaNNaN['45256fb7-dfed-49af-b2a2-72f6d033f80a', 'f8dd...99.1, 36.524049.0Luis Jesús Rioja González16.0Left MidfieldNaNNaNNaNNaNNaNNaNnanNaNNaNNaNNaNnanNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaN0.056378100.9, 36.8NaN38.0Left Foot93.0Normal96.0Blocked87.0Open Play[{'location': [78.9, 59.9], 'player': {'id': 4...nanNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaN303421NaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaN02020-07-1917:00:00.00005available2020-07-29T05:0038{'id': 207, 'name': 'Juan Martínez', 'country'...{'id': 348, 'name': 'Estadio de Mendizorroza',...11SpainLa Liga422019/2020206Deportivo AlavésmaleNaN[{'id': 2, 'name': 'Juan Ramón López Muñiz', '...214Spain217BarcelonamaleNaN[{'id': 238, 'name': 'Enrique Setién Solar', '...214Spain1.1.02.02.01Regular Season1142SpainLa Ligamale2019/20202020-10-11T20:05:57.7037302020-10-11T20:05:57.703730Deportivo AlavésBarcelona2020-07-19 Deportivo Alavés 0 vs. 5 Barcelona99.136.5nanNaNnanNaN100.936.8NaNnanNaN
\n", "

22357 rows × 207 columns

\n", "
" ], "text/plain": [ " level_0 id index_x period \\\n", "65822 178 52e9cf2c-e406-48f0-b950-26acbfbf18a8 179 1 \n", "65831 187 95f3617d-e00d-4e68-aad3-3566a19583ae 188 1 \n", "65921 277 7a82b711-af7e-40c6-b895-3d79e28c7f5f 278 1 \n", "65925 281 bfc075ba-5b6b-4f02-9027-2c59afcc13fd 282 1 \n", "66018 374 d66902a9-dd0f-45e0-b5f5-b0f17dd918a2 375 1 \n", "... ... ... ... ... \n", "1574083 3557 8deb6ee1-3cef-44bd-8040-677d43ea8ea1 3558 2 \n", "1574143 3617 08294b81-c46f-4c05-8e88-a591b5716de4 3618 2 \n", "1574329 3803 39a97936-7ca4-4277-8af5-464e6dde5d9b 3804 2 \n", "1574332 3806 89d8acd7-2997-4467-8573-518aa1fb86dd 3807 2 \n", "1574492 3966 801b268e-8f4e-4236-879d-c2b72360a113 3967 2 \n", "\n", " timestamp minute second possession duration type_id \\\n", "65822 00:03:51.134 3 51 9 1.753289 16 \n", "65831 00:04:23.834 4 23 10 1.786395 16 \n", "65921 00:06:10.511 6 10 16 0.452368 16 \n", "65925 00:06:14.029 6 14 16 0.281833 16 \n", "66018 00:10:31.500 10 31 24 1.204235 16 \n", "... ... ... ... ... ... ... \n", "1574083 00:36:54.737 81 54 147 1.079143 16 \n", "1574143 00:39:28.643 84 28 151 0.663865 16 \n", "1574329 00:44:10.351 89 10 159 0.797488 16 \n", "1574332 00:44:11.771 89 11 159 0.124053 16 \n", "1574492 00:48:57.727 93 57 166 0.108611 16 \n", "\n", " type_name possession_team_id possession_team_name play_pattern_id \\\n", "65822 Shot 1 Arsenal 1 \n", "65831 Shot 29 Everton 7 \n", "65921 Shot 29 Everton 1 \n", "65925 Shot 29 Everton 1 \n", "66018 Shot 1 Arsenal 3 \n", "... ... ... ... ... \n", "1574083 Shot 206 Deportivo Alavés 1 \n", "1574143 Shot 206 Deportivo Alavés 3 \n", "1574329 Shot 217 Barcelona 3 \n", "1574332 Shot 217 Barcelona 3 \n", "1574492 Shot 206 Deportivo Alavés 3 \n", "\n", " play_pattern_name team_id team_name tactics_formation \\\n", "65822 Regular Play 1 Arsenal NaN \n", "65831 From Goal Kick 29 Everton NaN \n", "65921 Regular Play 29 Everton NaN \n", "65925 Regular Play 29 Everton NaN \n", "66018 From Free Kick 1 Arsenal NaN \n", "... ... ... ... ... \n", "1574083 Regular Play 206 Deportivo Alavés NaN \n", "1574143 From Free Kick 206 Deportivo Alavés NaN \n", "1574329 From Free Kick 217 Barcelona NaN \n", "1574332 From Free Kick 217 Barcelona NaN \n", "1574492 From Free Kick 206 Deportivo Alavés NaN \n", "\n", " tactics_lineup related_events \\\n", "65822 NaN ['e92d30d5-dc0a-4c0c-830e-a45076d77f71'] \n", "65831 NaN ['650321cc-f4b8-4f43-a9c6-c3f175290901', '84ee... \n", "65921 NaN ['e2445ac4-39cc-44c4-ae48-c3ce3fd51128'] \n", "65925 NaN ['47022283-c052-42da-ba2e-c85f76e4ccb4', '4ac9... \n", "66018 NaN ['dd519855-d60c-49a6-a4ae-7a394792c545'] \n", "... ... ... \n", "1574083 NaN ['9caa99c4-5cce-489b-8cef-d2e02645ff6d'] \n", "1574143 NaN ['99b38aab-91a4-49ec-972f-33a4b455d6be'] \n", "1574329 NaN ['d1267bcc-086a-4a6c-8abc-09452cd61dbb', 'edf0... \n", "1574332 NaN ['6446d18b-9f7c-4a1a-9296-a992556f4618'] \n", "1574492 NaN ['45256fb7-dfed-49af-b2a2-72f6d033f80a', 'f8dd... \n", "\n", " location player_id player_name position_id \\\n", "65822 91.5, 37.1 15512.0 Sylvain Wiltord 22.0 \n", "65831 80.7, 28.4 40289.0 Mark Pembridge 16.0 \n", "65921 111.7, 39.3 40283.0 Nick Chadwick 24.0 \n", "65925 109.8, 23.9 40289.0 Mark Pembridge 16.0 \n", "66018 92.5, 11.9 15516.0 Thierry Henry 24.0 \n", "... ... ... ... ... \n", "1574083 102.7, 43.8 3265.0 José Luis Sanmartín Mato 23.0 \n", "1574143 105.6, 22.9 3265.0 José Luis Sanmartín Mato 23.0 \n", "1574329 113.6, 28.6 4447.0 Martin Braithwaite Christensen 21.0 \n", "1574332 118.9, 45.3 5246.0 Luis Alberto Suárez Díaz 23.0 \n", "1574492 99.1, 36.5 24049.0 Luis Jesús Rioja González 16.0 \n", "\n", " position_name pass_recipient_id pass_recipient_name \\\n", "65822 Right Center Forward NaN NaN \n", "65831 Left Midfield NaN NaN \n", "65921 Left Center Forward NaN NaN \n", "65925 Left Midfield NaN NaN \n", "66018 Left Center Forward NaN NaN \n", "... ... ... ... \n", "1574083 Center Forward NaN NaN \n", "1574143 Center Forward NaN NaN \n", "1574329 Left Wing NaN NaN \n", "1574332 Center Forward NaN NaN \n", "1574492 Left Midfield NaN NaN \n", "\n", " pass_length pass_angle pass_height_id pass_height_name \\\n", "65822 NaN NaN NaN NaN \n", "65831 NaN NaN NaN NaN \n", "65921 NaN NaN NaN NaN \n", "65925 NaN NaN NaN NaN \n", "66018 NaN NaN NaN NaN \n", "... ... ... ... ... \n", "1574083 NaN NaN NaN NaN \n", "1574143 NaN NaN NaN NaN \n", "1574329 NaN NaN NaN NaN \n", "1574332 NaN NaN NaN NaN \n", "1574492 NaN NaN NaN NaN \n", "\n", " pass_end_location pass_type_id pass_type_name pass_body_part_id \\\n", "65822 nan NaN NaN NaN \n", "65831 nan NaN NaN NaN \n", "65921 nan NaN NaN NaN \n", "65925 nan NaN NaN NaN \n", "66018 nan NaN NaN NaN \n", "... ... ... ... ... \n", "1574083 nan NaN NaN NaN \n", "1574143 nan NaN NaN NaN \n", "1574329 nan NaN NaN NaN \n", "1574332 nan NaN NaN NaN \n", "1574492 nan NaN NaN NaN \n", "\n", " pass_body_part_name carry_end_location pass_outcome_id \\\n", "65822 NaN nan NaN \n", "65831 NaN nan NaN \n", "65921 NaN nan NaN \n", "65925 NaN nan NaN \n", "66018 NaN nan NaN \n", "... ... ... ... \n", "1574083 NaN nan NaN \n", "1574143 NaN nan NaN \n", "1574329 NaN nan NaN \n", "1574332 NaN nan NaN \n", "1574492 NaN nan NaN \n", "\n", " pass_outcome_name under_pressure clearance_head \\\n", "65822 NaN NaN NaN \n", "65831 NaN True NaN \n", "65921 NaN NaN NaN \n", "65925 NaN NaN NaN \n", "66018 NaN NaN NaN \n", "... ... ... ... \n", "1574083 NaN NaN NaN \n", "1574143 NaN NaN NaN \n", "1574329 NaN True NaN \n", "1574332 NaN NaN NaN \n", "1574492 NaN NaN NaN \n", "\n", " clearance_body_part_id clearance_body_part_name counterpress \\\n", "65822 NaN NaN NaN \n", "65831 NaN NaN NaN \n", "65921 NaN NaN NaN \n", "65925 NaN NaN NaN \n", "66018 NaN NaN NaN \n", "... ... ... ... \n", "1574083 NaN NaN NaN \n", "1574143 NaN NaN NaN \n", "1574329 NaN NaN NaN \n", "1574332 NaN NaN NaN \n", "1574492 NaN NaN NaN \n", "\n", " duel_outcome_id duel_outcome_name duel_type_id duel_type_name \\\n", "65822 NaN NaN NaN NaN \n", "65831 NaN NaN NaN NaN \n", "65921 NaN NaN NaN NaN \n", "65925 NaN NaN NaN NaN \n", "66018 NaN NaN NaN NaN \n", "... ... ... ... ... \n", "1574083 NaN NaN NaN NaN \n", "1574143 NaN NaN NaN NaN \n", "1574329 NaN NaN NaN NaN \n", "1574332 NaN NaN NaN NaN \n", "1574492 NaN NaN NaN NaN \n", "\n", " ball_receipt_outcome_id ball_receipt_outcome_name out \\\n", "65822 NaN NaN NaN \n", "65831 NaN NaN NaN \n", "65921 NaN NaN NaN \n", "65925 NaN NaN NaN \n", "66018 NaN NaN NaN \n", "... ... ... ... \n", "1574083 NaN NaN NaN \n", "1574143 NaN NaN NaN \n", "1574329 NaN NaN NaN \n", "1574332 NaN NaN NaN \n", "1574492 NaN NaN NaN \n", "\n", " clearance_left_foot pass_switch off_camera clearance_aerial_won \\\n", "65822 NaN NaN NaN NaN \n", "65831 NaN NaN NaN NaN \n", "65921 NaN NaN NaN NaN \n", "65925 NaN NaN NaN NaN \n", "66018 NaN NaN NaN NaN \n", "... ... ... ... ... \n", "1574083 NaN NaN NaN NaN \n", "1574143 NaN NaN NaN NaN \n", "1574329 NaN NaN NaN NaN \n", "1574332 NaN NaN NaN NaN \n", "1574492 NaN NaN NaN NaN \n", "\n", " dribble_outcome_id dribble_outcome_name pass_cross \\\n", "65822 NaN NaN NaN \n", "65831 NaN NaN NaN \n", "65921 NaN NaN NaN \n", "65925 NaN NaN NaN \n", "66018 NaN NaN NaN \n", "... ... ... ... \n", "1574083 NaN NaN NaN \n", "1574143 NaN NaN NaN \n", "1574329 NaN NaN NaN \n", "1574332 NaN NaN NaN \n", "1574492 NaN NaN NaN \n", "\n", " pass_assisted_shot_id pass_shot_assist shot_statsbomb_xg \\\n", "65822 NaN NaN 0.022911 \n", "65831 NaN NaN 0.006424 \n", "65921 NaN NaN 0.277126 \n", "65925 NaN NaN 0.018100 \n", "66018 NaN NaN 0.077935 \n", "... ... ... ... \n", "1574083 NaN NaN 0.138089 \n", "1574143 NaN NaN 0.033484 \n", "1574329 NaN NaN 0.132526 \n", "1574332 NaN NaN 0.238426 \n", "1574492 NaN NaN 0.056378 \n", "\n", " shot_end_location shot_key_pass_id \\\n", "65822 120.0, 26.7, 6.2 282abb6d-2f41-46bd-ba22-a411ce0d7a8c \n", "65831 118.6, 42.5, 2.1 NaN \n", "65921 117.5, 42.1, 0.2 3925e6b6-525c-4738-b710-46e47c825ae6 \n", "65925 110.5, 25.0 NaN \n", "66018 120.0, 39.0, 3.5 NaN \n", "... ... ... \n", "1574083 120.0, 45.1, 0.6 1bf0f6bd-2a77-4038-8ab4-c4fc60fcdcc2 \n", "1574143 120.0, 46.2, 1.2 NaN \n", "1574329 119.1, 43.8 3a7f0714-0ec5-4ac6-83f2-83dd06be8e48 \n", "1574332 120.0, 44.7, 0.2 NaN \n", "1574492 100.9, 36.8 NaN \n", "\n", " shot_body_part_id shot_body_part_name shot_technique_id \\\n", "65822 38.0 Left Foot 93.0 \n", "65831 38.0 Left Foot 91.0 \n", "65921 40.0 Right Foot 93.0 \n", "65925 38.0 Left Foot 95.0 \n", "66018 40.0 Right Foot 93.0 \n", "... ... ... ... \n", "1574083 37.0 Head 93.0 \n", "1574143 40.0 Right Foot 93.0 \n", "1574329 38.0 Left Foot 91.0 \n", "1574332 40.0 Right Foot 93.0 \n", "1574492 38.0 Left Foot 93.0 \n", "\n", " shot_technique_name shot_outcome_id shot_outcome_name shot_type_id \\\n", "65822 Normal 98.0 Off T 87.0 \n", "65831 Half Volley 100.0 Saved 87.0 \n", "65921 Normal 100.0 Saved 87.0 \n", "65925 Volley 96.0 Blocked 87.0 \n", "66018 Normal 98.0 Off T 62.0 \n", "... ... ... ... ... \n", "1574083 Normal 98.0 Off T 87.0 \n", "1574143 Normal 98.0 Off T 87.0 \n", "1574329 Half Volley 101.0 Wayward 87.0 \n", "1574332 Normal 98.0 Off T 87.0 \n", "1574492 Normal 96.0 Blocked 87.0 \n", "\n", " shot_type_name shot_freeze_frame \\\n", "65822 Open Play [{'location': [85.1, 52.6], 'player': {'id': 4... \n", "65831 Open Play [{'location': [81.0, 31.5], 'player': {'id': 4... \n", "65921 Open Play [{'location': [101.9, 32.2], 'player': {'id': ... \n", "65925 Open Play [{'location': [119.0, 37.1], 'player': {'id': ... \n", "66018 Free Kick [{'location': [109.8, 36.7], 'player': {'id': ... \n", "... ... ... \n", "1574083 Open Play [{'location': [110.5, 41.1], 'player': {'id': ... \n", "1574143 Open Play [{'location': [118.3, 36.0], 'player': {'id': ... \n", "1574329 Open Play [{'location': [110.1, 38.4], 'player': {'id': ... \n", "1574332 Open Play [{'location': [120.0, 27.5], 'player': {'id': ... \n", "1574492 Open Play [{'location': [78.9, 59.9], 'player': {'id': 4... \n", "\n", " goalkeeper_end_location goalkeeper_type_id goalkeeper_type_name \\\n", "65822 nan NaN NaN \n", "65831 nan NaN NaN \n", "65921 nan NaN NaN \n", "65925 nan NaN NaN \n", "66018 nan NaN NaN \n", "... ... ... ... \n", "1574083 nan NaN NaN \n", "1574143 nan NaN NaN \n", "1574329 nan NaN NaN \n", "1574332 nan NaN NaN \n", "1574492 nan NaN NaN \n", "\n", " goalkeeper_position_id goalkeeper_position_name \\\n", "65822 NaN NaN \n", "65831 NaN NaN \n", "65921 NaN NaN \n", "65925 NaN NaN \n", "66018 NaN NaN \n", "... ... ... \n", "1574083 NaN NaN \n", "1574143 NaN NaN \n", "1574329 NaN NaN \n", "1574332 NaN NaN \n", "1574492 NaN NaN \n", "\n", " ball_recovery_recovery_failure foul_committed_advantage \\\n", "65822 NaN NaN \n", "65831 NaN NaN \n", "65921 NaN NaN \n", "65925 NaN NaN \n", "66018 NaN NaN \n", "... ... ... \n", "1574083 NaN NaN \n", "1574143 NaN NaN \n", "1574329 NaN NaN \n", "1574332 NaN NaN \n", "1574492 NaN NaN \n", "\n", " foul_won_advantage dribble_overrun clearance_right_foot \\\n", "65822 NaN NaN NaN \n", "65831 NaN NaN NaN \n", "65921 NaN NaN NaN \n", "65925 NaN NaN NaN \n", "66018 NaN NaN NaN \n", "... ... ... ... \n", "1574083 NaN NaN NaN \n", "1574143 NaN NaN NaN \n", "1574329 NaN NaN NaN \n", "1574332 NaN NaN NaN \n", "1574492 NaN NaN NaN \n", "\n", " interception_outcome_id interception_outcome_name foul_won_defensive \\\n", "65822 NaN NaN NaN \n", "65831 NaN NaN NaN \n", "65921 NaN NaN NaN \n", "65925 NaN NaN NaN \n", "66018 NaN NaN NaN \n", "... ... ... ... \n", "1574083 NaN NaN NaN \n", "1574143 NaN NaN NaN \n", "1574329 NaN NaN NaN \n", "1574332 NaN NaN NaN \n", "1574492 NaN NaN NaN \n", "\n", " pass_aerial_won pass_deflected pass_inswinging pass_technique_id \\\n", "65822 NaN NaN NaN NaN \n", "65831 NaN NaN NaN NaN \n", "65921 NaN NaN NaN NaN \n", "65925 NaN NaN NaN NaN \n", "66018 NaN NaN NaN NaN \n", "... ... ... ... ... \n", "1574083 NaN NaN NaN NaN \n", "1574143 NaN NaN NaN NaN \n", "1574329 NaN NaN NaN NaN \n", "1574332 NaN NaN NaN NaN \n", "1574492 NaN NaN NaN NaN \n", "\n", " pass_technique_name goalkeeper_body_part_id \\\n", "65822 NaN NaN \n", "65831 NaN NaN \n", "65921 NaN NaN \n", "65925 NaN NaN \n", "66018 NaN NaN \n", "... ... ... \n", "1574083 NaN NaN \n", "1574143 NaN NaN \n", "1574329 NaN NaN \n", "1574332 NaN NaN \n", "1574492 NaN NaN \n", "\n", " goalkeeper_body_part_name goalkeeper_technique_id \\\n", "65822 NaN NaN \n", "65831 NaN NaN \n", "65921 NaN NaN \n", "65925 NaN NaN \n", "66018 NaN NaN \n", "... ... ... \n", "1574083 NaN NaN \n", "1574143 NaN NaN \n", "1574329 NaN NaN \n", "1574332 NaN NaN \n", "1574492 NaN NaN \n", "\n", " goalkeeper_technique_name goalkeeper_outcome_id \\\n", "65822 NaN NaN \n", "65831 NaN NaN \n", "65921 NaN NaN \n", "65925 NaN NaN \n", "66018 NaN NaN \n", "... ... ... \n", "1574083 NaN NaN \n", "1574143 NaN NaN \n", "1574329 NaN NaN \n", "1574332 NaN NaN \n", "1574492 NaN NaN \n", "\n", " goalkeeper_outcome_name pass_outswinging pass_goal_assist \\\n", "65822 NaN NaN NaN \n", "65831 NaN NaN NaN \n", "65921 NaN NaN NaN \n", "65925 NaN NaN NaN \n", "66018 NaN NaN NaN \n", "... ... ... ... \n", "1574083 NaN NaN NaN \n", "1574143 NaN NaN NaN \n", "1574329 NaN NaN NaN \n", "1574332 NaN NaN NaN \n", "1574492 NaN NaN NaN \n", "\n", " shot_one_on_one miscontrol_aerial_won shot_deflected block_deflection \\\n", "65822 NaN NaN NaN NaN \n", "65831 NaN NaN NaN NaN \n", "65921 NaN NaN NaN NaN \n", "65925 NaN NaN NaN NaN \n", "66018 NaN NaN NaN NaN \n", "... ... ... ... ... \n", "1574083 True NaN NaN NaN \n", "1574143 NaN NaN NaN NaN \n", "1574329 NaN NaN NaN NaN \n", "1574332 NaN NaN NaN NaN \n", "1574492 NaN NaN NaN NaN \n", "\n", " shot_first_time block_offensive pass_through_ball \\\n", "65822 NaN NaN NaN \n", "65831 NaN NaN NaN \n", "65921 True NaN NaN \n", "65925 True NaN NaN \n", "66018 NaN NaN NaN \n", "... ... ... ... \n", "1574083 NaN NaN NaN \n", "1574143 NaN NaN NaN \n", "1574329 True NaN NaN \n", "1574332 NaN NaN NaN \n", "1574492 NaN NaN NaN \n", "\n", " foul_committed_card_id foul_committed_card_name \\\n", "65822 NaN NaN \n", "65831 NaN NaN \n", "65921 NaN NaN \n", "65925 NaN NaN \n", "66018 NaN NaN \n", "... ... ... \n", "1574083 NaN NaN \n", "1574143 NaN NaN \n", "1574329 NaN NaN \n", "1574332 NaN NaN \n", "1574492 NaN NaN \n", "\n", " foul_committed_penalty foul_won_penalty dribble_nutmeg \\\n", "65822 NaN NaN NaN \n", "65831 NaN NaN NaN \n", "65921 NaN NaN NaN \n", "65925 NaN NaN NaN \n", "66018 NaN NaN NaN \n", "... ... ... ... \n", "1574083 NaN NaN NaN \n", "1574143 NaN NaN NaN \n", "1574329 NaN NaN NaN \n", "1574332 NaN NaN NaN \n", "1574492 NaN NaN NaN \n", "\n", " pass_miscommunication pass_no_touch foul_committed_offensive \\\n", "65822 NaN NaN NaN \n", "65831 NaN NaN NaN \n", "65921 NaN NaN NaN \n", "65925 NaN NaN NaN \n", "66018 NaN NaN NaN \n", "... ... ... ... \n", "1574083 NaN NaN NaN \n", "1574143 NaN NaN NaN \n", "1574329 NaN NaN NaN \n", "1574332 NaN NaN NaN \n", "1574492 NaN NaN NaN \n", "\n", " goalkeeper_lost_out pass_straight substitution_outcome_id \\\n", "65822 NaN NaN NaN \n", "65831 NaN NaN NaN \n", "65921 NaN NaN NaN \n", "65925 NaN NaN NaN \n", "66018 NaN NaN NaN \n", "... ... ... ... \n", "1574083 NaN NaN NaN \n", "1574143 NaN NaN NaN \n", "1574329 NaN NaN NaN \n", "1574332 NaN NaN NaN \n", "1574492 NaN NaN NaN \n", "\n", " substitution_outcome_name substitution_replacement_id \\\n", "65822 NaN NaN \n", "65831 NaN NaN \n", "65921 NaN NaN \n", "65925 NaN NaN \n", "66018 NaN NaN \n", "... ... ... \n", "1574083 NaN NaN \n", "1574143 NaN NaN \n", "1574329 NaN NaN \n", "1574332 NaN NaN \n", "1574492 NaN NaN \n", "\n", " substitution_replacement_name match_id goalkeeper_punched_out \\\n", "65822 NaN 3749493 NaN \n", "65831 NaN 3749493 NaN \n", "65921 NaN 3749493 NaN \n", "65925 NaN 3749493 NaN \n", "66018 NaN 3749493 NaN \n", "... ... ... ... \n", "1574083 NaN 303421 NaN \n", "1574143 NaN 303421 NaN \n", "1574329 NaN 303421 NaN \n", "1574332 NaN 303421 NaN \n", "1574492 NaN 303421 NaN \n", "\n", " shot_aerial_won pass_cut_back goalkeeper_success_in_play \\\n", "65822 NaN NaN NaN \n", "65831 NaN NaN NaN \n", "65921 NaN NaN NaN \n", "65925 NaN NaN NaN \n", "66018 NaN NaN NaN \n", "... ... ... ... \n", "1574083 NaN NaN NaN \n", "1574143 NaN NaN NaN \n", "1574329 NaN NaN NaN \n", "1574332 NaN NaN NaN \n", "1574492 NaN NaN NaN \n", "\n", " 50_50_outcome_id 50_50_outcome_name foul_committed_type_id \\\n", "65822 NaN NaN NaN \n", "65831 NaN NaN NaN \n", "65921 NaN NaN NaN \n", "65925 NaN NaN NaN \n", "66018 NaN NaN NaN \n", "... ... ... ... \n", "1574083 NaN NaN NaN \n", "1574143 NaN NaN NaN \n", "1574329 NaN NaN NaN \n", "1574332 NaN NaN NaN \n", "1574492 NaN NaN NaN \n", "\n", " foul_committed_type_name ball_recovery_offensive \\\n", "65822 NaN NaN \n", "65831 NaN NaN \n", "65921 NaN NaN \n", "65925 NaN NaN \n", "66018 NaN NaN \n", "... ... ... \n", "1574083 NaN NaN \n", "1574143 NaN NaN \n", "1574329 NaN NaN \n", "1574332 NaN NaN \n", "1574492 NaN NaN \n", "\n", " shot_saved_off_target goalkeeper_shot_saved_off_target shot_open_goal \\\n", "65822 NaN NaN NaN \n", "65831 NaN NaN NaN \n", "65921 NaN NaN NaN \n", "65925 NaN NaN NaN \n", "66018 NaN NaN NaN \n", "... ... ... ... \n", "1574083 NaN NaN NaN \n", "1574143 NaN NaN NaN \n", "1574329 NaN NaN NaN \n", "1574332 NaN NaN NaN \n", "1574492 NaN NaN NaN \n", "\n", " dribble_no_touch bad_behaviour_card_id bad_behaviour_card_name \\\n", "65822 NaN NaN NaN \n", "65831 NaN NaN NaN \n", "65921 NaN NaN NaN \n", "65925 NaN NaN NaN \n", "66018 NaN NaN NaN \n", "... ... ... ... \n", "1574083 NaN NaN NaN \n", "1574143 NaN NaN NaN \n", "1574329 NaN NaN NaN \n", "1574332 NaN NaN NaN \n", "1574492 NaN NaN NaN \n", "\n", " half_start_late_video_start block_save_block shot_follows_dribble \\\n", "65822 NaN NaN NaN \n", "65831 NaN NaN NaN \n", "65921 NaN NaN NaN \n", "65925 NaN NaN NaN \n", "66018 NaN NaN NaN \n", "... ... ... ... \n", "1574083 NaN NaN NaN \n", "1574143 NaN NaN NaN \n", "1574329 NaN NaN NaN \n", "1574332 NaN NaN NaN \n", "1574492 NaN NaN NaN \n", "\n", " clearance_other goalkeeper_shot_saved_to_post shot_redirect \\\n", "65822 NaN NaN NaN \n", "65831 NaN NaN NaN \n", "65921 NaN NaN NaN \n", "65925 NaN NaN NaN \n", "66018 NaN NaN NaN \n", "... ... ... ... \n", "1574083 NaN NaN NaN \n", "1574143 NaN NaN NaN \n", "1574329 NaN NaN NaN \n", "1574332 NaN NaN True \n", "1574492 NaN NaN NaN \n", "\n", " injury_stoppage_in_chain shot_saved_to_post goalkeeper_success_out \\\n", "65822 NaN NaN NaN \n", "65831 NaN NaN NaN \n", "65921 NaN NaN NaN \n", "65925 NaN NaN NaN \n", "66018 NaN NaN NaN \n", "... ... ... ... \n", "1574083 NaN NaN NaN \n", "1574143 NaN NaN NaN \n", "1574329 NaN NaN NaN \n", "1574332 NaN NaN NaN \n", "1574492 NaN NaN NaN \n", "\n", " goalkeeper_lost_in_play half_end_early_video_end player_off_permanent \\\n", "65822 NaN NaN NaN \n", "65831 NaN NaN NaN \n", "65921 NaN NaN NaN \n", "65925 NaN NaN NaN \n", "66018 NaN NaN NaN \n", "... ... ... ... \n", "1574083 NaN NaN NaN \n", "1574143 NaN NaN NaN \n", "1574329 NaN NaN NaN \n", "1574332 NaN NaN NaN \n", "1574492 NaN NaN NaN \n", "\n", " goalkeeper_saved_to_post pass_backheel shot_kick_off \\\n", "65822 NaN NaN NaN \n", "65831 NaN NaN NaN \n", "65921 NaN NaN NaN \n", "65925 NaN NaN NaN \n", "66018 NaN NaN NaN \n", "... ... ... ... \n", "1574083 NaN NaN NaN \n", "1574143 NaN NaN NaN \n", "1574329 NaN NaN NaN \n", "1574332 NaN NaN NaN \n", "1574492 NaN NaN NaN \n", "\n", " goalkeeper_penalty_saved_to_post index_y match_date kick_off \\\n", "65822 NaN 19 2003-08-16 16:00:00.000 \n", "65831 NaN 19 2003-08-16 16:00:00.000 \n", "65921 NaN 19 2003-08-16 16:00:00.000 \n", "65925 NaN 19 2003-08-16 16:00:00.000 \n", "66018 NaN 19 2003-08-16 16:00:00.000 \n", "... ... ... ... ... \n", "1574083 NaN 0 2020-07-19 17:00:00.000 \n", "1574143 NaN 0 2020-07-19 17:00:00.000 \n", "1574329 NaN 0 2020-07-19 17:00:00.000 \n", "1574332 NaN 0 2020-07-19 17:00:00.000 \n", "1574492 NaN 0 2020-07-19 17:00:00.000 \n", "\n", " home_score away_score match_status last_updated match_week \\\n", "65822 2 1 available 2020-07-29T05:00 1 \n", "65831 2 1 available 2020-07-29T05:00 1 \n", "65921 2 1 available 2020-07-29T05:00 1 \n", "65925 2 1 available 2020-07-29T05:00 1 \n", "66018 2 1 available 2020-07-29T05:00 1 \n", "... ... ... ... ... ... \n", "1574083 0 5 available 2020-07-29T05:00 38 \n", "1574143 0 5 available 2020-07-29T05:00 38 \n", "1574329 0 5 available 2020-07-29T05:00 38 \n", "1574332 0 5 available 2020-07-29T05:00 38 \n", "1574492 0 5 available 2020-07-29T05:00 38 \n", "\n", " referee \\\n", "65822 {'id': 1279, 'name': 'None'} \n", "65831 {'id': 1279, 'name': 'None'} \n", "65921 {'id': 1279, 'name': 'None'} \n", "65925 {'id': 1279, 'name': 'None'} \n", "66018 {'id': 1279, 'name': 'None'} \n", "... ... \n", "1574083 {'id': 207, 'name': 'Juan Martínez', 'country'... \n", "1574143 {'id': 207, 'name': 'Juan Martínez', 'country'... \n", "1574329 {'id': 207, 'name': 'Juan Martínez', 'country'... \n", "1574332 {'id': 207, 'name': 'Juan Martínez', 'country'... \n", "1574492 {'id': 207, 'name': 'Juan Martínez', 'country'... \n", "\n", " stadium \\\n", "65822 NaN \n", "65831 NaN \n", "65921 NaN \n", "65925 NaN \n", "66018 NaN \n", "... ... \n", "1574083 {'id': 348, 'name': 'Estadio de Mendizorroza',... \n", "1574143 {'id': 348, 'name': 'Estadio de Mendizorroza',... \n", "1574329 {'id': 348, 'name': 'Estadio de Mendizorroza',... \n", "1574332 {'id': 348, 'name': 'Estadio de Mendizorroza',... \n", "1574492 {'id': 348, 'name': 'Estadio de Mendizorroza',... \n", "\n", " competition_competition_id competition_country_name \\\n", "65822 2 England \n", "65831 2 England \n", "65921 2 England \n", "65925 2 England \n", "66018 2 England \n", "... ... ... \n", "1574083 11 Spain \n", "1574143 11 Spain \n", "1574329 11 Spain \n", "1574332 11 Spain \n", "1574492 11 Spain \n", "\n", " competition_competition_name season_season_id season_season_name \\\n", "65822 Premier League 44 2003/2004 \n", "65831 Premier League 44 2003/2004 \n", "65921 Premier League 44 2003/2004 \n", "65925 Premier League 44 2003/2004 \n", "66018 Premier League 44 2003/2004 \n", "... ... ... ... \n", "1574083 La Liga 42 2019/2020 \n", "1574143 La Liga 42 2019/2020 \n", "1574329 La Liga 42 2019/2020 \n", "1574332 La Liga 42 2019/2020 \n", "1574492 La Liga 42 2019/2020 \n", "\n", " home_team_home_team_id home_team_home_team_name \\\n", "65822 1 Arsenal \n", "65831 1 Arsenal \n", "65921 1 Arsenal \n", "65925 1 Arsenal \n", "66018 1 Arsenal \n", "... ... ... \n", "1574083 206 Deportivo Alavés \n", "1574143 206 Deportivo Alavés \n", "1574329 206 Deportivo Alavés \n", "1574332 206 Deportivo Alavés \n", "1574492 206 Deportivo Alavés \n", "\n", " home_team_home_team_gender home_team_home_team_group \\\n", "65822 male NaN \n", "65831 male NaN \n", "65921 male NaN \n", "65925 male NaN \n", "66018 male NaN \n", "... ... ... \n", "1574083 male NaN \n", "1574143 male NaN \n", "1574329 male NaN \n", "1574332 male NaN \n", "1574492 male NaN \n", "\n", " home_team_managers \\\n", "65822 NaN \n", "65831 NaN \n", "65921 NaN \n", "65925 NaN \n", "66018 NaN \n", "... ... \n", "1574083 [{'id': 2, 'name': 'Juan Ramón López Muñiz', '... \n", "1574143 [{'id': 2, 'name': 'Juan Ramón López Muñiz', '... \n", "1574329 [{'id': 2, 'name': 'Juan Ramón López Muñiz', '... \n", "1574332 [{'id': 2, 'name': 'Juan Ramón López Muñiz', '... \n", "1574492 [{'id': 2, 'name': 'Juan Ramón López Muñiz', '... \n", "\n", " home_team_country_id home_team_country_name away_team_away_team_id \\\n", "65822 68 England 29 \n", "65831 68 England 29 \n", "65921 68 England 29 \n", "65925 68 England 29 \n", "66018 68 England 29 \n", "... ... ... ... \n", "1574083 214 Spain 217 \n", "1574143 214 Spain 217 \n", "1574329 214 Spain 217 \n", "1574332 214 Spain 217 \n", "1574492 214 Spain 217 \n", "\n", " away_team_away_team_name away_team_away_team_gender \\\n", "65822 Everton male \n", "65831 Everton male \n", "65921 Everton male \n", "65925 Everton male \n", "66018 Everton male \n", "... ... ... \n", "1574083 Barcelona male \n", "1574143 Barcelona male \n", "1574329 Barcelona male \n", "1574332 Barcelona male \n", "1574492 Barcelona male \n", "\n", " away_team_away_team_group \\\n", "65822 NaN \n", "65831 NaN \n", "65921 NaN \n", "65925 NaN \n", "66018 NaN \n", "... ... \n", "1574083 NaN \n", "1574143 NaN \n", "1574329 NaN \n", "1574332 NaN \n", "1574492 NaN \n", "\n", " away_team_managers \\\n", "65822 NaN \n", "65831 NaN \n", "65921 NaN \n", "65925 NaN \n", "66018 NaN \n", "... ... \n", "1574083 [{'id': 238, 'name': 'Enrique Setién Solar', '... \n", "1574143 [{'id': 238, 'name': 'Enrique Setién Solar', '... \n", "1574329 [{'id': 238, 'name': 'Enrique Setién Solar', '... \n", "1574332 [{'id': 238, 'name': 'Enrique Setién Solar', '... \n", "1574492 [{'id': 238, 'name': 'Enrique Setién Solar', '... \n", "\n", " away_team_country_id away_team_country_name metadata_data_version \\\n", "65822 68 England 1.1.0 \n", "65831 68 England 1.1.0 \n", "65921 68 England 1.1.0 \n", "65925 68 England 1.1.0 \n", "66018 68 England 1.1.0 \n", "... ... ... ... \n", "1574083 214 Spain 1.1.0 \n", "1574143 214 Spain 1.1.0 \n", "1574329 214 Spain 1.1.0 \n", "1574332 214 Spain 1.1.0 \n", "1574492 214 Spain 1.1.0 \n", "\n", " metadata_shot_fidelity_version metadata_xy_fidelity_version \\\n", "65822 2.0 2.0 \n", "65831 2.0 2.0 \n", "65921 2.0 2.0 \n", "65925 2.0 2.0 \n", "66018 2.0 2.0 \n", "... ... ... \n", "1574083 2.0 2.0 \n", "1574143 2.0 2.0 \n", "1574329 2.0 2.0 \n", "1574332 2.0 2.0 \n", "1574492 2.0 2.0 \n", "\n", " competition_stage_id competition_stage_name competition_id \\\n", "65822 1 Regular Season 2 \n", "65831 1 Regular Season 2 \n", "65921 1 Regular Season 2 \n", "65925 1 Regular Season 2 \n", "66018 1 Regular Season 2 \n", "... ... ... ... \n", "1574083 1 Regular Season 11 \n", "1574143 1 Regular Season 11 \n", "1574329 1 Regular Season 11 \n", "1574332 1 Regular Season 11 \n", "1574492 1 Regular Season 11 \n", "\n", " season_id country_name competition_name competition_gender \\\n", "65822 44 England Premier League male \n", "65831 44 England Premier League male \n", "65921 44 England Premier League male \n", "65925 44 England Premier League male \n", "66018 44 England Premier League male \n", "... ... ... ... ... \n", "1574083 42 Spain La Liga male \n", "1574143 42 Spain La Liga male \n", "1574329 42 Spain La Liga male \n", "1574332 42 Spain La Liga male \n", "1574492 42 Spain La Liga male \n", "\n", " season_name match_updated match_available \\\n", "65822 2003/2004 2020-08-31T20:40:28.969635 2020-08-31T20:40:28.969635 \n", "65831 2003/2004 2020-08-31T20:40:28.969635 2020-08-31T20:40:28.969635 \n", "65921 2003/2004 2020-08-31T20:40:28.969635 2020-08-31T20:40:28.969635 \n", "65925 2003/2004 2020-08-31T20:40:28.969635 2020-08-31T20:40:28.969635 \n", "66018 2003/2004 2020-08-31T20:40:28.969635 2020-08-31T20:40:28.969635 \n", "... ... ... ... \n", "1574083 2019/2020 2020-10-11T20:05:57.703730 2020-10-11T20:05:57.703730 \n", "1574143 2019/2020 2020-10-11T20:05:57.703730 2020-10-11T20:05:57.703730 \n", "1574329 2019/2020 2020-10-11T20:05:57.703730 2020-10-11T20:05:57.703730 \n", "1574332 2019/2020 2020-10-11T20:05:57.703730 2020-10-11T20:05:57.703730 \n", "1574492 2019/2020 2020-10-11T20:05:57.703730 2020-10-11T20:05:57.703730 \n", "\n", " team opponent \\\n", "65822 Arsenal Everton \n", "65831 Everton Arsenal \n", "65921 Everton Arsenal \n", "65925 Everton Arsenal \n", "66018 Arsenal Everton \n", "... ... ... \n", "1574083 Deportivo Alavés Barcelona \n", "1574143 Deportivo Alavés Barcelona \n", "1574329 Barcelona Deportivo Alavés \n", "1574332 Barcelona Deportivo Alavés \n", "1574492 Deportivo Alavés Barcelona \n", "\n", " full_fixture_date location_x \\\n", "65822 2003-08-16 Arsenal 2 vs. 1 Everton 91.5 \n", "65831 2003-08-16 Arsenal 2 vs. 1 Everton 80.7 \n", "65921 2003-08-16 Arsenal 2 vs. 1 Everton 111.7 \n", "65925 2003-08-16 Arsenal 2 vs. 1 Everton 109.8 \n", "66018 2003-08-16 Arsenal 2 vs. 1 Everton 92.5 \n", "... ... ... \n", "1574083 2020-07-19 Deportivo Alavés 0 vs. 5 Barcelona 102.7 \n", "1574143 2020-07-19 Deportivo Alavés 0 vs. 5 Barcelona 105.6 \n", "1574329 2020-07-19 Deportivo Alavés 0 vs. 5 Barcelona 113.6 \n", "1574332 2020-07-19 Deportivo Alavés 0 vs. 5 Barcelona 118.9 \n", "1574492 2020-07-19 Deportivo Alavés 0 vs. 5 Barcelona 99.1 \n", "\n", " location_y pass_end_location_x pass_end_location_y \\\n", "65822 37.1 nan NaN \n", "65831 28.4 nan NaN \n", "65921 39.3 nan NaN \n", "65925 23.9 nan NaN \n", "66018 11.9 nan NaN \n", "... ... ... ... \n", "1574083 43.8 nan NaN \n", "1574143 22.9 nan NaN \n", "1574329 28.6 nan NaN \n", "1574332 45.3 nan NaN \n", "1574492 36.5 nan NaN \n", "\n", " carry_end_location_x carry_end_location_y shot_end_location_x \\\n", "65822 nan NaN 120.0 \n", "65831 nan NaN 118.6 \n", "65921 nan NaN 117.5 \n", "65925 nan NaN 110.5 \n", "66018 nan NaN 120.0 \n", "... ... ... ... \n", "1574083 nan NaN 120.0 \n", "1574143 nan NaN 120.0 \n", "1574329 nan NaN 119.1 \n", "1574332 nan NaN 120.0 \n", "1574492 nan NaN 100.9 \n", "\n", " shot_end_location_y shot_end_location_z goalkeeper_end_location_x \\\n", "65822 26.7 6.2 nan \n", "65831 42.5 2.1 nan \n", "65921 42.1 0.2 nan \n", "65925 25.0 NaN nan \n", "66018 39.0 3.5 nan \n", "... ... ... ... \n", "1574083 45.1 0.6 nan \n", "1574143 46.2 1.2 nan \n", "1574329 43.8 NaN nan \n", "1574332 44.7 0.2 nan \n", "1574492 36.8 NaN nan \n", "\n", " goalkeeper_end_location_y \n", "65822 NaN \n", "65831 NaN \n", "65921 NaN \n", "65925 NaN \n", "66018 NaN \n", "... ... \n", "1574083 NaN \n", "1574143 NaN \n", "1574329 NaN \n", "1574332 NaN \n", "1574492 NaN \n", "\n", "[22357 rows x 207 columns]" ] }, "execution_count": 44, "metadata": {}, "output_type": "execute_result" } ], "source": [ "df_sb_events.loc[df_sb['type_name'] == 'Shot']" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "\"\"\"\n", "# CURRENTLY NOT WORKING, NEED TO FIX\n", "\n", "# Normalize 'shot.freeze_frame' avvtribute - see: https://stackoverflow.com/questions/52795561/flattening-nested-json-in-pandas-data-frame\n", "\n", "## explode all columns with lists of dicts\n", "df_sb_events_normalize = df_sb_events.apply(lambda x: x.explode()).reset_index(drop=True)\n", "\n", "## list of columns with dicts\n", "cols_to_normalize = ['shot.freeze_frame']\n", "\n", "## if there are keys, which will become column names, overlap with excising column names. add the current column name as a prefix\n", "normalized = list()\n", "\n", "for col in cols_to_normalize:\n", " d = pd.json_normalize(df_sb_events_normalize[col], sep='_')\n", " d.columns = [f'{col}_{v}' for v in d.columns]\n", " normalized.append(d.copy())\n", "\n", "## combine df with the normalized columns\n", "df_sb_events_normalize = pd.concat([df_sb_events_normalize] + normalized, axis=1).drop(columns=cols_to_normalize)\n", "\n", "## display(df_lineup_select_normalize)\n", "df_sb_events_normalize.head(30)\n", "\"\"\"" ] }, { "cell_type": "code", "execution_count": 42, "metadata": { "scrolled": true }, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "/opt/anaconda3/lib/python3.7/site-packages/ipykernel_launcher.py:4: SettingWithCopyWarning: \n", "A value is trying to be set on a copy of a slice from a DataFrame.\n", "Try using .loc[row_indexer,col_indexer] = value instead\n", "\n", "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n", " after removing the cwd from sys.path.\n", "/opt/anaconda3/lib/python3.7/site-packages/ipykernel_launcher.py:5: SettingWithCopyWarning: \n", "A value is trying to be set on a copy of a slice from a DataFrame.\n", "Try using .loc[row_indexer,col_indexer] = value instead\n", "\n", "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n", " \"\"\"\n", "/opt/anaconda3/lib/python3.7/site-packages/ipykernel_launcher.py:6: SettingWithCopyWarning: \n", "A value is trying to be set on a copy of a slice from a DataFrame.\n", "Try using .loc[row_indexer,col_indexer] = value instead\n", "\n", "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n", " \n", "/opt/anaconda3/lib/python3.7/site-packages/ipykernel_launcher.py:7: SettingWithCopyWarning: \n", "A value is trying to be set on a copy of a slice from a DataFrame.\n", "Try using .loc[row_indexer,col_indexer] = value instead\n", "\n", "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n", " import sys\n", "/opt/anaconda3/lib/python3.7/site-packages/ipykernel_launcher.py:8: SettingWithCopyWarning: \n", "A value is trying to be set on a copy of a slice from a DataFrame.\n", "Try using .loc[row_indexer,col_indexer] = value instead\n", "\n", "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n", " \n", "/opt/anaconda3/lib/python3.7/site-packages/ipykernel_launcher.py:9: SettingWithCopyWarning: \n", "A value is trying to be set on a copy of a slice from a DataFrame.\n", "Try using .loc[row_indexer,col_indexer] = value instead\n", "\n", "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n", " if __name__ == '__main__':\n", "/opt/anaconda3/lib/python3.7/site-packages/ipykernel_launcher.py:16: FutureWarning: The default value of regex will change from True to False in a future version. In addition, single character regular expressions will*not* be treated as literal strings when regex=True.\n", " app.launch_new_instance()\n", "/opt/anaconda3/lib/python3.7/site-packages/ipykernel_launcher.py:16: SettingWithCopyWarning: \n", "A value is trying to be set on a copy of a slice from a DataFrame.\n", "Try using .loc[row_indexer,col_indexer] = value instead\n", "\n", "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n", " app.launch_new_instance()\n", "/opt/anaconda3/lib/python3.7/site-packages/ipykernel_launcher.py:17: FutureWarning: The default value of regex will change from True to False in a future version. In addition, single character regular expressions will*not* be treated as literal strings when regex=True.\n", "/opt/anaconda3/lib/python3.7/site-packages/ipykernel_launcher.py:17: SettingWithCopyWarning: \n", "A value is trying to be set on a copy of a slice from a DataFrame.\n", "Try using .loc[row_indexer,col_indexer] = value instead\n", "\n", "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n", "/opt/anaconda3/lib/python3.7/site-packages/ipykernel_launcher.py:18: FutureWarning: The default value of regex will change from True to False in a future version. In addition, single character regular expressions will*not* be treated as literal strings when regex=True.\n", "/opt/anaconda3/lib/python3.7/site-packages/ipykernel_launcher.py:18: SettingWithCopyWarning: \n", "A value is trying to be set on a copy of a slice from a DataFrame.\n", "Try using .loc[row_indexer,col_indexer] = value instead\n", "\n", "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n", "/opt/anaconda3/lib/python3.7/site-packages/ipykernel_launcher.py:19: FutureWarning: The default value of regex will change from True to False in a future version. In addition, single character regular expressions will*not* be treated as literal strings when regex=True.\n", "/opt/anaconda3/lib/python3.7/site-packages/ipykernel_launcher.py:19: SettingWithCopyWarning: \n", "A value is trying to be set on a copy of a slice from a DataFrame.\n", "Try using .loc[row_indexer,col_indexer] = value instead\n", "\n", "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n", "/opt/anaconda3/lib/python3.7/site-packages/ipykernel_launcher.py:20: FutureWarning: The default value of regex will change from True to False in a future version. In addition, single character regular expressions will*not* be treated as literal strings when regex=True.\n", "/opt/anaconda3/lib/python3.7/site-packages/ipykernel_launcher.py:20: SettingWithCopyWarning: \n", "A value is trying to be set on a copy of a slice from a DataFrame.\n", "Try using .loc[row_indexer,col_indexer] = value instead\n", "\n", "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n", "/opt/anaconda3/lib/python3.7/site-packages/ipykernel_launcher.py:24: FutureWarning: The default value of regex will change from True to False in a future version. In addition, single character regular expressions will*not* be treated as literal strings when regex=True.\n", "/opt/anaconda3/lib/python3.7/site-packages/ipykernel_launcher.py:24: SettingWithCopyWarning: \n", "A value is trying to be set on a copy of a slice from a DataFrame.\n", "Try using .loc[row_indexer,col_indexer] = value instead\n", "\n", "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n", "/opt/anaconda3/lib/python3.7/site-packages/ipykernel_launcher.py:25: FutureWarning: The default value of regex will change from True to False in a future version. In addition, single character regular expressions will*not* be treated as literal strings when regex=True.\n", "/opt/anaconda3/lib/python3.7/site-packages/ipykernel_launcher.py:25: SettingWithCopyWarning: \n", "A value is trying to be set on a copy of a slice from a DataFrame.\n", "Try using .loc[row_indexer,col_indexer] = value instead\n", "\n", "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n", "/opt/anaconda3/lib/python3.7/site-packages/ipykernel_launcher.py:26: FutureWarning: The default value of regex will change from True to False in a future version. In addition, single character regular expressions will*not* be treated as literal strings when regex=True.\n", "/opt/anaconda3/lib/python3.7/site-packages/ipykernel_launcher.py:26: SettingWithCopyWarning: \n", "A value is trying to be set on a copy of a slice from a DataFrame.\n", "Try using .loc[row_indexer,col_indexer] = value instead\n", "\n", "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n", "/opt/anaconda3/lib/python3.7/site-packages/ipykernel_launcher.py:27: FutureWarning: The default value of regex will change from True to False in a future version. In addition, single character regular expressions will*not* be treated as literal strings when regex=True.\n", "/opt/anaconda3/lib/python3.7/site-packages/ipykernel_launcher.py:27: SettingWithCopyWarning: \n", "A value is trying to be set on a copy of a slice from a DataFrame.\n", "Try using .loc[row_indexer,col_indexer] = value instead\n", "\n", "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n", "/opt/anaconda3/lib/python3.7/site-packages/ipykernel_launcher.py:28: FutureWarning: The default value of regex will change from True to False in a future version. In addition, single character regular expressions will*not* be treated as literal strings when regex=True.\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "/opt/anaconda3/lib/python3.7/site-packages/ipykernel_launcher.py:28: SettingWithCopyWarning: \n", "A value is trying to be set on a copy of a slice from a DataFrame.\n", "Try using .loc[row_indexer,col_indexer] = value instead\n", "\n", "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n", "/opt/anaconda3/lib/python3.7/site-packages/ipykernel_launcher.py:33: FutureWarning: Columnar iteration over characters will be deprecated in future releases.\n", "/opt/anaconda3/lib/python3.7/site-packages/ipykernel_launcher.py:33: SettingWithCopyWarning: \n", "A value is trying to be set on a copy of a slice from a DataFrame.\n", "Try using .loc[row_indexer,col_indexer] = value instead\n", "\n", "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n", "/opt/anaconda3/lib/python3.7/site-packages/ipykernel_launcher.py:34: FutureWarning: Columnar iteration over characters will be deprecated in future releases.\n", "/opt/anaconda3/lib/python3.7/site-packages/ipykernel_launcher.py:34: SettingWithCopyWarning: \n", "A value is trying to be set on a copy of a slice from a DataFrame.\n", "Try using .loc[row_indexer,col_indexer] = value instead\n", "\n", "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n", "/opt/anaconda3/lib/python3.7/site-packages/ipykernel_launcher.py:35: FutureWarning: Columnar iteration over characters will be deprecated in future releases.\n", "/opt/anaconda3/lib/python3.7/site-packages/ipykernel_launcher.py:35: SettingWithCopyWarning: \n", "A value is trying to be set on a copy of a slice from a DataFrame.\n", "Try using .loc[row_indexer,col_indexer] = value instead\n", "\n", "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n", "/opt/anaconda3/lib/python3.7/site-packages/ipykernel_launcher.py:36: FutureWarning: Columnar iteration over characters will be deprecated in future releases.\n", "/opt/anaconda3/lib/python3.7/site-packages/ipykernel_launcher.py:36: SettingWithCopyWarning: \n", "A value is trying to be set on a copy of a slice from a DataFrame.\n", "Try using .loc[row_indexer,col_indexer] = value instead\n", "\n", "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n", "/opt/anaconda3/lib/python3.7/site-packages/ipykernel_launcher.py:37: FutureWarning: Columnar iteration over characters will be deprecated in future releases.\n", "/opt/anaconda3/lib/python3.7/site-packages/ipykernel_launcher.py:37: SettingWithCopyWarning: \n", "A value is trying to be set on a copy of a slice from a DataFrame.\n", "Try using .loc[row_indexer,col_indexer] = value instead\n", "\n", "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n" ] }, { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
level_0idindex_xperiodtimestampminutesecondpossessiondurationtype_idtype_namepossession_team_idpossession_team_nameplay_pattern_idplay_pattern_nameteam_idteam_nametactics_formationtactics_lineuprelated_eventslocationplayer_idplayer_nameposition_idposition_namepass_recipient_idpass_recipient_namepass_lengthpass_anglepass_height_idpass_height_namepass_end_locationpass_type_idpass_type_namepass_body_part_idpass_body_part_namecarry_end_locationpass_outcome_idpass_outcome_nameunder_pressureclearance_headclearance_body_part_idclearance_body_part_namecounterpressduel_outcome_idduel_outcome_nameduel_type_idduel_type_nameball_receipt_outcome_idball_receipt_outcome_nameoutclearance_left_footpass_switchoff_cameraclearance_aerial_wondribble_outcome_iddribble_outcome_namepass_crosspass_assisted_shot_idpass_shot_assistshot_statsbomb_xgshot_end_locationshot_key_pass_idshot_body_part_idshot_body_part_nameshot_technique_idshot_technique_nameshot_outcome_idshot_outcome_nameshot_type_idshot_type_nameshot_freeze_framegoalkeeper_end_locationgoalkeeper_type_idgoalkeeper_type_namegoalkeeper_position_idgoalkeeper_position_nameball_recovery_recovery_failurefoul_committed_advantagefoul_won_advantagedribble_overrunclearance_right_footinterception_outcome_idinterception_outcome_namefoul_won_defensivepass_aerial_wonpass_deflectedpass_inswingingpass_technique_idpass_technique_namegoalkeeper_body_part_idgoalkeeper_body_part_namegoalkeeper_technique_idgoalkeeper_technique_namegoalkeeper_outcome_idgoalkeeper_outcome_namepass_outswingingpass_goal_assistshot_one_on_onemiscontrol_aerial_wonshot_deflectedblock_deflectionshot_first_timeblock_offensivepass_through_ballfoul_committed_card_idfoul_committed_card_namefoul_committed_penaltyfoul_won_penaltydribble_nutmegpass_miscommunicationpass_no_touchfoul_committed_offensivegoalkeeper_lost_outpass_straightsubstitution_outcome_idsubstitution_outcome_namesubstitution_replacement_idsubstitution_replacement_namematch_idgoalkeeper_punched_outshot_aerial_wonpass_cut_backgoalkeeper_success_in_play50_50_outcome_id50_50_outcome_namefoul_committed_type_idfoul_committed_type_nameball_recovery_offensiveshot_saved_off_targetgoalkeeper_shot_saved_off_targetshot_open_goaldribble_no_touchbad_behaviour_card_idbad_behaviour_card_namehalf_start_late_video_startblock_save_blockshot_follows_dribbleclearance_othergoalkeeper_shot_saved_to_postshot_redirectinjury_stoppage_in_chainshot_saved_to_postgoalkeeper_success_outgoalkeeper_lost_in_playhalf_end_early_video_endplayer_off_permanentgoalkeeper_saved_to_postpass_backheelshot_kick_offgoalkeeper_penalty_saved_to_postindex_ymatch_datekick_offhome_scoreaway_scorematch_statuslast_updatedmatch_weekrefereestadiumcompetition_competition_idcompetition_country_namecompetition_competition_nameseason_season_idseason_season_namehome_team_home_team_idhome_team_home_team_namehome_team_home_team_genderhome_team_home_team_grouphome_team_managershome_team_country_idhome_team_country_nameaway_team_away_team_idaway_team_away_team_nameaway_team_away_team_genderaway_team_away_team_groupaway_team_managersaway_team_country_idaway_team_country_namemetadata_data_versionmetadata_shot_fidelity_versionmetadata_xy_fidelity_versioncompetition_stage_idcompetition_stage_namecompetition_idseason_idcountry_namecompetition_namecompetition_genderseason_namematch_updatedmatch_availableteamopponentfull_fixture_datelocation_xlocation_ypass_end_location_xpass_end_location_ycarry_end_location_xcarry_end_location_yshot_end_location_xshot_end_location_yshot_end_location_zgoalkeeper_end_location_xgoalkeeper_end_location_y
656484729957b9-d479-49ab-995f-608a19177be55100:00:00.9830021.27863430Pass1Arsenal9From Kick Off1ArsenalNaNNaN['1deff0f2-ee63-4951-90ba-f8a8ff399960']60.0, 40.015512.0Sylvain Wiltord22.0Right Center Forward15515.0Patrick Vieira11.294689-2.7890401.0Ground Pass49.4, 36.165.0Kick Off40.0Right FootnanNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNnanNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNnanNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaN3749493NaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaN192003-08-1616:00:00.00021available2020-07-29T05:001{'id': 1279, 'name': 'None'}NaN2EnglandPremier League442003/20041ArsenalmaleNaNNaN68England29EvertonmaleNaNNaN68England1.1.02.02.01Regular Season244EnglandPremier Leaguemale2003/20042020-08-31T20:40:28.9696352020-08-31T20:40:28.969635ArsenalEverton2003-08-16 Arsenal 2 vs. 1 Everton60.040.049.436.1nanNaNnanNaNNaNnanNaN
6564951deff0f2-ee63-4951-90ba-f8a8ff3999606100:00:02.262022NaN42Ball Receipt*1Arsenal9From Kick Off1ArsenalNaNNaN['729957b9-d479-49ab-995f-608a19177be5']49.4, 36.115515.0Patrick Vieira9.0Right Defensive MidfieldNaNNaNNaNNaNNaNNaNnanNaNNaNNaNNaNnanNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNnanNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNnanNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaN3749493NaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaN192003-08-1616:00:00.00021available2020-07-29T05:001{'id': 1279, 'name': 'None'}NaN2EnglandPremier League442003/20041ArsenalmaleNaNNaN68England29EvertonmaleNaNNaN68England1.1.02.02.01Regular Season244EnglandPremier Leaguemale2003/20042020-08-31T20:40:28.9696352020-08-31T20:40:28.969635ArsenalEverton2003-08-16 Arsenal 2 vs. 1 Everton49.436.1nanNaNnanNaNnanNaNNaNnanNaN
6565061300c0aa-0704-4fcb-a0fd-dc98380ba3c47100:00:02.2620220.17202643Carry1Arsenal9From Kick Off1ArsenalNaNNaN['1deff0f2-ee63-4951-90ba-f8a8ff399960', 'a6f6...49.4, 36.115515.0Patrick Vieira9.0Right Defensive MidfieldNaNNaNNaNNaNNaNNaNnanNaNNaNNaNNaN49.0, 35.9NaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNnanNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNnanNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaN3749493NaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaN192003-08-1616:00:00.00021available2020-07-29T05:001{'id': 1279, 'name': 'None'}NaN2EnglandPremier League442003/20041ArsenalmaleNaNNaN68England29EvertonmaleNaNNaN68England1.1.02.02.01Regular Season244EnglandPremier Leaguemale2003/20042020-08-31T20:40:28.9696352020-08-31T20:40:28.969635ArsenalEverton2003-08-16 Arsenal 2 vs. 1 Everton49.436.1nanNaN49.035.9nanNaNNaNnanNaN
656517a6f65e54-2f12-4c52-9868-318ade5adf0b8100:00:02.4340222.15985630Pass1Arsenal9From Kick Off1ArsenalNaNNaN['10d578c5-4c81-4563-ad15-eb356ac08ee6']49.0, 35.915515.0Patrick Vieira9.0Right Defensive Midfield40222.0Laureano Bisan-Etame Mayer33.1271801.6584501.0Ground Pass46.1, 68.9NaNNaN40.0Right FootnanNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNnanNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNnanNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaN3749493NaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaN192003-08-1616:00:00.00021available2020-07-29T05:001{'id': 1279, 'name': 'None'}NaN2EnglandPremier League442003/20041ArsenalmaleNaNNaN68England29EvertonmaleNaNNaN68England1.1.02.02.01Regular Season244EnglandPremier Leaguemale2003/20042020-08-31T20:40:28.9696352020-08-31T20:40:28.969635ArsenalEverton2003-08-16 Arsenal 2 vs. 1 Everton49.035.946.168.9nanNaNnanNaNNaNnanNaN
65652810d578c5-4c81-4563-ad15-eb356ac08ee69100:00:04.593042NaN42Ball Receipt*1Arsenal9From Kick Off1ArsenalNaNNaN['a6f65e54-2f12-4c52-9868-318ade5adf0b']46.1, 68.940222.0Laureano Bisan-Etame Mayer2.0Right BackNaNNaNNaNNaNNaNNaNnanNaNNaNNaNNaNnanNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNnanNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNnanNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaN3749493NaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaN192003-08-1616:00:00.00021available2020-07-29T05:001{'id': 1279, 'name': 'None'}NaN2EnglandPremier League442003/20041ArsenalmaleNaNNaN68England29EvertonmaleNaNNaN68England1.1.02.02.01Regular Season244EnglandPremier Leaguemale2003/20042020-08-31T20:40:28.9696352020-08-31T20:40:28.969635ArsenalEverton2003-08-16 Arsenal 2 vs. 1 Everton46.168.9nanNaNnanNaNnanNaNNaNnanNaN
6565398b68a8cf-7574-4f98-8a34-f12f9171a19410100:00:04.5930420.71150843Carry1Arsenal9From Kick Off1ArsenalNaNNaN['10d578c5-4c81-4563-ad15-eb356ac08ee6', '7a9e...46.1, 68.940222.0Laureano Bisan-Etame Mayer2.0Right BackNaNNaNNaNNaNNaNNaNnanNaNNaNNaNNaN46.7, 68.9NaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNnanNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNnanNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaN3749493NaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaN192003-08-1616:00:00.00021available2020-07-29T05:001{'id': 1279, 'name': 'None'}NaN2EnglandPremier League442003/20041ArsenalmaleNaNNaN68England29EvertonmaleNaNNaN68England1.1.02.02.01Regular Season244EnglandPremier Leaguemale2003/20042020-08-31T20:40:28.9696352020-08-31T20:40:28.969635ArsenalEverton2003-08-16 Arsenal 2 vs. 1 Everton46.168.9nanNaN46.768.9nanNaNNaNnanNaN
65654107a9e4bcf-d6d9-453a-a4ab-c5c19489646b11100:00:05.3050521.20369930Pass1Arsenal9From Kick Off1ArsenalNaNNaN['66f3ea0a-ccc5-417a-8134-b9e400a2ba9c']46.7, 68.940222.0Laureano Bisan-Etame Mayer2.0Right Back15754.0Fredrik Ljungberg9.0049980.5232781.0Ground Pass54.5, 73.4NaNNaN40.0Right FootnanNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNnanNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNnanNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaN3749493NaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaN192003-08-1616:00:00.00021available2020-07-29T05:001{'id': 1279, 'name': 'None'}NaN2EnglandPremier League442003/20041ArsenalmaleNaNNaN68England29EvertonmaleNaNNaN68England1.1.02.02.01Regular Season244EnglandPremier Leaguemale2003/20042020-08-31T20:40:28.9696352020-08-31T20:40:28.969635ArsenalEverton2003-08-16 Arsenal 2 vs. 1 Everton46.768.954.573.4nanNaNnanNaNNaNnanNaN
656551166f3ea0a-ccc5-417a-8134-b9e400a2ba9c12100:00:06.509062NaN42Ball Receipt*1Arsenal9From Kick Off1ArsenalNaNNaN['7a9e4bcf-d6d9-453a-a4ab-c5c19489646b']54.5, 73.415754.0Fredrik Ljungberg12.0Right MidfieldNaNNaNNaNNaNNaNNaNnanNaNNaNNaNNaNnanNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNnanNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNnanNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaN3749493NaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaN192003-08-1616:00:00.00021available2020-07-29T05:001{'id': 1279, 'name': 'None'}NaN2EnglandPremier League442003/20041ArsenalmaleNaNNaN68England29EvertonmaleNaNNaN68England1.1.02.02.01Regular Season244EnglandPremier Leaguemale2003/20042020-08-31T20:40:28.9696352020-08-31T20:40:28.969635ArsenalEverton2003-08-16 Arsenal 2 vs. 1 Everton54.573.4nanNaNnanNaNnanNaNNaNnanNaN
656561202221287-278f-4a3a-be77-3dd0f1fc1d0913100:00:06.5090620.63667343Carry1Arsenal9From Kick Off1ArsenalNaNNaN['66f3ea0a-ccc5-417a-8134-b9e400a2ba9c', 'f8c9...54.5, 73.415754.0Fredrik Ljungberg12.0Right MidfieldNaNNaNNaNNaNNaNNaNnanNaNNaNNaNNaN54.9, 73.2NaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNnanNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNnanNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaN3749493NaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaN192003-08-1616:00:00.00021available2020-07-29T05:001{'id': 1279, 'name': 'None'}NaN2EnglandPremier League442003/20041ArsenalmaleNaNNaN68England29EvertonmaleNaNNaN68England1.1.02.02.01Regular Season244EnglandPremier Leaguemale2003/20042020-08-31T20:40:28.9696352020-08-31T20:40:28.969635ArsenalEverton2003-08-16 Arsenal 2 vs. 1 Everton54.573.4nanNaN54.973.2nanNaNNaNnanNaN
6565713f8c972df-6b67-45de-98e2-87720bb4353614100:00:07.1450721.09497130Pass1Arsenal9From Kick Off1ArsenalNaNNaN['5e5b4022-e7f1-4627-9fcc-49fb1e87cec7']54.9, 73.215754.0Fredrik Ljungberg12.0Right Midfield40221.0Gilberto Aparecido da Silva10.080674-1.3811831.0Ground Pass56.8, 63.3NaNNaN40.0Right FootnanNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNnanNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNnanNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaN3749493NaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaN192003-08-1616:00:00.00021available2020-07-29T05:001{'id': 1279, 'name': 'None'}NaN2EnglandPremier League442003/20041ArsenalmaleNaNNaN68England29EvertonmaleNaNNaN68England1.1.02.02.01Regular Season244EnglandPremier Leaguemale2003/20042020-08-31T20:40:28.9696352020-08-31T20:40:28.969635ArsenalEverton2003-08-16 Arsenal 2 vs. 1 Everton54.973.256.863.3nanNaNnanNaNNaNnanNaN
\n", "
" ], "text/plain": [ " level_0 id index_x period \\\n", "65648 4 729957b9-d479-49ab-995f-608a19177be5 5 1 \n", "65649 5 1deff0f2-ee63-4951-90ba-f8a8ff399960 6 1 \n", "65650 6 1300c0aa-0704-4fcb-a0fd-dc98380ba3c4 7 1 \n", "65651 7 a6f65e54-2f12-4c52-9868-318ade5adf0b 8 1 \n", "65652 8 10d578c5-4c81-4563-ad15-eb356ac08ee6 9 1 \n", "65653 9 8b68a8cf-7574-4f98-8a34-f12f9171a194 10 1 \n", "65654 10 7a9e4bcf-d6d9-453a-a4ab-c5c19489646b 11 1 \n", "65655 11 66f3ea0a-ccc5-417a-8134-b9e400a2ba9c 12 1 \n", "65656 12 02221287-278f-4a3a-be77-3dd0f1fc1d09 13 1 \n", "65657 13 f8c972df-6b67-45de-98e2-87720bb43536 14 1 \n", "\n", " timestamp minute second possession duration type_id \\\n", "65648 00:00:00.983 0 0 2 1.278634 30 \n", "65649 00:00:02.262 0 2 2 NaN 42 \n", "65650 00:00:02.262 0 2 2 0.172026 43 \n", "65651 00:00:02.434 0 2 2 2.159856 30 \n", "65652 00:00:04.593 0 4 2 NaN 42 \n", "65653 00:00:04.593 0 4 2 0.711508 43 \n", "65654 00:00:05.305 0 5 2 1.203699 30 \n", "65655 00:00:06.509 0 6 2 NaN 42 \n", "65656 00:00:06.509 0 6 2 0.636673 43 \n", "65657 00:00:07.145 0 7 2 1.094971 30 \n", "\n", " type_name possession_team_id possession_team_name \\\n", "65648 Pass 1 Arsenal \n", "65649 Ball Receipt* 1 Arsenal \n", "65650 Carry 1 Arsenal \n", "65651 Pass 1 Arsenal \n", "65652 Ball Receipt* 1 Arsenal \n", "65653 Carry 1 Arsenal \n", "65654 Pass 1 Arsenal \n", "65655 Ball Receipt* 1 Arsenal \n", "65656 Carry 1 Arsenal \n", "65657 Pass 1 Arsenal \n", "\n", " play_pattern_id play_pattern_name team_id team_name \\\n", "65648 9 From Kick Off 1 Arsenal \n", "65649 9 From Kick Off 1 Arsenal \n", "65650 9 From Kick Off 1 Arsenal \n", "65651 9 From Kick Off 1 Arsenal \n", "65652 9 From Kick Off 1 Arsenal \n", "65653 9 From Kick Off 1 Arsenal \n", "65654 9 From Kick Off 1 Arsenal \n", "65655 9 From Kick Off 1 Arsenal \n", "65656 9 From Kick Off 1 Arsenal \n", "65657 9 From Kick Off 1 Arsenal \n", "\n", " tactics_formation tactics_lineup \\\n", "65648 NaN NaN \n", "65649 NaN NaN \n", "65650 NaN NaN \n", "65651 NaN NaN \n", "65652 NaN NaN \n", "65653 NaN NaN \n", "65654 NaN NaN \n", "65655 NaN NaN \n", "65656 NaN NaN \n", "65657 NaN NaN \n", "\n", " related_events location \\\n", "65648 ['1deff0f2-ee63-4951-90ba-f8a8ff399960'] 60.0, 40.0 \n", "65649 ['729957b9-d479-49ab-995f-608a19177be5'] 49.4, 36.1 \n", "65650 ['1deff0f2-ee63-4951-90ba-f8a8ff399960', 'a6f6... 49.4, 36.1 \n", "65651 ['10d578c5-4c81-4563-ad15-eb356ac08ee6'] 49.0, 35.9 \n", "65652 ['a6f65e54-2f12-4c52-9868-318ade5adf0b'] 46.1, 68.9 \n", "65653 ['10d578c5-4c81-4563-ad15-eb356ac08ee6', '7a9e... 46.1, 68.9 \n", "65654 ['66f3ea0a-ccc5-417a-8134-b9e400a2ba9c'] 46.7, 68.9 \n", "65655 ['7a9e4bcf-d6d9-453a-a4ab-c5c19489646b'] 54.5, 73.4 \n", "65656 ['66f3ea0a-ccc5-417a-8134-b9e400a2ba9c', 'f8c9... 54.5, 73.4 \n", "65657 ['5e5b4022-e7f1-4627-9fcc-49fb1e87cec7'] 54.9, 73.2 \n", "\n", " player_id player_name position_id \\\n", "65648 15512.0 Sylvain Wiltord 22.0 \n", "65649 15515.0 Patrick Vieira 9.0 \n", "65650 15515.0 Patrick Vieira 9.0 \n", "65651 15515.0 Patrick Vieira 9.0 \n", "65652 40222.0 Laureano Bisan-Etame Mayer 2.0 \n", "65653 40222.0 Laureano Bisan-Etame Mayer 2.0 \n", "65654 40222.0 Laureano Bisan-Etame Mayer 2.0 \n", "65655 15754.0 Fredrik Ljungberg 12.0 \n", "65656 15754.0 Fredrik Ljungberg 12.0 \n", "65657 15754.0 Fredrik Ljungberg 12.0 \n", "\n", " position_name pass_recipient_id \\\n", "65648 Right Center Forward 15515.0 \n", "65649 Right Defensive Midfield NaN \n", "65650 Right Defensive Midfield NaN \n", "65651 Right Defensive Midfield 40222.0 \n", "65652 Right Back NaN \n", "65653 Right Back NaN \n", "65654 Right Back 15754.0 \n", "65655 Right Midfield NaN \n", "65656 Right Midfield NaN \n", "65657 Right Midfield 40221.0 \n", "\n", " pass_recipient_name pass_length pass_angle pass_height_id \\\n", "65648 Patrick Vieira 11.294689 -2.789040 1.0 \n", "65649 NaN NaN NaN NaN \n", "65650 NaN NaN NaN NaN \n", "65651 Laureano Bisan-Etame Mayer 33.127180 1.658450 1.0 \n", "65652 NaN NaN NaN NaN \n", "65653 NaN NaN NaN NaN \n", "65654 Fredrik Ljungberg 9.004998 0.523278 1.0 \n", "65655 NaN NaN NaN NaN \n", "65656 NaN NaN NaN NaN \n", "65657 Gilberto Aparecido da Silva 10.080674 -1.381183 1.0 \n", "\n", " pass_height_name pass_end_location pass_type_id pass_type_name \\\n", "65648 Ground Pass 49.4, 36.1 65.0 Kick Off \n", "65649 NaN nan NaN NaN \n", "65650 NaN nan NaN NaN \n", "65651 Ground Pass 46.1, 68.9 NaN NaN \n", "65652 NaN nan NaN NaN \n", "65653 NaN nan NaN NaN \n", "65654 Ground Pass 54.5, 73.4 NaN NaN \n", "65655 NaN nan NaN NaN \n", "65656 NaN nan NaN NaN \n", "65657 Ground Pass 56.8, 63.3 NaN NaN \n", "\n", " pass_body_part_id pass_body_part_name carry_end_location \\\n", "65648 40.0 Right Foot nan \n", "65649 NaN NaN nan \n", "65650 NaN NaN 49.0, 35.9 \n", "65651 40.0 Right Foot nan \n", "65652 NaN NaN nan \n", "65653 NaN NaN 46.7, 68.9 \n", "65654 40.0 Right Foot nan \n", "65655 NaN NaN nan \n", "65656 NaN NaN 54.9, 73.2 \n", "65657 40.0 Right Foot nan \n", "\n", " pass_outcome_id pass_outcome_name under_pressure clearance_head \\\n", "65648 NaN NaN NaN NaN \n", "65649 NaN NaN NaN NaN \n", "65650 NaN NaN NaN NaN \n", "65651 NaN NaN NaN NaN \n", "65652 NaN NaN NaN NaN \n", "65653 NaN NaN NaN NaN \n", "65654 NaN NaN NaN NaN \n", "65655 NaN NaN NaN NaN \n", "65656 NaN NaN NaN NaN \n", "65657 NaN NaN NaN NaN \n", "\n", " clearance_body_part_id clearance_body_part_name counterpress \\\n", "65648 NaN NaN NaN \n", "65649 NaN NaN NaN \n", "65650 NaN NaN NaN \n", "65651 NaN NaN NaN \n", "65652 NaN NaN NaN \n", "65653 NaN NaN NaN \n", "65654 NaN NaN NaN \n", "65655 NaN NaN NaN \n", "65656 NaN NaN NaN \n", "65657 NaN NaN NaN \n", "\n", " duel_outcome_id duel_outcome_name duel_type_id duel_type_name \\\n", "65648 NaN NaN NaN NaN \n", "65649 NaN NaN NaN NaN \n", "65650 NaN NaN NaN NaN \n", "65651 NaN NaN NaN NaN \n", "65652 NaN NaN NaN NaN \n", "65653 NaN NaN NaN NaN \n", "65654 NaN NaN NaN NaN \n", "65655 NaN NaN NaN NaN \n", "65656 NaN NaN NaN NaN \n", "65657 NaN NaN NaN NaN \n", "\n", " ball_receipt_outcome_id ball_receipt_outcome_name out \\\n", "65648 NaN NaN NaN \n", "65649 NaN NaN NaN \n", "65650 NaN NaN NaN \n", "65651 NaN NaN NaN \n", "65652 NaN NaN NaN \n", "65653 NaN NaN NaN \n", "65654 NaN NaN NaN \n", "65655 NaN NaN NaN \n", "65656 NaN NaN NaN \n", "65657 NaN NaN NaN \n", "\n", " clearance_left_foot pass_switch off_camera clearance_aerial_won \\\n", "65648 NaN NaN NaN NaN \n", "65649 NaN NaN NaN NaN \n", "65650 NaN NaN NaN NaN \n", "65651 NaN NaN NaN NaN \n", "65652 NaN NaN NaN NaN \n", "65653 NaN NaN NaN NaN \n", "65654 NaN NaN NaN NaN \n", "65655 NaN NaN NaN NaN \n", "65656 NaN NaN NaN NaN \n", "65657 NaN NaN NaN NaN \n", "\n", " dribble_outcome_id dribble_outcome_name pass_cross \\\n", "65648 NaN NaN NaN \n", "65649 NaN NaN NaN \n", "65650 NaN NaN NaN \n", "65651 NaN NaN NaN \n", "65652 NaN NaN NaN \n", "65653 NaN NaN NaN \n", "65654 NaN NaN NaN \n", "65655 NaN NaN NaN \n", "65656 NaN NaN NaN \n", "65657 NaN NaN NaN \n", "\n", " pass_assisted_shot_id pass_shot_assist shot_statsbomb_xg \\\n", "65648 NaN NaN NaN \n", "65649 NaN NaN NaN \n", "65650 NaN NaN NaN \n", "65651 NaN NaN NaN \n", "65652 NaN NaN NaN \n", "65653 NaN NaN NaN \n", "65654 NaN NaN NaN \n", "65655 NaN NaN NaN \n", "65656 NaN NaN NaN \n", "65657 NaN NaN NaN \n", "\n", " shot_end_location shot_key_pass_id shot_body_part_id \\\n", "65648 nan NaN NaN \n", "65649 nan NaN NaN \n", "65650 nan NaN NaN \n", "65651 nan NaN NaN \n", "65652 nan NaN NaN \n", "65653 nan NaN NaN \n", "65654 nan NaN NaN \n", "65655 nan NaN NaN \n", "65656 nan NaN NaN \n", "65657 nan NaN NaN \n", "\n", " shot_body_part_name shot_technique_id shot_technique_name \\\n", "65648 NaN NaN NaN \n", "65649 NaN NaN NaN \n", "65650 NaN NaN NaN \n", "65651 NaN NaN NaN \n", "65652 NaN NaN NaN \n", "65653 NaN NaN NaN \n", "65654 NaN NaN NaN \n", "65655 NaN NaN NaN \n", "65656 NaN NaN NaN \n", "65657 NaN NaN NaN \n", "\n", " shot_outcome_id shot_outcome_name shot_type_id shot_type_name \\\n", "65648 NaN NaN NaN NaN \n", "65649 NaN NaN NaN NaN \n", "65650 NaN NaN NaN NaN \n", "65651 NaN NaN NaN NaN \n", "65652 NaN NaN NaN NaN \n", "65653 NaN NaN NaN NaN \n", "65654 NaN NaN NaN NaN \n", "65655 NaN NaN NaN NaN \n", "65656 NaN NaN NaN NaN \n", "65657 NaN NaN NaN NaN \n", "\n", " shot_freeze_frame goalkeeper_end_location goalkeeper_type_id \\\n", "65648 NaN nan NaN \n", "65649 NaN nan NaN \n", "65650 NaN nan NaN \n", "65651 NaN nan NaN \n", "65652 NaN nan NaN \n", "65653 NaN nan NaN \n", "65654 NaN nan NaN \n", "65655 NaN nan NaN \n", "65656 NaN nan NaN \n", "65657 NaN nan NaN \n", "\n", " goalkeeper_type_name goalkeeper_position_id goalkeeper_position_name \\\n", "65648 NaN NaN NaN \n", "65649 NaN NaN NaN \n", "65650 NaN NaN NaN \n", "65651 NaN NaN NaN \n", "65652 NaN NaN NaN \n", "65653 NaN NaN NaN \n", "65654 NaN NaN NaN \n", "65655 NaN NaN NaN \n", "65656 NaN NaN NaN \n", "65657 NaN NaN NaN \n", "\n", " ball_recovery_recovery_failure foul_committed_advantage \\\n", "65648 NaN NaN \n", "65649 NaN NaN \n", "65650 NaN NaN \n", "65651 NaN NaN \n", "65652 NaN NaN \n", "65653 NaN NaN \n", "65654 NaN NaN \n", "65655 NaN NaN \n", "65656 NaN NaN \n", "65657 NaN NaN \n", "\n", " foul_won_advantage dribble_overrun clearance_right_foot \\\n", "65648 NaN NaN NaN \n", "65649 NaN NaN NaN \n", "65650 NaN NaN NaN \n", "65651 NaN NaN NaN \n", "65652 NaN NaN NaN \n", "65653 NaN NaN NaN \n", "65654 NaN NaN NaN \n", "65655 NaN NaN NaN \n", "65656 NaN NaN NaN \n", "65657 NaN NaN NaN \n", "\n", " interception_outcome_id interception_outcome_name foul_won_defensive \\\n", "65648 NaN NaN NaN \n", "65649 NaN NaN NaN \n", "65650 NaN NaN NaN \n", "65651 NaN NaN NaN \n", "65652 NaN NaN NaN \n", "65653 NaN NaN NaN \n", "65654 NaN NaN NaN \n", "65655 NaN NaN NaN \n", "65656 NaN NaN NaN \n", "65657 NaN NaN NaN \n", "\n", " pass_aerial_won pass_deflected pass_inswinging pass_technique_id \\\n", "65648 NaN NaN NaN NaN \n", "65649 NaN NaN NaN NaN \n", "65650 NaN NaN NaN NaN \n", "65651 NaN NaN NaN NaN \n", "65652 NaN NaN NaN NaN \n", "65653 NaN NaN NaN NaN \n", "65654 NaN NaN NaN NaN \n", "65655 NaN NaN NaN NaN \n", "65656 NaN NaN NaN NaN \n", "65657 NaN NaN NaN NaN \n", "\n", " pass_technique_name goalkeeper_body_part_id goalkeeper_body_part_name \\\n", "65648 NaN NaN NaN \n", "65649 NaN NaN NaN \n", "65650 NaN NaN NaN \n", "65651 NaN NaN NaN \n", "65652 NaN NaN NaN \n", "65653 NaN NaN NaN \n", "65654 NaN NaN NaN \n", "65655 NaN NaN NaN \n", "65656 NaN NaN NaN \n", "65657 NaN NaN NaN \n", "\n", " goalkeeper_technique_id goalkeeper_technique_name \\\n", "65648 NaN NaN \n", "65649 NaN NaN \n", "65650 NaN NaN \n", "65651 NaN NaN \n", "65652 NaN NaN \n", "65653 NaN NaN \n", "65654 NaN NaN \n", "65655 NaN NaN \n", "65656 NaN NaN \n", "65657 NaN NaN \n", "\n", " goalkeeper_outcome_id goalkeeper_outcome_name pass_outswinging \\\n", "65648 NaN NaN NaN \n", "65649 NaN NaN NaN \n", "65650 NaN NaN NaN \n", "65651 NaN NaN NaN \n", "65652 NaN NaN NaN \n", "65653 NaN NaN NaN \n", "65654 NaN NaN NaN \n", "65655 NaN NaN NaN \n", "65656 NaN NaN NaN \n", "65657 NaN NaN NaN \n", "\n", " pass_goal_assist shot_one_on_one miscontrol_aerial_won shot_deflected \\\n", "65648 NaN NaN NaN NaN \n", "65649 NaN NaN NaN NaN \n", "65650 NaN NaN NaN NaN \n", "65651 NaN NaN NaN NaN \n", "65652 NaN NaN NaN NaN \n", "65653 NaN NaN NaN NaN \n", "65654 NaN NaN NaN NaN \n", "65655 NaN NaN NaN NaN \n", "65656 NaN NaN NaN NaN \n", "65657 NaN NaN NaN NaN \n", "\n", " block_deflection shot_first_time block_offensive pass_through_ball \\\n", "65648 NaN NaN NaN NaN \n", "65649 NaN NaN NaN NaN \n", "65650 NaN NaN NaN NaN \n", "65651 NaN NaN NaN NaN \n", "65652 NaN NaN NaN NaN \n", "65653 NaN NaN NaN NaN \n", "65654 NaN NaN NaN NaN \n", "65655 NaN NaN NaN NaN \n", "65656 NaN NaN NaN NaN \n", "65657 NaN NaN NaN NaN \n", "\n", " foul_committed_card_id foul_committed_card_name foul_committed_penalty \\\n", "65648 NaN NaN NaN \n", "65649 NaN NaN NaN \n", "65650 NaN NaN NaN \n", "65651 NaN NaN NaN \n", "65652 NaN NaN NaN \n", "65653 NaN NaN NaN \n", "65654 NaN NaN NaN \n", "65655 NaN NaN NaN \n", "65656 NaN NaN NaN \n", "65657 NaN NaN NaN \n", "\n", " foul_won_penalty dribble_nutmeg pass_miscommunication pass_no_touch \\\n", "65648 NaN NaN NaN NaN \n", "65649 NaN NaN NaN NaN \n", "65650 NaN NaN NaN NaN \n", "65651 NaN NaN NaN NaN \n", "65652 NaN NaN NaN NaN \n", "65653 NaN NaN NaN NaN \n", "65654 NaN NaN NaN NaN \n", "65655 NaN NaN NaN NaN \n", "65656 NaN NaN NaN NaN \n", "65657 NaN NaN NaN NaN \n", "\n", " foul_committed_offensive goalkeeper_lost_out pass_straight \\\n", "65648 NaN NaN NaN \n", "65649 NaN NaN NaN \n", "65650 NaN NaN NaN \n", "65651 NaN NaN NaN \n", "65652 NaN NaN NaN \n", "65653 NaN NaN NaN \n", "65654 NaN NaN NaN \n", "65655 NaN NaN NaN \n", "65656 NaN NaN NaN \n", "65657 NaN NaN NaN \n", "\n", " substitution_outcome_id substitution_outcome_name \\\n", "65648 NaN NaN \n", "65649 NaN NaN \n", "65650 NaN NaN \n", "65651 NaN NaN \n", "65652 NaN NaN \n", "65653 NaN NaN \n", "65654 NaN NaN \n", "65655 NaN NaN \n", "65656 NaN NaN \n", "65657 NaN NaN \n", "\n", " substitution_replacement_id substitution_replacement_name match_id \\\n", "65648 NaN NaN 3749493 \n", "65649 NaN NaN 3749493 \n", "65650 NaN NaN 3749493 \n", "65651 NaN NaN 3749493 \n", "65652 NaN NaN 3749493 \n", "65653 NaN NaN 3749493 \n", "65654 NaN NaN 3749493 \n", "65655 NaN NaN 3749493 \n", "65656 NaN NaN 3749493 \n", "65657 NaN NaN 3749493 \n", "\n", " goalkeeper_punched_out shot_aerial_won pass_cut_back \\\n", "65648 NaN NaN NaN \n", "65649 NaN NaN NaN \n", "65650 NaN NaN NaN \n", "65651 NaN NaN NaN \n", "65652 NaN NaN NaN \n", "65653 NaN NaN NaN \n", "65654 NaN NaN NaN \n", "65655 NaN NaN NaN \n", "65656 NaN NaN NaN \n", "65657 NaN NaN NaN \n", "\n", " goalkeeper_success_in_play 50_50_outcome_id 50_50_outcome_name \\\n", "65648 NaN NaN NaN \n", "65649 NaN NaN NaN \n", "65650 NaN NaN NaN \n", "65651 NaN NaN NaN \n", "65652 NaN NaN NaN \n", "65653 NaN NaN NaN \n", "65654 NaN NaN NaN \n", "65655 NaN NaN NaN \n", "65656 NaN NaN NaN \n", "65657 NaN NaN NaN \n", "\n", " foul_committed_type_id foul_committed_type_name \\\n", "65648 NaN NaN \n", "65649 NaN NaN \n", "65650 NaN NaN \n", "65651 NaN NaN \n", "65652 NaN NaN \n", "65653 NaN NaN \n", "65654 NaN NaN \n", "65655 NaN NaN \n", "65656 NaN NaN \n", "65657 NaN NaN \n", "\n", " ball_recovery_offensive shot_saved_off_target \\\n", "65648 NaN NaN \n", "65649 NaN NaN \n", "65650 NaN NaN \n", "65651 NaN NaN \n", "65652 NaN NaN \n", "65653 NaN NaN \n", "65654 NaN NaN \n", "65655 NaN NaN \n", "65656 NaN NaN \n", "65657 NaN NaN \n", "\n", " goalkeeper_shot_saved_off_target shot_open_goal dribble_no_touch \\\n", "65648 NaN NaN NaN \n", "65649 NaN NaN NaN \n", "65650 NaN NaN NaN \n", "65651 NaN NaN NaN \n", "65652 NaN NaN NaN \n", "65653 NaN NaN NaN \n", "65654 NaN NaN NaN \n", "65655 NaN NaN NaN \n", "65656 NaN NaN NaN \n", "65657 NaN NaN NaN \n", "\n", " bad_behaviour_card_id bad_behaviour_card_name \\\n", "65648 NaN NaN \n", "65649 NaN NaN \n", "65650 NaN NaN \n", "65651 NaN NaN \n", "65652 NaN NaN \n", "65653 NaN NaN \n", "65654 NaN NaN \n", "65655 NaN NaN \n", "65656 NaN NaN \n", "65657 NaN NaN \n", "\n", " half_start_late_video_start block_save_block shot_follows_dribble \\\n", "65648 NaN NaN NaN \n", "65649 NaN NaN NaN \n", "65650 NaN NaN NaN \n", "65651 NaN NaN NaN \n", "65652 NaN NaN NaN \n", "65653 NaN NaN NaN \n", "65654 NaN NaN NaN \n", "65655 NaN NaN NaN \n", "65656 NaN NaN NaN \n", "65657 NaN NaN NaN \n", "\n", " clearance_other goalkeeper_shot_saved_to_post shot_redirect \\\n", "65648 NaN NaN NaN \n", "65649 NaN NaN NaN \n", "65650 NaN NaN NaN \n", "65651 NaN NaN NaN \n", "65652 NaN NaN NaN \n", "65653 NaN NaN NaN \n", "65654 NaN NaN NaN \n", "65655 NaN NaN NaN \n", "65656 NaN NaN NaN \n", "65657 NaN NaN NaN \n", "\n", " injury_stoppage_in_chain shot_saved_to_post goalkeeper_success_out \\\n", "65648 NaN NaN NaN \n", "65649 NaN NaN NaN \n", "65650 NaN NaN NaN \n", "65651 NaN NaN NaN \n", "65652 NaN NaN NaN \n", "65653 NaN NaN NaN \n", "65654 NaN NaN NaN \n", "65655 NaN NaN NaN \n", "65656 NaN NaN NaN \n", "65657 NaN NaN NaN \n", "\n", " goalkeeper_lost_in_play half_end_early_video_end player_off_permanent \\\n", "65648 NaN NaN NaN \n", "65649 NaN NaN NaN \n", "65650 NaN NaN NaN \n", "65651 NaN NaN NaN \n", "65652 NaN NaN NaN \n", "65653 NaN NaN NaN \n", "65654 NaN NaN NaN \n", "65655 NaN NaN NaN \n", "65656 NaN NaN NaN \n", "65657 NaN NaN NaN \n", "\n", " goalkeeper_saved_to_post pass_backheel shot_kick_off \\\n", "65648 NaN NaN NaN \n", "65649 NaN NaN NaN \n", "65650 NaN NaN NaN \n", "65651 NaN NaN NaN \n", "65652 NaN NaN NaN \n", "65653 NaN NaN NaN \n", "65654 NaN NaN NaN \n", "65655 NaN NaN NaN \n", "65656 NaN NaN NaN \n", "65657 NaN NaN NaN \n", "\n", " goalkeeper_penalty_saved_to_post index_y match_date kick_off \\\n", "65648 NaN 19 2003-08-16 16:00:00.000 \n", "65649 NaN 19 2003-08-16 16:00:00.000 \n", "65650 NaN 19 2003-08-16 16:00:00.000 \n", "65651 NaN 19 2003-08-16 16:00:00.000 \n", "65652 NaN 19 2003-08-16 16:00:00.000 \n", "65653 NaN 19 2003-08-16 16:00:00.000 \n", "65654 NaN 19 2003-08-16 16:00:00.000 \n", "65655 NaN 19 2003-08-16 16:00:00.000 \n", "65656 NaN 19 2003-08-16 16:00:00.000 \n", "65657 NaN 19 2003-08-16 16:00:00.000 \n", "\n", " home_score away_score match_status last_updated match_week \\\n", "65648 2 1 available 2020-07-29T05:00 1 \n", "65649 2 1 available 2020-07-29T05:00 1 \n", "65650 2 1 available 2020-07-29T05:00 1 \n", "65651 2 1 available 2020-07-29T05:00 1 \n", "65652 2 1 available 2020-07-29T05:00 1 \n", "65653 2 1 available 2020-07-29T05:00 1 \n", "65654 2 1 available 2020-07-29T05:00 1 \n", "65655 2 1 available 2020-07-29T05:00 1 \n", "65656 2 1 available 2020-07-29T05:00 1 \n", "65657 2 1 available 2020-07-29T05:00 1 \n", "\n", " referee stadium competition_competition_id \\\n", "65648 {'id': 1279, 'name': 'None'} NaN 2 \n", "65649 {'id': 1279, 'name': 'None'} NaN 2 \n", "65650 {'id': 1279, 'name': 'None'} NaN 2 \n", "65651 {'id': 1279, 'name': 'None'} NaN 2 \n", "65652 {'id': 1279, 'name': 'None'} NaN 2 \n", "65653 {'id': 1279, 'name': 'None'} NaN 2 \n", "65654 {'id': 1279, 'name': 'None'} NaN 2 \n", "65655 {'id': 1279, 'name': 'None'} NaN 2 \n", "65656 {'id': 1279, 'name': 'None'} NaN 2 \n", "65657 {'id': 1279, 'name': 'None'} NaN 2 \n", "\n", " competition_country_name competition_competition_name season_season_id \\\n", "65648 England Premier League 44 \n", "65649 England Premier League 44 \n", "65650 England Premier League 44 \n", "65651 England Premier League 44 \n", "65652 England Premier League 44 \n", "65653 England Premier League 44 \n", "65654 England Premier League 44 \n", "65655 England Premier League 44 \n", "65656 England Premier League 44 \n", "65657 England Premier League 44 \n", "\n", " season_season_name home_team_home_team_id home_team_home_team_name \\\n", "65648 2003/2004 1 Arsenal \n", "65649 2003/2004 1 Arsenal \n", "65650 2003/2004 1 Arsenal \n", "65651 2003/2004 1 Arsenal \n", "65652 2003/2004 1 Arsenal \n", "65653 2003/2004 1 Arsenal \n", "65654 2003/2004 1 Arsenal \n", "65655 2003/2004 1 Arsenal \n", "65656 2003/2004 1 Arsenal \n", "65657 2003/2004 1 Arsenal \n", "\n", " home_team_home_team_gender home_team_home_team_group home_team_managers \\\n", "65648 male NaN NaN \n", "65649 male NaN NaN \n", "65650 male NaN NaN \n", "65651 male NaN NaN \n", "65652 male NaN NaN \n", "65653 male NaN NaN \n", "65654 male NaN NaN \n", "65655 male NaN NaN \n", "65656 male NaN NaN \n", "65657 male NaN NaN \n", "\n", " home_team_country_id home_team_country_name away_team_away_team_id \\\n", "65648 68 England 29 \n", "65649 68 England 29 \n", "65650 68 England 29 \n", "65651 68 England 29 \n", "65652 68 England 29 \n", "65653 68 England 29 \n", "65654 68 England 29 \n", "65655 68 England 29 \n", "65656 68 England 29 \n", "65657 68 England 29 \n", "\n", " away_team_away_team_name away_team_away_team_gender \\\n", "65648 Everton male \n", "65649 Everton male \n", "65650 Everton male \n", "65651 Everton male \n", "65652 Everton male \n", "65653 Everton male \n", "65654 Everton male \n", "65655 Everton male \n", "65656 Everton male \n", "65657 Everton male \n", "\n", " away_team_away_team_group away_team_managers away_team_country_id \\\n", "65648 NaN NaN 68 \n", "65649 NaN NaN 68 \n", "65650 NaN NaN 68 \n", "65651 NaN NaN 68 \n", "65652 NaN NaN 68 \n", "65653 NaN NaN 68 \n", "65654 NaN NaN 68 \n", "65655 NaN NaN 68 \n", "65656 NaN NaN 68 \n", "65657 NaN NaN 68 \n", "\n", " away_team_country_name metadata_data_version \\\n", "65648 England 1.1.0 \n", "65649 England 1.1.0 \n", "65650 England 1.1.0 \n", "65651 England 1.1.0 \n", "65652 England 1.1.0 \n", "65653 England 1.1.0 \n", "65654 England 1.1.0 \n", "65655 England 1.1.0 \n", "65656 England 1.1.0 \n", "65657 England 1.1.0 \n", "\n", " metadata_shot_fidelity_version metadata_xy_fidelity_version \\\n", "65648 2.0 2.0 \n", "65649 2.0 2.0 \n", "65650 2.0 2.0 \n", "65651 2.0 2.0 \n", "65652 2.0 2.0 \n", "65653 2.0 2.0 \n", "65654 2.0 2.0 \n", "65655 2.0 2.0 \n", "65656 2.0 2.0 \n", "65657 2.0 2.0 \n", "\n", " competition_stage_id competition_stage_name competition_id season_id \\\n", "65648 1 Regular Season 2 44 \n", "65649 1 Regular Season 2 44 \n", "65650 1 Regular Season 2 44 \n", "65651 1 Regular Season 2 44 \n", "65652 1 Regular Season 2 44 \n", "65653 1 Regular Season 2 44 \n", "65654 1 Regular Season 2 44 \n", "65655 1 Regular Season 2 44 \n", "65656 1 Regular Season 2 44 \n", "65657 1 Regular Season 2 44 \n", "\n", " country_name competition_name competition_gender season_name \\\n", "65648 England Premier League male 2003/2004 \n", "65649 England Premier League male 2003/2004 \n", "65650 England Premier League male 2003/2004 \n", "65651 England Premier League male 2003/2004 \n", "65652 England Premier League male 2003/2004 \n", "65653 England Premier League male 2003/2004 \n", "65654 England Premier League male 2003/2004 \n", "65655 England Premier League male 2003/2004 \n", "65656 England Premier League male 2003/2004 \n", "65657 England Premier League male 2003/2004 \n", "\n", " match_updated match_available team \\\n", "65648 2020-08-31T20:40:28.969635 2020-08-31T20:40:28.969635 Arsenal \n", "65649 2020-08-31T20:40:28.969635 2020-08-31T20:40:28.969635 Arsenal \n", "65650 2020-08-31T20:40:28.969635 2020-08-31T20:40:28.969635 Arsenal \n", "65651 2020-08-31T20:40:28.969635 2020-08-31T20:40:28.969635 Arsenal \n", "65652 2020-08-31T20:40:28.969635 2020-08-31T20:40:28.969635 Arsenal \n", "65653 2020-08-31T20:40:28.969635 2020-08-31T20:40:28.969635 Arsenal \n", "65654 2020-08-31T20:40:28.969635 2020-08-31T20:40:28.969635 Arsenal \n", "65655 2020-08-31T20:40:28.969635 2020-08-31T20:40:28.969635 Arsenal \n", "65656 2020-08-31T20:40:28.969635 2020-08-31T20:40:28.969635 Arsenal \n", "65657 2020-08-31T20:40:28.969635 2020-08-31T20:40:28.969635 Arsenal \n", "\n", " opponent full_fixture_date location_x location_y \\\n", "65648 Everton 2003-08-16 Arsenal 2 vs. 1 Everton 60.0 40.0 \n", "65649 Everton 2003-08-16 Arsenal 2 vs. 1 Everton 49.4 36.1 \n", "65650 Everton 2003-08-16 Arsenal 2 vs. 1 Everton 49.4 36.1 \n", "65651 Everton 2003-08-16 Arsenal 2 vs. 1 Everton 49.0 35.9 \n", "65652 Everton 2003-08-16 Arsenal 2 vs. 1 Everton 46.1 68.9 \n", "65653 Everton 2003-08-16 Arsenal 2 vs. 1 Everton 46.1 68.9 \n", "65654 Everton 2003-08-16 Arsenal 2 vs. 1 Everton 46.7 68.9 \n", "65655 Everton 2003-08-16 Arsenal 2 vs. 1 Everton 54.5 73.4 \n", "65656 Everton 2003-08-16 Arsenal 2 vs. 1 Everton 54.5 73.4 \n", "65657 Everton 2003-08-16 Arsenal 2 vs. 1 Everton 54.9 73.2 \n", "\n", " pass_end_location_x pass_end_location_y carry_end_location_x \\\n", "65648 49.4 36.1 nan \n", "65649 nan NaN nan \n", "65650 nan NaN 49.0 \n", "65651 46.1 68.9 nan \n", "65652 nan NaN nan \n", "65653 nan NaN 46.7 \n", "65654 54.5 73.4 nan \n", "65655 nan NaN nan \n", "65656 nan NaN 54.9 \n", "65657 56.8 63.3 nan \n", "\n", " carry_end_location_y shot_end_location_x shot_end_location_y \\\n", "65648 NaN nan NaN \n", "65649 NaN nan NaN \n", "65650 35.9 nan NaN \n", "65651 NaN nan NaN \n", "65652 NaN nan NaN \n", "65653 68.9 nan NaN \n", "65654 NaN nan NaN \n", "65655 NaN nan NaN \n", "65656 73.2 nan NaN \n", "65657 NaN nan NaN \n", "\n", " shot_end_location_z goalkeeper_end_location_x goalkeeper_end_location_y \n", "65648 NaN nan NaN \n", "65649 NaN nan NaN \n", "65650 NaN nan NaN \n", "65651 NaN nan NaN \n", "65652 NaN nan NaN \n", "65653 NaN nan NaN \n", "65654 NaN nan NaN \n", "65655 NaN nan NaN \n", "65656 NaN nan NaN \n", "65657 NaN nan NaN " ] }, "execution_count": 42, "metadata": {}, "output_type": "execute_result" } ], "source": [ "#\n", "\n", "##\n", "df_sb_events['location'] = df_sb_events['location'].astype(str)\n", "df_sb_events['pass_end_location'] = df_sb_events['pass_end_location'].astype(str)\n", "df_sb_events['carry_end_location'] = df_sb_events['carry_end_location'].astype(str)\n", "df_sb_events['shot_end_location'] = df_sb_events['shot_end_location'].astype(str)\n", "df_sb_events['goalkeeper_end_location'] = df_sb_events['goalkeeper_end_location'].astype(str)\n", "df_sb_events['shot_end_location'] = df_sb_events['shot_end_location'].astype(str)\n", "#df_sb_events['shot_freeze_frame'] = df_sb_events['shot_freeze_frame'].astype(str)\n", "\n", "\n", "##\n", "\n", "###\n", "df_sb_events['location'] = df_sb_events['location'].str.replace('[','')\n", "df_sb_events['pass_end_location'] = df_sb_events['pass_end_location'].str.replace('[','')\n", "df_sb_events['carry_end_location'] = df_sb_events['carry_end_location'].str.replace('[','')\n", "df_sb_events['shot_end_location'] = df_sb_events['shot_end_location'].str.replace('[','')\n", "df_sb_events['goalkeeper_end_location'] = df_sb_events['goalkeeper_end_location'].str.replace('[','')\n", "#df_sb_events['shot_freeze_frame'] = df_sb_events['shot_freeze_frame'].str.replace('[','')\n", "\n", "###\n", "df_sb_events['location'] = df_sb_events['location'].str.replace(']','')\n", "df_sb_events['pass_end_location'] = df_sb_events['pass_end_location'].str.replace(']','')\n", "df_sb_events['carry_end_location'] = df_sb_events['carry_end_location'].str.replace(']','')\n", "df_sb_events['shot_end_location'] = df_sb_events['shot_end_location'].str.replace(']','')\n", "df_sb_events['goalkeeper_end_location'] = df_sb_events['goalkeeper_end_location'].str.replace(']','')\n", "#df_sb_events['shot_freeze_frame'] = df_sb_events['shot_freeze_frame'].str.replace(']','')\n", "\n", "\n", "## Break down each location attributes\n", "df_sb_events['location_x'], df_sb_events['location_y'] = df_sb_events['location'].str.split(',', 1).str\n", "df_sb_events['pass_end_location_x'], df_sb_events['pass_end_location_y'] = df_sb_events['pass_end_location'].str.split(',', 1).str\n", "df_sb_events['carry_end_location_x'], df_sb_events['carry_end_location_y'] = df_sb_events['carry_end_location'].str.split(',', 1).str\n", "df_sb_events['shot_end_location_x'], df_sb_events['shot_end_location_y'], df_sb_events['shot_end_location_z'] = df_sb_events['shot_end_location'].str.split(',', 3).str[0:3].str\n", "df_sb_events['goalkeeper_end_location_x'], df_sb_events['goalkeeper_end_location_y'] = df_sb_events['goalkeeper_end_location'].str.split(',', 1).str\n", "#df_sb_events['shot_freeze_frame_x'], df_sb_events['shot_freeze_frame_y'] = df_sb_events['shot_freeze_frame'].str.split(',', 1).str\n", "\n", "\n", "## Display DataFrame\n", "df_sb_events.head(10)" ] }, { "cell_type": "code", "execution_count": 43, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "(3133322, 207)" ] }, "execution_count": 43, "metadata": {}, "output_type": "execute_result" } ], "source": [ "df_sb_events.shape" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "##### Export Dataset" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# Export DataFrame as a CSV file\n", "if not os.path.exists(os.path.join(data_dir_sb, 'events', 'engineered', 'events.csv')):\n", " df_sb_events.to_csv(os.path.join(data_dir_sb, 'events', 'engineered', 'events.csv'), index=None, header=True)\n", "else:\n", " pass" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "\"\"\"\n", "# Export DataFrame as a CSV file\n", "if not os.path.exists(os.path.join(data_dir_sb, 'export', 'sb_events.csv')):\n", " df_sb_events.to_csv(os.path.join(data_dir_sb, 'export', 'sb_events.csv'), index=None, header=True)\n", "else:\n", " pass\n", "\"\"\"" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "##### 4.4.1.3. Create Passing Matrix Data\n", "The following DataFrame is the CSV extract used for Tableau dashboarding" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "df1 = df_sb_events.copy()" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "df1['df_name'] = 'df1'" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "df1.head()" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "df2 = df_sb_events.copy()" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "df2['df_name'] = 'df2'" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "df2.head()" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "df1.head()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "##### Concatanate DataFrames" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "df_sb_events_passing = pd.concat([df1, df2])" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "df_sb_events_passing.shape" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "##### ..." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "df_sb_events_passing['Pass_X'] = np.where(df_sb_events_passing['df_name'] == 'df1', df_sb_events_passing['location_x'], df_sb_events_passing['pass.end_location_x'])\n", "df_sb_events_passing['Pass_Y'] = np.where(df_sb_events_passing['df_name'] == 'df1', df_sb_events_passing['location_y'], df_sb_events_passing['pass.end_location_y'])" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "df_sb_events_passing.head()" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "sorted(df_sb_events_passing.columns)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "##### Export Dataset" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# Export DataFrame as a CSV file\n", "if not os.path.exists(os.path.join(data_dir_sb, 'export', 'sb_wsl_events_passing_matrix.csv')):\n", " df_sb_events_passing.to_csv(os.path.join(data_dir_sb, 'export', 'sb_wsl_events_passing_matrix.csv'), index=None, header=True)\n", "else:\n", " pass" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "##### 4.4.1.4. Create Passing Network Data\n", "\n", "See: https://community.tableau.com/s/question/0D54T00000C6YbE/football-passing-network" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "df_sb_pass_network = df_sb_events_passing.copy()" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "df_sb_pass_network = df_sb_pass_network[df_sb_pass_network['type.name'] == 'Pass']" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "df_sb_pass_network['player_recipient'] = np.where(df_sb_pass_network['df_name'] == 'df1', df_sb_pass_network['player.name'], df_sb_pass_network['pass.recipient.name'])" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "df_sb_pass_network.head()" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "sorted(df_sb_pass_network.columns)" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "df_sb_pass_network.shape" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# Select columns of interest\n", "\n", "## Define columns\n", "cols = ['df_name',\n", " 'id',\n", " 'index',\n", " 'competition_name',\n", " 'season_name',\n", " 'match_date',\n", " 'kick_off',\n", " 'Full_Fixture_Date',\n", " 'Team',\n", " 'Opponent',\n", " 'home_team.home_team_name',\n", " 'away_team.away_team_name',\n", " 'home_score',\n", " 'away_score',\n", " 'player_recipient',\n", " 'player.name',\n", " 'pass.recipient.name',\n", " 'position.id',\n", " 'position.name',\n", " 'type.name',\n", " 'pass.type.name',\n", " 'pass.outcome.name',\n", " 'location_x',\n", " 'location_y', \n", " 'pass.end_location_x',\n", " 'pass.end_location_y',\n", " 'Pass_X',\n", " 'Pass_Y'\n", " ]\n", "\n", "##\n", "df_sb_pass_network_select = df_sb_pass_network[cols]" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "df_sb_pass_network_select['pass.to.from'] = df_sb_pass_network_select['player.name'] + ' - ' + df_sb_pass_network_select['pass.recipient.name']" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# List unique values in the df_sb_pass_network_select['pass.outcome.name'] column\n", "df_sb_pass_network_select['pass.outcome.name'].unique()" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "df_sb_pass_network_select = df_sb_pass_network_select[df_sb_pass_network_select['pass.outcome.name'].isnull()]" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "df_sb_pass_network_select.shape" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "df_sb_pass_network_select = df_sb_pass_network_select.sort_values(['season_name', 'match_date', 'kick_off', 'Full_Fixture_Date', 'index', 'id', 'df_name'], ascending=[True, True, True, True, True, True, True])" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "df_sb_pass_network_select['Pass_X'] = df_sb_pass_network_select['Pass_X'].astype(str).astype(float)\n", "df_sb_pass_network_select['Pass_Y'] = df_sb_pass_network_select['Pass_Y'].astype(str).astype(float)\n", "df_sb_pass_network_select['location_x'] = df_sb_pass_network_select['location_x'].astype(str).astype(float)\n", "df_sb_pass_network_select['location_y'] = df_sb_pass_network_select['location_y'].astype(str).astype(float)\n", "df_sb_pass_network_select['pass.end_location_x'] = df_sb_pass_network_select['pass.end_location_x'].astype(str).astype(float)\n", "df_sb_pass_network_select['pass.end_location_y'] = df_sb_pass_network_select['pass.end_location_y'].astype(str).astype(float)" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "scrolled": true }, "outputs": [], "source": [ "df_sb_pass_network_select.dtypes" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "df_sb_pass_network_select.head()" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "#\n", "\n", "##\n", "df_sb_pass_network_grouped = (df_sb_pass_network_select\n", " .groupby(['competition_name',\n", " 'season_name',\n", " 'match_date',\n", " 'kick_off',\n", " 'Full_Fixture_Date',\n", " 'Team',\n", " 'Opponent',\n", " 'home_team.home_team_name',\n", " 'away_team.away_team_name',\n", " 'home_score',\n", " 'away_score',\n", " 'pass.to.from',\n", " 'player.name',\n", " 'pass.recipient.name',\n", " 'player_recipient'\n", " ])\n", " .agg({'pass.to.from': ['count']\n", " })\n", " )\n", "\n", "##\n", "df_sb_pass_network_grouped.columns = df_sb_pass_network_grouped.columns.droplevel(level=0)\n", "\n", "##\n", "df_sb_pass_network_grouped = df_sb_pass_network_grouped.reset_index()\n", "\n", "## \n", "df_sb_pass_network_grouped.columns = ['competition_name',\n", " 'season_name',\n", " 'match_date',\n", " 'kick_off',\n", " 'full_fixture_date',\n", " 'team',\n", " 'opponent',\n", " 'home_team_name',\n", " 'away_team_name',\n", " 'home_score',\n", " 'away_score',\n", " 'pass_to_from',\n", " 'player_name',\n", " 'pass_recipient_name',\n", " 'player_recipient',\n", " 'count_passes',\n", " ]\n", "\n", "##\n", "#df_sb_pass_network_grouped['count_passes'] = df_sb_pass_network_grouped['count_passes'] / 2\n", "\n", "##\n", "df_sb_pass_network_grouped = df_sb_pass_network_grouped.sort_values(['season_name', 'match_date', 'kick_off', 'full_fixture_date', 'team', 'opponent', 'pass_to_from'], ascending=[True, True, True, True, True, True, True])\n", "\n", "##\n", "df_sb_pass_network_grouped.head()" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "df_sb_pass_network_grouped.shape" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# Select columns of interest\n", "\n", "## Define columns\n", "cols = ['Full_Fixture_Date',\n", " 'player.name',\n", " 'position.id',\n", " 'position.name',\n", " 'Pass_X',\n", " 'Pass_Y'\n", " ]\n", "\n", "##\n", "df_sb_pass_network_avg_pass = df_sb_pass_network_select[cols]" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "df_sb_pass_network_avg_pass " ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "#\n", "\n", "##\n", "df_sb_pass_network_avg_pass_grouped = (df_sb_pass_network_avg_pass \n", " .groupby(['Full_Fixture_Date',\n", " 'player.name',\n", " 'position.id',\n", " 'position.name',\n", " ])\n", " .agg({'Pass_X': ['mean'],\n", " 'Pass_Y': ['mean']\n", " })\n", " )\n", "\n", "##\n", "df_sb_pass_network_avg_pass_grouped.columns = df_sb_pass_network_avg_pass_grouped .columns.droplevel(level=0)\n", "\n", "##\n", "df_sb_pass_network_avg_pass_grouped = df_sb_pass_network_avg_pass_grouped.reset_index()\n", "\n", "## \n", "df_sb_pass_network_avg_pass_grouped.columns = ['full_fixture_date',\n", " 'player_name',\n", " 'position_id',\n", " 'position_name',\n", " 'avg_location_pass_x',\n", " 'avg_location_pass_y'\n", " ]\n", "\n", "##\n", "df_sb_pass_network_avg_pass_grouped['avg_location_pass_x'] = df_sb_pass_network_avg_pass_grouped['avg_location_pass_x'].round(decimals=1)\n", "df_sb_pass_network_avg_pass_grouped['avg_location_pass_y'] = df_sb_pass_network_avg_pass_grouped['avg_location_pass_y'].round(decimals=1)\n", "\n", "##\n", "df_sb_pass_network_avg_pass_grouped = df_sb_pass_network_avg_pass_grouped.sort_values(['full_fixture_date', 'player_name'], ascending=[True, True])\n", "\n", "##\n", "df_sb_pass_network_avg_pass_grouped.head()" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# Join the Events DataFrame to the Matches DataFrame\n", "df_sb_pass_network_final = pd.merge(df_sb_pass_network_grouped, df_sb_pass_network_avg_pass_grouped, left_on=['full_fixture_date', 'player_recipient'], right_on=['full_fixture_date', 'player_name'])" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "## Rename columns\n", "df_sb_pass_network_final = df_sb_pass_network_final.rename(columns={'player_name_x': 'player_name',\n", " #'player_name_x': 'player_name'\n", " }\n", " )" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "scrolled": true }, "outputs": [], "source": [ "df_sb_pass_network_final.head()" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "df_sb_pass_network_final.shape" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "##### Export Dataset" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# Export DataFrame as a CSV file\n", "if not os.path.exists(os.path.join(data_dir_sb, 'export', 'engineered', 'sb_events_passing_network.csv')):\n", " df_sb_pass_network_final.to_csv(os.path.join(data_dir_sb, 'export', 'engineered', 'sb_events_passing_network.csv'), index=None, header=True)\n", "else:\n", " pass" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# Export DataFrame as a CSV file\n", "if not os.path.exists(os.path.join(data_dir_sb, 'export', 'engineered', 'sb_events_passing_network.csv')):\n", " df_sb_pass_network_final.to_csv(os.path.join(data_dir, 'export', 'sb_events_passing_network.csv'), index=None, header=True)\n", "else:\n", " pass" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "##### Export WSL data Dataset" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# Export \n", "#df_sb_pass_network_final.to_csv(data_dir_sb + '/events/engineered/' + '/sb_events_passing_network_1819_2021_wsl.csv', index=None, header=True)\n", "\n", "# Export \n", "#df_sb_pass_network_final.to_csv(data_dir + '/export/' + '/sb_wsl_events_passing_network.csv', index=None, header=True)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "#### 4.4.2. Lineups" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# List unique values in the df_sb['type.name'] column\n", "df_sb['type.name'].unique()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "The starting XI players and formation can be found in the rows where `type.name` is 'Starting XI'." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "df_lineup = df_sb[df_sb['type.name'] == 'Starting XI']" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "df_lineup" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# Streamline DataFrame to include just the columns of interest\n", "\n", "## Define columns\n", "cols = ['id', 'type.name', 'match_date', 'kick_off', 'Full_Fixture_Date', 'team.id', 'team.name', 'tactics.formation', 'tactics.lineup', 'competition_name', 'season_name', 'home_team.home_team_name', 'away_team.away_team_name', 'Team', 'Opponent', 'home_score', 'away_score']\n", "\n", "## Select only columns of interest\n", "df_lineup_select = df_lineup[cols]" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "df_lineup_select" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "We can see from the extracted lineup data so far. To get the stating XI players, we need to breakdown the `tactics.lineup` attribute." ] }, { "cell_type": "code", "execution_count": null, "metadata": { "scrolled": true }, "outputs": [], "source": [ "# Normalize tactics.lineup - see: https://stackoverflow.com/questions/52795561/flattening-nested-json-in-pandas-data-frame\n", "\n", "## explode all columns with lists of dicts\n", "df_lineup_select_normalize = df_lineup_select.apply(lambda x: x.explode()).reset_index(drop=True)\n", "\n", "## list of columns with dicts\n", "cols_to_normalize = ['tactics.lineup']\n", "\n", "## if there are keys, which will become column names, overlap with excising column names. add the current column name as a prefix\n", "normalized = list()\n", "\n", "for col in cols_to_normalize:\n", " d = pd.json_normalize(df_lineup_select_normalize[col], sep='_')\n", " d.columns = [f'{col}_{v}' for v in d.columns]\n", " normalized.append(d.copy())\n", "\n", "## combine df with the normalized columns\n", "df_lineup_select_normalize = pd.concat([df_lineup_select_normalize] + normalized, axis=1).drop(columns=cols_to_normalize)\n", "\n", "## display(df_lineup_select_normalize)\n", "df_lineup_select_normalize.head(30)" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "df_lineup_engineered = df_lineup_select_normalize" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# Streamline DataFrame to include just the columns of interest\n", "\n", "## Define columns\n", "cols = ['id', 'match_date', 'kick_off', 'Full_Fixture_Date', 'type.name', 'season_name', 'competition_name', 'home_team.home_team_name', 'away_team.away_team_name', 'Team', 'Opponent', 'home_score', 'away_score', 'tactics.formation', 'tactics.lineup_jersey_number', 'tactics.lineup_position_id', 'tactics.lineup_player_name', 'tactics.lineup_position_name']\n", "\n", "## Select only columns of interest\n", "df_lineup_engineered_select = df_lineup_engineered[cols]" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "scrolled": true }, "outputs": [], "source": [ "df_lineup_engineered_select['tactics.formation'] = df_lineup_engineered_select['tactics.formation'].astype('Int64')\n", "df_lineup_engineered_select['tactics.lineup_jersey_number'] = df_lineup_engineered_select['tactics.lineup_jersey_number'].astype('Int64')" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "df_lineup_engineered_select.head(5)" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "df_lineup_engineered_select.columns" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "## Rename columns\n", "df_lineup_engineered_select = df_lineup_engineered_select.rename(columns={'id': 'Match_Id',\n", " 'match_date': 'Match_Date',\n", " 'kick_off': 'Kick_Off',\n", " 'type.name': 'Type_Name',\n", " 'season_name': 'Season',\n", " 'competition_name': 'Competition',\n", " 'home_team.home_team_name': 'Home_Team',\n", " 'away_team.away_team_name': 'Away_Team',\n", " 'home_score': 'Home_Score',\n", " 'away_score': 'Away_Score',\n", " 'tactics.formation': 'Formation',\n", " 'tactics.lineup_jersey_number': 'Shirt_Number',\n", " 'tactics.lineup_position_id': 'Position_Number',\n", " 'tactics.lineup_player_name': 'Player_Name',\n", " 'tactics.lineup_position_name': 'Position_Name'\n", " }\n", " \n", " )\n", "\n", "## Display DataFrame\n", "df_lineup_engineered_select.head()" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# Convert Match_Date from string to datetime64[ns]\n", "df_lineup_engineered_select['Match_Date']= pd.to_datetime(df_lineup_engineered_select['Match_Date'])" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "\"\"\"\n", "# THIS IS NOT WORKING ATM\n", "\n", "# Convert Kick_Off from string to datetime64[ns]\n", "df_lineup_engineered_select['Kick_Off']= pd.to_datetime(df_lineup_engineered_select['Kick_Off'], format='%H:%M', errors='ignore')\n", "df_lineup_engineered_select['Kick_Off'] = df_lineup_engineered_select['Kick_Off'].dt.time\n", "\"\"\"" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "df_lineup_engineered_select.dtypes" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# Put hyphens between numbers in Formation attribute\n", "\n", "## Convert Formation attribute from Integer to String\n", "df_lineup_engineered_select['Formation'] = df_lineup_engineered_select['Formation'].astype(str)\n", "\n", "## Define custom function to add hyphen between letters: StackOverflow: https://stackoverflow.com/questions/29382285/python-making-a-function-that-would-add-between-letters\n", "def f(s):\n", " m = s[0]\n", " for i in s[1:]:\n", " m += '-' + i\n", " return m\n", " \n", "## Apply custom function\n", "df_lineup_engineered_select['Formation'] = df_lineup_engineered_select.apply(lambda row: f(row['Formation']),axis=1)" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "scrolled": true }, "outputs": [], "source": [ "lst_formation = df_lineup_engineered_select['Formation'].unique().tolist()" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "lst_formation" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "##### Add Position Coordinates" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "df_formations_coords = pd.read_csv(data_dir_sb + '/sb_formation_coordinates.csv')" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "#df_formations_coords['Id'] = df_formations_coords['Id'].astype('Int8')\n", "#df_formations_coords['Player_Number'] = df_formations_coords['Player_Number'].astype('Int8')" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "df_lineup_engineered_select = pd.merge(df_lineup_engineered_select, df_formations_coords, how='left', left_on=['Formation', 'Position_Number'], right_on=['Formation', 'Player_Number'])" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "#df_lineup_engineered_select = df_lineup_engineered_select.drop(['Player_Number'], axis=1)\n", "df_lineup_engineered_select = df_lineup_engineered_select.drop(['Id'], axis=1)\n", "df_lineup_engineered_select = df_lineup_engineered_select.drop(['Player_Position'], axis=1)" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "df_lineup_engineered_select.head()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "##### Add Opponent Data to Each Row" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# Select columns of interest\n", "\n", "## Define columns\n", "cols = ['Match_Date',\n", " 'Competition',\n", " 'Full_Fixture_Date',\n", " 'Team',\n", " 'Formation'\n", " ]\n", "\n", "##\n", "df_lineup_opponent = df_lineup_engineered_select[cols]\n", "\n", "##\n", "df_lineup_opponent = df_lineup_opponent.drop_duplicates()\n", "\n", "##\n", "df_lineup_opponent.head()" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# Join DataFrame to itself on 'Date', 'Fixture', 'Team'/'Opponent', and 'Event', to join Team and Opponent together\n", "df_lineup_engineered_opponent_select = pd.merge(df_lineup_engineered_select, df_lineup_opponent, how='left', left_on=['Match_Date', 'Competition', 'Full_Fixture_Date', 'Opponent'], right_on = ['Match_Date', 'Competition', 'Full_Fixture_Date', 'Team'])" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# Clean Data\n", "\n", "## Drop columns\n", "df_lineup_engineered_opponent_select = df_lineup_engineered_opponent_select.drop(columns=['Team_y'])\n", "\n", "\n", "## Rename columns\n", "df_lineup_engineered_opponent_select = df_lineup_engineered_opponent_select.rename(columns={'Team_x': 'Team',\n", " 'Formation_x': 'Formation',\n", " 'Formation_y': 'Opponent_Formation'\n", " }\n", " )\n", "\n", "## Display DataFrame\n", "df_lineup_engineered_opponent_select.head()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "##### Export DataFrame" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# Export \n", "#df_lineup_engineered_opponent_select.to_csv(data_dir_sb + '/lineups/engineered/' + '/sb_lineups_1819_2021_wsl.csv', index=None, header=True)" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# Export \n", "#df_lineup_engineered_opponent_select.to_csv(data_dir + '/export/' + '/sb_wsl_lineups.csv', index=None, header=True)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "#### 4.4.3. Tactical Shifts" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "df_tactics = df_sb[df_sb['type.name'] == 'Tactical Shift']" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "df_tactics" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# Select columns of interest\n", "\n", "##\n", "cols = ['id', 'type.name', 'team.id', 'team.name', 'tactics.formation', 'tactics.lineup']\n", "\n", "##\n", "df_tactics_select = df_tactics[cols]" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "df_tactics_select" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# Normalize tactics.lineup - see: https://stackoverflow.com/questions/52795561/flattening-nested-json-in-pandas-data-frame\n", "\n", "## explode all columns with lists of dicts\n", "df_tactics_select_normalize = df_tactics_select.apply(lambda x: x.explode()).reset_index(drop=True)\n", "\n", "## list of columns with dicts\n", "cols_to_normalize = ['tactics.lineup']\n", "\n", "## if there are keys, which will become column names, overlap with excising column names. add the current column name as a prefix\n", "normalized = list()\n", "for col in cols_to_normalize:\n", " \n", " d = pd.json_normalize(df_tactics_select_normalize[col], sep='_')\n", " d.columns = [f'{col}_{v}' for v in d.columns]\n", " normalized.append(d.copy())\n", "\n", "## combine df with the normalized columns\n", "df_tactics_select_normalize = pd.concat([df_tactics_select_normalize] + normalized, axis=1).drop(columns=cols_to_normalize)\n", "\n", "## display(df_lineup_select_normalize)\n", "df_tactics_select_normalize.head(10)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "#### 4.4.4. Halves" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "df_half = df_sb[df_sb['type.name'] == 'Half Start']" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "df_half" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "---\n", "\n", "## 5. Export Data\n", "Export Data ready for data engineering in the subsequent notebooks." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# Export \n", "#df_sb.to_csv(data_dir_sb + '/combined/raw/csv/wsl/' + '/df_sb_combined_data_wsl.csv', index=None, header=True)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## 6. Summary\n", "This notebook engineers previous parsed Event data drom [StatsBomb](https://statsbomb.com/) data using [pandas](http://pandas.pydata.org/) for data manipulation through DataFrames." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "---\n", "\n", "## 7. Next Steps\n", "The step is to take the engineered dataset created in this notebook that is now ready for use in projects including Expected Goals (xG) models and Tableau visualisations." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## 8. References\n", "\n", "#### Data\n", "* [StatsBomb](https://statsbomb.com/) data\n", "* [StatsBomb](https://github.com/statsbomb/open-data/tree/master/data) open data GitHub repository" ] }, { "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", "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": "40px", "left": "1118px", "right": "20px", "top": "-7px", "width": "489px" }, "types_to_exclude": [ "module", "function", "builtin_function_or_method", "instance", "_Feature" ], "varInspector_section_display": "none", "window_display": true } }, "nbformat": 4, "nbformat_minor": 2 }