{ "cells": [ { "cell_type": "code", "execution_count": 5, "metadata": {}, "outputs": [], "source": [ "import pandas as pd\n", "import numpy as np\n", "from pandas.io.json import json_normalize #package for flattening json in pandas df\n", "\n" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", " | bad_behaviour | \n", "ball_receipt | \n", "ball_recovery | \n", "block | \n", "dribble | \n", "duel | \n", "duration | \n", "foul_committed | \n", "foul_won | \n", "goalkeeper | \n", "... | \n", "possession_team | \n", "related_events | \n", "second | \n", "shot | \n", "substitution | \n", "tactics | \n", "team | \n", "timestamp | \n", "type | \n", "under_pressure | \n", "
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "0.00 | \n", "NaN | \n", "NaN | \n", "NaN | \n", "... | \n", "{'id': 746, 'name': 'Manchester City WFC'} | \n", "NaN | \n", "0 | \n", "NaN | \n", "NaN | \n", "{'formation': 433, 'lineup': [{'player': {'id'... | \n", "{'id': 746, 'name': 'Manchester City WFC'} | \n", "2018-11-30 00:00:00.000 | \n", "{'id': 35, 'name': 'Starting XI'} | \n", "NaN | \n", "
1 | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "0.00 | \n", "NaN | \n", "NaN | \n", "NaN | \n", "... | \n", "{'id': 746, 'name': 'Manchester City WFC'} | \n", "NaN | \n", "0 | \n", "NaN | \n", "NaN | \n", "{'formation': 352, 'lineup': [{'player': {'id'... | \n", "{'id': 971, 'name': 'Chelsea LFC'} | \n", "2018-11-30 00:00:00.000 | \n", "{'id': 35, 'name': 'Starting XI'} | \n", "NaN | \n", "
2 | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "8.16 | \n", "NaN | \n", "NaN | \n", "NaN | \n", "... | \n", "{'id': 746, 'name': 'Manchester City WFC'} | \n", "[c771a4d4-51cb-41de-83aa-7103cd199c92] | \n", "0 | \n", "NaN | \n", "NaN | \n", "NaN | \n", "{'id': 971, 'name': 'Chelsea LFC'} | \n", "2018-11-30 00:00:00.000 | \n", "{'id': 18, 'name': 'Half Start'} | \n", "NaN | \n", "
3 | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "7.96 | \n", "NaN | \n", "NaN | \n", "NaN | \n", "... | \n", "{'id': 746, 'name': 'Manchester City WFC'} | \n", "[48b94b06-ebbd-47e9-958c-44bf63622f5e] | \n", "0 | \n", "NaN | \n", "NaN | \n", "NaN | \n", "{'id': 746, 'name': 'Manchester City WFC'} | \n", "2018-11-30 00:00:00.000 | \n", "{'id': 18, 'name': 'Half Start'} | \n", "NaN | \n", "
4 | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "0.00 | \n", "NaN | \n", "NaN | \n", "NaN | \n", "... | \n", "{'id': 971, 'name': 'Chelsea LFC'} | \n", "[237cac8c-5cb0-4015-9d08-c7df9699a136] | \n", "0 | \n", "NaN | \n", "NaN | \n", "NaN | \n", "{'id': 971, 'name': 'Chelsea LFC'} | \n", "2018-11-30 00:00:00.100 | \n", "{'id': 30, 'name': 'Pass'} | \n", "NaN | \n", "
5 rows × 33 columns
\n", "\n", " | location | \n", "X_axis | \n", "Y_axis | \n", "
---|---|---|---|
33 | \n", "[115.0, 25.0] | \n", "115.0 | \n", "25.0 | \n", "
186 | \n", "[109.0, 51.0] | \n", "109.0 | \n", "51.0 | \n", "
192 | \n", "[99.0, 52.0] | \n", "99.0 | \n", "52.0 | \n", "
196 | \n", "[107.0, 40.0] | \n", "107.0 | \n", "40.0 | \n", "
204 | \n", "[108.0, 32.0] | \n", "108.0 | \n", "32.0 | \n", "
583 | \n", "[108.0, 32.0] | \n", "108.0 | \n", "32.0 | \n", "
695 | \n", "[87.0, 41.0] | \n", "87.0 | \n", "41.0 | \n", "
749 | \n", "[108.0, 36.0] | \n", "108.0 | \n", "36.0 | \n", "
765 | \n", "[105.0, 43.0] | \n", "105.0 | \n", "43.0 | \n", "
1060 | \n", "[112.0, 39.0] | \n", "112.0 | \n", "39.0 | \n", "
1176 | \n", "[115.0, 54.0] | \n", "115.0 | \n", "54.0 | \n", "
1179 | \n", "[102.0, 34.0] | \n", "102.0 | \n", "34.0 | \n", "
1291 | \n", "[108.0, 47.0] | \n", "108.0 | \n", "47.0 | \n", "
1400 | \n", "[94.0, 54.0] | \n", "94.0 | \n", "54.0 | \n", "
1486 | \n", "[108.0, 27.0] | \n", "108.0 | \n", "27.0 | \n", "
1622 | \n", "[114.0, 34.0] | \n", "114.0 | \n", "34.0 | \n", "
1666 | \n", "[109.0, 39.0] | \n", "109.0 | \n", "39.0 | \n", "
1828 | \n", "[117.0, 31.0] | \n", "117.0 | \n", "31.0 | \n", "
2136 | \n", "[91.0, 52.0] | \n", "91.0 | \n", "52.0 | \n", "
2240 | \n", "[118.0, 39.0] | \n", "118.0 | \n", "39.0 | \n", "
2325 | \n", "[111.0, 32.0] | \n", "111.0 | \n", "32.0 | \n", "
2692 | \n", "[107.0, 47.0] | \n", "107.0 | \n", "47.0 | \n", "
2695 | \n", "[110.0, 36.0] | \n", "110.0 | \n", "36.0 | \n", "
2813 | \n", "[113.0, 42.0] | \n", "113.0 | \n", "42.0 | \n", "
2820 | \n", "[109.0, 52.0] | \n", "109.0 | \n", "52.0 | \n", "