{ "cells": [ { "cell_type": "code", "execution_count": 87, "metadata": {}, "outputs": [], "source": [ "import pandas as pd" ] }, { "cell_type": "code", "execution_count": 88, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Archive: matches.zip\n", " creating: matches/\n", " inflating: matches/international_matches.csv \n" ] } ], "source": [ "!unzip matches.zip" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Projekt do przewidywania, wygranego zespołu w meczu na podstawie fifa points\n", "## Używamy datasetu:\n", "1. Wyniki meczów podczas fifa world cup (1993-2022)" ] }, { "cell_type": "code", "execution_count": 89, "metadata": {}, "outputs": [], "source": [ "# points = pd.read_csv('ranking/fifa_ranking-2022-10-06.csv')\n", "matches = pd.read_csv('matches/international_matches.csv')\n" ] }, { "cell_type": "code", "execution_count": 90, "metadata": {}, "outputs": [], "source": [ "# points = points[[\"country_full\", \"total_points\", \"previous_points\", \"rank_date\"]]\n", "matches = matches[[\"date\", \"home_team\", \"away_team\", \"home_team_fifa_rank\",\"away_team_fifa_rank\", \"home_team_score\", \"away_team_score\", \"home_team_result\"]]" ] }, { "cell_type": "code", "execution_count": 91, "metadata": {}, "outputs": [], "source": [ "# points" ] }, { "cell_type": "code", "execution_count": 92, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", " | date | \n", "home_team | \n", "away_team | \n", "home_team_fifa_rank | \n", "away_team_fifa_rank | \n", "home_team_score | \n", "away_team_score | \n", "home_team_result | \n", "
---|---|---|---|---|---|---|---|---|
0 | \n", "1993-08-08 | \n", "Bolivia | \n", "Uruguay | \n", "59 | \n", "22 | \n", "3 | \n", "1 | \n", "Win | \n", "
1 | \n", "1993-08-08 | \n", "Brazil | \n", "Mexico | \n", "8 | \n", "14 | \n", "1 | \n", "1 | \n", "Draw | \n", "
2 | \n", "1993-08-08 | \n", "Ecuador | \n", "Venezuela | \n", "35 | \n", "94 | \n", "5 | \n", "0 | \n", "Win | \n", "
3 | \n", "1993-08-08 | \n", "Guinea | \n", "Sierra Leone | \n", "65 | \n", "86 | \n", "1 | \n", "0 | \n", "Win | \n", "
4 | \n", "1993-08-08 | \n", "Paraguay | \n", "Argentina | \n", "67 | \n", "5 | \n", "1 | \n", "3 | \n", "Lose | \n", "
... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "
23916 | \n", "2022-06-14 | \n", "Moldova | \n", "Andorra | \n", "180 | \n", "153 | \n", "2 | \n", "1 | \n", "Win | \n", "
23917 | \n", "2022-06-14 | \n", "Liechtenstein | \n", "Latvia | \n", "192 | \n", "135 | \n", "0 | \n", "2 | \n", "Lose | \n", "
23918 | \n", "2022-06-14 | \n", "Chile | \n", "Ghana | \n", "28 | \n", "60 | \n", "0 | \n", "0 | \n", "Lose | \n", "
23919 | \n", "2022-06-14 | \n", "Japan | \n", "Tunisia | \n", "23 | \n", "35 | \n", "0 | \n", "3 | \n", "Lose | \n", "
23920 | \n", "2022-06-14 | \n", "Korea Republic | \n", "Egypt | \n", "29 | \n", "32 | \n", "4 | \n", "1 | \n", "Win | \n", "
23921 rows × 8 columns
\n", "\n", " | home_team_fifa_rank | \n", "away_team_fifa_rank | \n", "home_team_result | \n", "
---|---|---|---|
0 | \n", "59 | \n", "22 | \n", "2 | \n", "
1 | \n", "8 | \n", "14 | \n", "1 | \n", "
2 | \n", "35 | \n", "94 | \n", "2 | \n", "
3 | \n", "65 | \n", "86 | \n", "2 | \n", "
4 | \n", "67 | \n", "5 | \n", "0 | \n", "
... | \n", "... | \n", "... | \n", "... | \n", "
23916 | \n", "180 | \n", "153 | \n", "2 | \n", "
23917 | \n", "192 | \n", "135 | \n", "0 | \n", "
23918 | \n", "28 | \n", "60 | \n", "0 | \n", "
23919 | \n", "23 | \n", "35 | \n", "0 | \n", "
23920 | \n", "29 | \n", "32 | \n", "2 | \n", "
23921 rows × 3 columns
\n", "