{ "cells": [ { "cell_type": "code", "execution_count": 1, "id": "e621e3ae", "metadata": { "nbsphinx": "hidden" }, "outputs": [], "source": [ "import pandas as pd\n", "pd.set_option('display.max_columns', None)" ] }, { "cell_type": "code", "execution_count": 2, "id": "0f792a6b", "metadata": { "nbsphinx": "hidden" }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "env: SOCCERDATA_LOGLEVEL=ERROR\n", "env: SOCCERDATA_NOCACHE=True\n", "env: SOCCERDATA_NOSTORE=True\n" ] } ], "source": [ "%env SOCCERDATA_LOGLEVEL=ERROR\n", "%env SOCCERDATA_NOCACHE=True\n", "%env SOCCERDATA_NOSTORE=True" ] }, { "cell_type": "code", "execution_count": 3, "id": "2454afe6", "metadata": {}, "outputs": [], "source": [ "import soccerdata as sd" ] }, { "cell_type": "markdown", "id": "b5784f2d", "metadata": {}, "source": [ "# Match History" ] }, { "cell_type": "code", "execution_count": 4, "id": "8dab5be9", "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "/cw/dtaijupiter/NoCsBack/dtai/pieterr/Projects/soccerdata/soccerdata/_common.py:466: UserWarning: Season id \"2021\" is ambiguous: interpreting as \"20-21\"\n", " warnings.warn(msg)\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "Provides pd.DataFrames from CSV files available at http://www.football-data.co.uk/data.php.\n", "\n", " Data will be downloaded as necessary and cached locally in\n", " ``~/soccerdata/data/MatchHistory``.\n", "\n", " Parameters\n", " ----------\n", " leagues : string or iterable\n", " IDs of leagues to include.\n", " seasons : string, int or list\n", " Seasons to include. Supports multiple formats.\n", " Examples: '16-17'; 2016; '2016-17'; [14, 15, 16]\n", " proxy : 'tor' or or dict or list(dict) or callable, optional\n", " Use a proxy to hide your IP address. Valid options are:\n", " - \"tor\": Uses the Tor network. Tor should be running in\n", " the background on port 9050.\n", " - dict: A dictionary with the proxy to use. The dict should be\n", " a mapping of supported protocols to proxy addresses. For example::\n", "\n", " {\n", " 'http': 'http://10.10.1.10:3128',\n", " 'https': 'http://10.10.1.10:1080',\n", " }\n", "\n", " - list(dict): A list of proxies to choose from. A different proxy will\n", " be selected from this list after failed requests, allowing rotating\n", " proxies.\n", " - callable: A function that returns a valid proxy. This function will\n", " be called after failed requests, allowing rotating proxies.\n", " no_cache : bool\n", " If True, will not use cached data.\n", " no_store : bool\n", " If True, will not store downloaded data.\n", " data_dir : Path, optional\n", " Path to directory where data will be cached.\n", " \n" ] } ], "source": [ "mh = sd.MatchHistory(leagues=\"ENG-Premier League\", seasons=2021)\n", "print(mh.__doc__)" ] }, { "cell_type": "markdown", "id": "3a4c2916", "metadata": {}, "source": [ "## Historic match results and betting odds" ] }, { "cell_type": "code", "execution_count": 5, "id": "745be31a", "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", "
datehome_teamaway_teamFTHGFTAGFTRHTHGHTAGHTRrefereeHSASHSTASTHFAFHCACHYAYHRARB365HB365DB365ABWHBWDBWAIWHIWDIWAPSHPSDPSAWHHWHDWHAVCHVCDVCAMaxHMaxDMaxAAvgHAvgDAvgAB365>2.5B365<2.5P>2.5P<2.5Max>2.5Max<2.5Avg>2.5Avg<2.5AHhB365AHHB365AHAPAHHPAHAMaxAHHMaxAHAAvgAHHAvgAHAB365CHB365CDB365CABWCHBWCDBWCAIWCHIWCDIWCAPSCHPSCDPSCAWHCHWHCDWHCAVCCHVCCDVCCAMaxCHMaxCDMaxCAAvgCHAvgCDAvgCAB365C>2.5B365C<2.5PC>2.5PC<2.5MaxC>2.5MaxC<2.5AvgC>2.5AvgC<2.5AHChB365CAHHB365CAHAPCAHHPCAHAMaxCAHHMaxCAHAAvgCAHHAvgCAHA
leagueseasongame
ENG-Premier League20212020-01-11 Aston Villa-Southampton2020-01-11 12:00:00Aston VillaSouthampton34A03AD England199104121711112002.453.52.802.353.602.852.503.352.752.533.722.812.503.52.752.403.602.802.603.842.852.463.602.781.662.21.662.371.692.381.652.270.001.832.071.872.071.872.091.832.052.603.502.622.503.602.702.553.502.702.693.562.732.603.502.622.503.602.702.703.702.802.573.552.691.662.201.702.291.712.371.662.240.001.931.971.951.981.972.041.891.98
2020-01-11 Man United-Arsenal2020-01-11 16:30:00Man UnitedArsenal01A00DM Dean872212126333002.003.63.602.003.703.602.053.453.552.053.783.732.053.63.602.053.603.502.103.853.762.043.663.581.722.11.762.191.812.221.742.12-0.502.051.852.051.882.091.902.041.841.953.603.801.953.603.902.003.503.802.023.653.972.003.503.801.953.504.002.063.754.001.993.593.871.901.901.961.961.992.101.881.95-0.502.001.902.031.902.051.922.001.88
2020-01-11 Newcastle-Everton2020-01-11 14:00:00NewcastleEverton21H00DS Attwell1115449105424003.703.42.053.753.402.053.553.302.103.823.562.093.703.42.053.503.502.054.003.592.153.713.472.061.802.01.862.071.882.081.822.010.252.051.752.151.802.171.832.121.773.303.302.253.303.302.253.153.352.303.343.432.333.403.252.253.303.302.253.623.502.343.343.332.272.001.802.121.812.141.922.041.800.251.951.951.932.001.992.031.931.95
2020-01-11 Tottenham-Brighton2020-01-11 19:15:00TottenhamBrighton21H10HG Scott963214134521001.614.05.501.624.255.001.653.905.001.654.265.541.634.05.251.624.205.251.674.305.751.634.175.291.662.21.682.321.712.351.652.26-1.002.021.772.151.802.161.842.091.801.554.336.001.574.255.501.604.205.751.614.365.771.574.006.001.574.205.751.634.456.391.594.295.621.662.201.682.321.722.371.652.27-1.002.061.842.111.842.131.992.021.86
2020-02-11 Fulham-West Brom2020-02-11 17:30:00FulhamWest Brom20H20HS Hooper13106113115232002.403.33.002.403.303.002.453.103.002.473.403.132.403.33.002.453.253.002.563.503.172.443.323.012.001.82.131.802.141.852.061.78-0.252.101.802.111.842.151.862.101.802.403.303.002.453.302.952.403.053.102.483.323.192.403.203.102.403.253.102.483.453.222.413.273.092.051.852.051.882.111.922.021.81-0.252.061.842.111.842.121.872.081.82
\n", "
" ], "text/plain": [ " date \\\n", "league season game \n", "ENG-Premier League 2021 2020-01-11 Aston Villa-Southampton 2020-01-11 12:00:00 \n", " 2020-01-11 Man United-Arsenal 2020-01-11 16:30:00 \n", " 2020-01-11 Newcastle-Everton 2020-01-11 14:00:00 \n", " 2020-01-11 Tottenham-Brighton 2020-01-11 19:15:00 \n", " 2020-02-11 Fulham-West Brom 2020-02-11 17:30:00 \n", "\n", " home_team \\\n", "league season game \n", "ENG-Premier League 2021 2020-01-11 Aston Villa-Southampton Aston Villa \n", " 2020-01-11 Man United-Arsenal Man United \n", " 2020-01-11 Newcastle-Everton Newcastle \n", " 2020-01-11 Tottenham-Brighton Tottenham \n", " 2020-02-11 Fulham-West Brom Fulham \n", "\n", " away_team \\\n", "league season game \n", "ENG-Premier League 2021 2020-01-11 Aston Villa-Southampton Southampton \n", " 2020-01-11 Man United-Arsenal Arsenal \n", " 2020-01-11 Newcastle-Everton Everton \n", " 2020-01-11 Tottenham-Brighton Brighton \n", " 2020-02-11 Fulham-West Brom West Brom \n", "\n", " FTHG FTAG FTR \\\n", "league season game \n", "ENG-Premier League 2021 2020-01-11 Aston Villa-Southampton 3 4 A \n", " 2020-01-11 Man United-Arsenal 0 1 A \n", " 2020-01-11 Newcastle-Everton 2 1 H \n", " 2020-01-11 Tottenham-Brighton 2 1 H \n", " 2020-02-11 Fulham-West Brom 2 0 H \n", "\n", " HTHG HTAG HTR \\\n", "league season game \n", "ENG-Premier League 2021 2020-01-11 Aston Villa-Southampton 0 3 A \n", " 2020-01-11 Man United-Arsenal 0 0 D \n", " 2020-01-11 Newcastle-Everton 0 0 D \n", " 2020-01-11 Tottenham-Brighton 1 0 H \n", " 2020-02-11 Fulham-West Brom 2 0 H \n", "\n", " referee HS \\\n", "league season game \n", "ENG-Premier League 2021 2020-01-11 Aston Villa-Southampton D England 19 \n", " 2020-01-11 Man United-Arsenal M Dean 8 \n", " 2020-01-11 Newcastle-Everton S Attwell 11 \n", " 2020-01-11 Tottenham-Brighton G Scott 9 \n", " 2020-02-11 Fulham-West Brom S Hooper 13 \n", "\n", " AS HST AST \\\n", "league season game \n", "ENG-Premier League 2021 2020-01-11 Aston Villa-Southampton 9 10 4 \n", " 2020-01-11 Man United-Arsenal 7 2 2 \n", " 2020-01-11 Newcastle-Everton 15 4 4 \n", " 2020-01-11 Tottenham-Brighton 6 3 2 \n", " 2020-02-11 Fulham-West Brom 10 6 1 \n", "\n", " HF AF HC AC \\\n", "league season game \n", "ENG-Premier League 2021 2020-01-11 Aston Villa-Southampton 12 17 11 1 \n", " 2020-01-11 Man United-Arsenal 12 12 6 3 \n", " 2020-01-11 Newcastle-Everton 9 10 5 4 \n", " 2020-01-11 Tottenham-Brighton 14 13 4 5 \n", " 2020-02-11 Fulham-West Brom 13 11 5 2 \n", "\n", " HY AY HR AR \\\n", "league season game \n", "ENG-Premier League 2021 2020-01-11 Aston Villa-Southampton 1 2 0 0 \n", " 2020-01-11 Man United-Arsenal 3 3 0 0 \n", " 2020-01-11 Newcastle-Everton 2 4 0 0 \n", " 2020-01-11 Tottenham-Brighton 2 1 0 0 \n", " 2020-02-11 Fulham-West Brom 3 2 0 0 \n", "\n", " B365H B365D \\\n", "league season game \n", "ENG-Premier League 2021 2020-01-11 Aston Villa-Southampton 2.45 3.5 \n", " 2020-01-11 Man United-Arsenal 2.00 3.6 \n", " 2020-01-11 Newcastle-Everton 3.70 3.4 \n", " 2020-01-11 Tottenham-Brighton 1.61 4.0 \n", " 2020-02-11 Fulham-West Brom 2.40 3.3 \n", "\n", " B365A BWH \\\n", "league season game \n", "ENG-Premier League 2021 2020-01-11 Aston Villa-Southampton 2.80 2.35 \n", " 2020-01-11 Man United-Arsenal 3.60 2.00 \n", " 2020-01-11 Newcastle-Everton 2.05 3.75 \n", " 2020-01-11 Tottenham-Brighton 5.50 1.62 \n", " 2020-02-11 Fulham-West Brom 3.00 2.40 \n", "\n", " BWD BWA \\\n", "league season game \n", "ENG-Premier League 2021 2020-01-11 Aston Villa-Southampton 3.60 2.85 \n", " 2020-01-11 Man United-Arsenal 3.70 3.60 \n", " 2020-01-11 Newcastle-Everton 3.40 2.05 \n", " 2020-01-11 Tottenham-Brighton 4.25 5.00 \n", " 2020-02-11 Fulham-West Brom 3.30 3.00 \n", "\n", " IWH IWD \\\n", "league season game \n", "ENG-Premier League 2021 2020-01-11 Aston Villa-Southampton 2.50 3.35 \n", " 2020-01-11 Man United-Arsenal 2.05 3.45 \n", " 2020-01-11 Newcastle-Everton 3.55 3.30 \n", " 2020-01-11 Tottenham-Brighton 1.65 3.90 \n", " 2020-02-11 Fulham-West Brom 2.45 3.10 \n", "\n", " IWA PSH \\\n", "league season game \n", "ENG-Premier League 2021 2020-01-11 Aston Villa-Southampton 2.75 2.53 \n", " 2020-01-11 Man United-Arsenal 3.55 2.05 \n", " 2020-01-11 Newcastle-Everton 2.10 3.82 \n", " 2020-01-11 Tottenham-Brighton 5.00 1.65 \n", " 2020-02-11 Fulham-West Brom 3.00 2.47 \n", "\n", " PSD PSA \\\n", "league season game \n", "ENG-Premier League 2021 2020-01-11 Aston Villa-Southampton 3.72 2.81 \n", " 2020-01-11 Man United-Arsenal 3.78 3.73 \n", " 2020-01-11 Newcastle-Everton 3.56 2.09 \n", " 2020-01-11 Tottenham-Brighton 4.26 5.54 \n", " 2020-02-11 Fulham-West Brom 3.40 3.13 \n", "\n", " WHH WHD WHA \\\n", "league season game \n", "ENG-Premier League 2021 2020-01-11 Aston Villa-Southampton 2.50 3.5 2.75 \n", " 2020-01-11 Man United-Arsenal 2.05 3.6 3.60 \n", " 2020-01-11 Newcastle-Everton 3.70 3.4 2.05 \n", " 2020-01-11 Tottenham-Brighton 1.63 4.0 5.25 \n", " 2020-02-11 Fulham-West Brom 2.40 3.3 3.00 \n", "\n", " VCH VCD \\\n", "league season game \n", "ENG-Premier League 2021 2020-01-11 Aston Villa-Southampton 2.40 3.60 \n", " 2020-01-11 Man United-Arsenal 2.05 3.60 \n", " 2020-01-11 Newcastle-Everton 3.50 3.50 \n", " 2020-01-11 Tottenham-Brighton 1.62 4.20 \n", " 2020-02-11 Fulham-West Brom 2.45 3.25 \n", "\n", " VCA MaxH \\\n", "league season game \n", "ENG-Premier League 2021 2020-01-11 Aston Villa-Southampton 2.80 2.60 \n", " 2020-01-11 Man United-Arsenal 3.50 2.10 \n", " 2020-01-11 Newcastle-Everton 2.05 4.00 \n", " 2020-01-11 Tottenham-Brighton 5.25 1.67 \n", " 2020-02-11 Fulham-West Brom 3.00 2.56 \n", "\n", " MaxD MaxA \\\n", "league season game \n", "ENG-Premier League 2021 2020-01-11 Aston Villa-Southampton 3.84 2.85 \n", " 2020-01-11 Man United-Arsenal 3.85 3.76 \n", " 2020-01-11 Newcastle-Everton 3.59 2.15 \n", " 2020-01-11 Tottenham-Brighton 4.30 5.75 \n", " 2020-02-11 Fulham-West Brom 3.50 3.17 \n", "\n", " AvgH AvgD \\\n", "league season game \n", "ENG-Premier League 2021 2020-01-11 Aston Villa-Southampton 2.46 3.60 \n", " 2020-01-11 Man United-Arsenal 2.04 3.66 \n", " 2020-01-11 Newcastle-Everton 3.71 3.47 \n", " 2020-01-11 Tottenham-Brighton 1.63 4.17 \n", " 2020-02-11 Fulham-West Brom 2.44 3.32 \n", "\n", " AvgA B365>2.5 \\\n", "league season game \n", "ENG-Premier League 2021 2020-01-11 Aston Villa-Southampton 2.78 1.66 \n", " 2020-01-11 Man United-Arsenal 3.58 1.72 \n", " 2020-01-11 Newcastle-Everton 2.06 1.80 \n", " 2020-01-11 Tottenham-Brighton 5.29 1.66 \n", " 2020-02-11 Fulham-West Brom 3.01 2.00 \n", "\n", " B365<2.5 P>2.5 \\\n", "league season game \n", "ENG-Premier League 2021 2020-01-11 Aston Villa-Southampton 2.2 1.66 \n", " 2020-01-11 Man United-Arsenal 2.1 1.76 \n", " 2020-01-11 Newcastle-Everton 2.0 1.86 \n", " 2020-01-11 Tottenham-Brighton 2.2 1.68 \n", " 2020-02-11 Fulham-West Brom 1.8 2.13 \n", "\n", " P<2.5 Max>2.5 \\\n", "league season game \n", "ENG-Premier League 2021 2020-01-11 Aston Villa-Southampton 2.37 1.69 \n", " 2020-01-11 Man United-Arsenal 2.19 1.81 \n", " 2020-01-11 Newcastle-Everton 2.07 1.88 \n", " 2020-01-11 Tottenham-Brighton 2.32 1.71 \n", " 2020-02-11 Fulham-West Brom 1.80 2.14 \n", "\n", " Max<2.5 \\\n", "league season game \n", "ENG-Premier League 2021 2020-01-11 Aston Villa-Southampton 2.38 \n", " 2020-01-11 Man United-Arsenal 2.22 \n", " 2020-01-11 Newcastle-Everton 2.08 \n", " 2020-01-11 Tottenham-Brighton 2.35 \n", " 2020-02-11 Fulham-West Brom 1.85 \n", "\n", " Avg>2.5 \\\n", "league season game \n", "ENG-Premier League 2021 2020-01-11 Aston Villa-Southampton 1.65 \n", " 2020-01-11 Man United-Arsenal 1.74 \n", " 2020-01-11 Newcastle-Everton 1.82 \n", " 2020-01-11 Tottenham-Brighton 1.65 \n", " 2020-02-11 Fulham-West Brom 2.06 \n", "\n", " Avg<2.5 AHh \\\n", "league season game \n", "ENG-Premier League 2021 2020-01-11 Aston Villa-Southampton 2.27 0.00 \n", " 2020-01-11 Man United-Arsenal 2.12 -0.50 \n", " 2020-01-11 Newcastle-Everton 2.01 0.25 \n", " 2020-01-11 Tottenham-Brighton 2.26 -1.00 \n", " 2020-02-11 Fulham-West Brom 1.78 -0.25 \n", "\n", " B365AHH \\\n", "league season game \n", "ENG-Premier League 2021 2020-01-11 Aston Villa-Southampton 1.83 \n", " 2020-01-11 Man United-Arsenal 2.05 \n", " 2020-01-11 Newcastle-Everton 2.05 \n", " 2020-01-11 Tottenham-Brighton 2.02 \n", " 2020-02-11 Fulham-West Brom 2.10 \n", "\n", " B365AHA PAHH \\\n", "league season game \n", "ENG-Premier League 2021 2020-01-11 Aston Villa-Southampton 2.07 1.87 \n", " 2020-01-11 Man United-Arsenal 1.85 2.05 \n", " 2020-01-11 Newcastle-Everton 1.75 2.15 \n", " 2020-01-11 Tottenham-Brighton 1.77 2.15 \n", " 2020-02-11 Fulham-West Brom 1.80 2.11 \n", "\n", " PAHA MaxAHH \\\n", "league season game \n", "ENG-Premier League 2021 2020-01-11 Aston Villa-Southampton 2.07 1.87 \n", " 2020-01-11 Man United-Arsenal 1.88 2.09 \n", " 2020-01-11 Newcastle-Everton 1.80 2.17 \n", " 2020-01-11 Tottenham-Brighton 1.80 2.16 \n", " 2020-02-11 Fulham-West Brom 1.84 2.15 \n", "\n", " MaxAHA AvgAHH \\\n", "league season game \n", "ENG-Premier League 2021 2020-01-11 Aston Villa-Southampton 2.09 1.83 \n", " 2020-01-11 Man United-Arsenal 1.90 2.04 \n", " 2020-01-11 Newcastle-Everton 1.83 2.12 \n", " 2020-01-11 Tottenham-Brighton 1.84 2.09 \n", " 2020-02-11 Fulham-West Brom 1.86 2.10 \n", "\n", " AvgAHA B365CH \\\n", "league season game \n", "ENG-Premier League 2021 2020-01-11 Aston Villa-Southampton 2.05 2.60 \n", " 2020-01-11 Man United-Arsenal 1.84 1.95 \n", " 2020-01-11 Newcastle-Everton 1.77 3.30 \n", " 2020-01-11 Tottenham-Brighton 1.80 1.55 \n", " 2020-02-11 Fulham-West Brom 1.80 2.40 \n", "\n", " B365CD B365CA \\\n", "league season game \n", "ENG-Premier League 2021 2020-01-11 Aston Villa-Southampton 3.50 2.62 \n", " 2020-01-11 Man United-Arsenal 3.60 3.80 \n", " 2020-01-11 Newcastle-Everton 3.30 2.25 \n", " 2020-01-11 Tottenham-Brighton 4.33 6.00 \n", " 2020-02-11 Fulham-West Brom 3.30 3.00 \n", "\n", " BWCH BWCD \\\n", "league season game \n", "ENG-Premier League 2021 2020-01-11 Aston Villa-Southampton 2.50 3.60 \n", " 2020-01-11 Man United-Arsenal 1.95 3.60 \n", " 2020-01-11 Newcastle-Everton 3.30 3.30 \n", " 2020-01-11 Tottenham-Brighton 1.57 4.25 \n", " 2020-02-11 Fulham-West Brom 2.45 3.30 \n", "\n", " BWCA IWCH \\\n", "league season game \n", "ENG-Premier League 2021 2020-01-11 Aston Villa-Southampton 2.70 2.55 \n", " 2020-01-11 Man United-Arsenal 3.90 2.00 \n", " 2020-01-11 Newcastle-Everton 2.25 3.15 \n", " 2020-01-11 Tottenham-Brighton 5.50 1.60 \n", " 2020-02-11 Fulham-West Brom 2.95 2.40 \n", "\n", " IWCD IWCA \\\n", "league season game \n", "ENG-Premier League 2021 2020-01-11 Aston Villa-Southampton 3.50 2.70 \n", " 2020-01-11 Man United-Arsenal 3.50 3.80 \n", " 2020-01-11 Newcastle-Everton 3.35 2.30 \n", " 2020-01-11 Tottenham-Brighton 4.20 5.75 \n", " 2020-02-11 Fulham-West Brom 3.05 3.10 \n", "\n", " PSCH PSCD \\\n", "league season game \n", "ENG-Premier League 2021 2020-01-11 Aston Villa-Southampton 2.69 3.56 \n", " 2020-01-11 Man United-Arsenal 2.02 3.65 \n", " 2020-01-11 Newcastle-Everton 3.34 3.43 \n", " 2020-01-11 Tottenham-Brighton 1.61 4.36 \n", " 2020-02-11 Fulham-West Brom 2.48 3.32 \n", "\n", " PSCA WHCH \\\n", "league season game \n", "ENG-Premier League 2021 2020-01-11 Aston Villa-Southampton 2.73 2.60 \n", " 2020-01-11 Man United-Arsenal 3.97 2.00 \n", " 2020-01-11 Newcastle-Everton 2.33 3.40 \n", " 2020-01-11 Tottenham-Brighton 5.77 1.57 \n", " 2020-02-11 Fulham-West Brom 3.19 2.40 \n", "\n", " WHCD WHCA \\\n", "league season game \n", "ENG-Premier League 2021 2020-01-11 Aston Villa-Southampton 3.50 2.62 \n", " 2020-01-11 Man United-Arsenal 3.50 3.80 \n", " 2020-01-11 Newcastle-Everton 3.25 2.25 \n", " 2020-01-11 Tottenham-Brighton 4.00 6.00 \n", " 2020-02-11 Fulham-West Brom 3.20 3.10 \n", "\n", " VCCH VCCD \\\n", "league season game \n", "ENG-Premier League 2021 2020-01-11 Aston Villa-Southampton 2.50 3.60 \n", " 2020-01-11 Man United-Arsenal 1.95 3.50 \n", " 2020-01-11 Newcastle-Everton 3.30 3.30 \n", " 2020-01-11 Tottenham-Brighton 1.57 4.20 \n", " 2020-02-11 Fulham-West Brom 2.40 3.25 \n", "\n", " VCCA MaxCH \\\n", "league season game \n", "ENG-Premier League 2021 2020-01-11 Aston Villa-Southampton 2.70 2.70 \n", " 2020-01-11 Man United-Arsenal 4.00 2.06 \n", " 2020-01-11 Newcastle-Everton 2.25 3.62 \n", " 2020-01-11 Tottenham-Brighton 5.75 1.63 \n", " 2020-02-11 Fulham-West Brom 3.10 2.48 \n", "\n", " MaxCD MaxCA \\\n", "league season game \n", "ENG-Premier League 2021 2020-01-11 Aston Villa-Southampton 3.70 2.80 \n", " 2020-01-11 Man United-Arsenal 3.75 4.00 \n", " 2020-01-11 Newcastle-Everton 3.50 2.34 \n", " 2020-01-11 Tottenham-Brighton 4.45 6.39 \n", " 2020-02-11 Fulham-West Brom 3.45 3.22 \n", "\n", " AvgCH AvgCD \\\n", "league season game \n", "ENG-Premier League 2021 2020-01-11 Aston Villa-Southampton 2.57 3.55 \n", " 2020-01-11 Man United-Arsenal 1.99 3.59 \n", " 2020-01-11 Newcastle-Everton 3.34 3.33 \n", " 2020-01-11 Tottenham-Brighton 1.59 4.29 \n", " 2020-02-11 Fulham-West Brom 2.41 3.27 \n", "\n", " AvgCA \\\n", "league season game \n", "ENG-Premier League 2021 2020-01-11 Aston Villa-Southampton 2.69 \n", " 2020-01-11 Man United-Arsenal 3.87 \n", " 2020-01-11 Newcastle-Everton 2.27 \n", " 2020-01-11 Tottenham-Brighton 5.62 \n", " 2020-02-11 Fulham-West Brom 3.09 \n", "\n", " B365C>2.5 \\\n", "league season game \n", "ENG-Premier League 2021 2020-01-11 Aston Villa-Southampton 1.66 \n", " 2020-01-11 Man United-Arsenal 1.90 \n", " 2020-01-11 Newcastle-Everton 2.00 \n", " 2020-01-11 Tottenham-Brighton 1.66 \n", " 2020-02-11 Fulham-West Brom 2.05 \n", "\n", " B365C<2.5 \\\n", "league season game \n", "ENG-Premier League 2021 2020-01-11 Aston Villa-Southampton 2.20 \n", " 2020-01-11 Man United-Arsenal 1.90 \n", " 2020-01-11 Newcastle-Everton 1.80 \n", " 2020-01-11 Tottenham-Brighton 2.20 \n", " 2020-02-11 Fulham-West Brom 1.85 \n", "\n", " PC>2.5 PC<2.5 \\\n", "league season game \n", "ENG-Premier League 2021 2020-01-11 Aston Villa-Southampton 1.70 2.29 \n", " 2020-01-11 Man United-Arsenal 1.96 1.96 \n", " 2020-01-11 Newcastle-Everton 2.12 1.81 \n", " 2020-01-11 Tottenham-Brighton 1.68 2.32 \n", " 2020-02-11 Fulham-West Brom 2.05 1.88 \n", "\n", " MaxC>2.5 \\\n", "league season game \n", "ENG-Premier League 2021 2020-01-11 Aston Villa-Southampton 1.71 \n", " 2020-01-11 Man United-Arsenal 1.99 \n", " 2020-01-11 Newcastle-Everton 2.14 \n", " 2020-01-11 Tottenham-Brighton 1.72 \n", " 2020-02-11 Fulham-West Brom 2.11 \n", "\n", " MaxC<2.5 \\\n", "league season game \n", "ENG-Premier League 2021 2020-01-11 Aston Villa-Southampton 2.37 \n", " 2020-01-11 Man United-Arsenal 2.10 \n", " 2020-01-11 Newcastle-Everton 1.92 \n", " 2020-01-11 Tottenham-Brighton 2.37 \n", " 2020-02-11 Fulham-West Brom 1.92 \n", "\n", " AvgC>2.5 \\\n", "league season game \n", "ENG-Premier League 2021 2020-01-11 Aston Villa-Southampton 1.66 \n", " 2020-01-11 Man United-Arsenal 1.88 \n", " 2020-01-11 Newcastle-Everton 2.04 \n", " 2020-01-11 Tottenham-Brighton 1.65 \n", " 2020-02-11 Fulham-West Brom 2.02 \n", "\n", " AvgC<2.5 AHCh \\\n", "league season game \n", "ENG-Premier League 2021 2020-01-11 Aston Villa-Southampton 2.24 0.00 \n", " 2020-01-11 Man United-Arsenal 1.95 -0.50 \n", " 2020-01-11 Newcastle-Everton 1.80 0.25 \n", " 2020-01-11 Tottenham-Brighton 2.27 -1.00 \n", " 2020-02-11 Fulham-West Brom 1.81 -0.25 \n", "\n", " B365CAHH \\\n", "league season game \n", "ENG-Premier League 2021 2020-01-11 Aston Villa-Southampton 1.93 \n", " 2020-01-11 Man United-Arsenal 2.00 \n", " 2020-01-11 Newcastle-Everton 1.95 \n", " 2020-01-11 Tottenham-Brighton 2.06 \n", " 2020-02-11 Fulham-West Brom 2.06 \n", "\n", " B365CAHA PCAHH \\\n", "league season game \n", "ENG-Premier League 2021 2020-01-11 Aston Villa-Southampton 1.97 1.95 \n", " 2020-01-11 Man United-Arsenal 1.90 2.03 \n", " 2020-01-11 Newcastle-Everton 1.95 1.93 \n", " 2020-01-11 Tottenham-Brighton 1.84 2.11 \n", " 2020-02-11 Fulham-West Brom 1.84 2.11 \n", "\n", " PCAHA MaxCAHH \\\n", "league season game \n", "ENG-Premier League 2021 2020-01-11 Aston Villa-Southampton 1.98 1.97 \n", " 2020-01-11 Man United-Arsenal 1.90 2.05 \n", " 2020-01-11 Newcastle-Everton 2.00 1.99 \n", " 2020-01-11 Tottenham-Brighton 1.84 2.13 \n", " 2020-02-11 Fulham-West Brom 1.84 2.12 \n", "\n", " MaxCAHA \\\n", "league season game \n", "ENG-Premier League 2021 2020-01-11 Aston Villa-Southampton 2.04 \n", " 2020-01-11 Man United-Arsenal 1.92 \n", " 2020-01-11 Newcastle-Everton 2.03 \n", " 2020-01-11 Tottenham-Brighton 1.99 \n", " 2020-02-11 Fulham-West Brom 1.87 \n", "\n", " AvgCAHH AvgCAHA \n", "league season game \n", "ENG-Premier League 2021 2020-01-11 Aston Villa-Southampton 1.89 1.98 \n", " 2020-01-11 Man United-Arsenal 2.00 1.88 \n", " 2020-01-11 Newcastle-Everton 1.93 1.95 \n", " 2020-01-11 Tottenham-Brighton 2.02 1.86 \n", " 2020-02-11 Fulham-West Brom 2.08 1.82 " ] }, "execution_count": 5, "metadata": {}, "output_type": "execute_result" } ], "source": [ "hist = mh.read_games()\n", "hist.head()" ] } ], "metadata": { "kernelspec": { "display_name": "soccerdata", "language": "python", "name": "soccerdata" }, "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.9.6" }, "toc": { "base_numbering": 1, "nav_menu": {}, "number_sections": true, "sideBar": true, "skip_h1_title": false, "title_cell": "Table of Contents", "title_sidebar": "Contents", "toc_cell": false, "toc_position": {}, "toc_section_display": true, "toc_window_display": true } }, "nbformat": 4, "nbformat_minor": 5 }