{
"cells": [
{
"cell_type": "markdown",
"id": "bf489cf1-2ba6-4b39-bcad-dfb9ef56588e",
"metadata": {},
"source": [
"# Scrape FPL Website and Optimise Team"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "5f201372-0b43-464d-9f83-b91ade6abe7e",
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"import penaltyblog as pb"
]
},
{
"cell_type": "markdown",
"id": "afead965-639f-4b6e-963b-023144a43a48",
"metadata": {},
"source": [
"## Get the current active gameweek number"
]
},
{
"cell_type": "code",
"execution_count": 2,
"id": "c1b341b9-863e-47d1-8070-b0052d215c48",
"metadata": {
"tags": []
},
"outputs": [
{
"data": {
"text/plain": [
"16"
]
},
"execution_count": 2,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"current_gameweek = pb.fpl.get_current_gameweek()\n",
"current_gameweek"
]
},
{
"cell_type": "markdown",
"id": "1cc903c3-f2ea-4b17-b118-e01f4fb66838",
"metadata": {},
"source": [
"## Get the weekly events\n",
"\n",
"This contains information on who the most captainied player was for each week week, what chips were played, what the highest score was etc"
]
},
{
"cell_type": "code",
"execution_count": 3,
"id": "de134ad7-7d9c-473e-84c0-4be34c50b6c9",
"metadata": {
"tags": []
},
"outputs": [
{
"data": {
"text/html": [
"
\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" id | \n",
" name | \n",
" deadline_time | \n",
" release_time | \n",
" average_entry_score | \n",
" finished | \n",
" data_checked | \n",
" highest_scoring_entry | \n",
" deadline_time_epoch | \n",
" deadline_time_game_offset | \n",
" ... | \n",
" ranked_count | \n",
" overrides | \n",
" chip_plays | \n",
" most_selected | \n",
" most_transferred_in | \n",
" top_element | \n",
" top_element_info | \n",
" transfers_made | \n",
" most_captained | \n",
" most_vice_captained | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" 1 | \n",
" Gameweek 1 | \n",
" 2024-08-16 17:30:00+00:00 | \n",
" None | \n",
" 57 | \n",
" True | \n",
" True | \n",
" 3546234.0 | \n",
" 1723829400 | \n",
" 0 | \n",
" ... | \n",
" 8597356 | \n",
" {'rules': {}, 'scoring': {}, 'element_types': ... | \n",
" [{'chip_name': 'bboost', 'num_played': 144974}... | \n",
" 401.0 | \n",
" 27.0 | \n",
" 328.0 | \n",
" {'id': 328, 'points': 14} | \n",
" 0 | \n",
" 351.0 | \n",
" 351.0 | \n",
"
\n",
" \n",
" 1 | \n",
" 2 | \n",
" Gameweek 2 | \n",
" 2024-08-24 10:00:00+00:00 | \n",
" None | \n",
" 69 | \n",
" True | \n",
" True | \n",
" 9442126.0 | \n",
" 1724493600 | \n",
" 0 | \n",
" ... | \n",
" 9543353 | \n",
" {'rules': {}, 'scoring': {}, 'element_types': ... | \n",
" [{'chip_name': 'bboost', 'num_played': 118782}... | \n",
" 401.0 | \n",
" 594.0 | \n",
" 177.0 | \n",
" {'id': 177, 'points': 20} | \n",
" 13364453 | \n",
" 351.0 | \n",
" 401.0 | \n",
"
\n",
" \n",
" 2 | \n",
" 3 | \n",
" Gameweek 3 | \n",
" 2024-08-31 10:00:00+00:00 | \n",
" None | \n",
" 64 | \n",
" True | \n",
" True | \n",
" 430195.0 | \n",
" 1725098400 | \n",
" 0 | \n",
" ... | \n",
" 9912161 | \n",
" {'rules': {}, 'scoring': {}, 'element_types': ... | \n",
" [{'chip_name': 'bboost', 'num_played': 87334},... | \n",
" 351.0 | \n",
" 177.0 | \n",
" 328.0 | \n",
" {'id': 328, 'points': 17} | \n",
" 23723836 | \n",
" 351.0 | \n",
" 328.0 | \n",
"
\n",
" \n",
" 3 | \n",
" 4 | \n",
" Gameweek 4 | \n",
" 2024-09-14 10:00:00+00:00 | \n",
" None | \n",
" 51 | \n",
" True | \n",
" True | \n",
" 3560750.0 | \n",
" 1726308000 | \n",
" 0 | \n",
" ... | \n",
" 10178753 | \n",
" {'rules': {}, 'scoring': {}, 'element_types': ... | \n",
" [{'chip_name': 'bboost', 'num_played': 83637},... | \n",
" 351.0 | \n",
" 129.0 | \n",
" 185.0 | \n",
" {'id': 185, 'points': 15} | \n",
" 25930392 | \n",
" 351.0 | \n",
" 328.0 | \n",
"
\n",
" \n",
" 4 | \n",
" 5 | \n",
" Gameweek 5 | \n",
" 2024-09-21 10:00:00+00:00 | \n",
" None | \n",
" 58 | \n",
" True | \n",
" True | \n",
" 1773336.0 | \n",
" 1726912800 | \n",
" 0 | \n",
" ... | \n",
" 10279610 | \n",
" {'rules': {}, 'scoring': {}, 'element_types': ... | \n",
" [{'chip_name': 'bboost', 'num_played': 66447},... | \n",
" 351.0 | \n",
" 58.0 | \n",
" 180.0 | \n",
" {'id': 180, 'points': 16} | \n",
" 13036058 | \n",
" 351.0 | \n",
" 351.0 | \n",
"
\n",
" \n",
"
\n",
"
5 rows × 29 columns
\n",
"
"
],
"text/plain": [
" id name deadline_time release_time average_entry_score \\\n",
"0 1 Gameweek 1 2024-08-16 17:30:00+00:00 None 57 \n",
"1 2 Gameweek 2 2024-08-24 10:00:00+00:00 None 69 \n",
"2 3 Gameweek 3 2024-08-31 10:00:00+00:00 None 64 \n",
"3 4 Gameweek 4 2024-09-14 10:00:00+00:00 None 51 \n",
"4 5 Gameweek 5 2024-09-21 10:00:00+00:00 None 58 \n",
"\n",
" finished data_checked highest_scoring_entry deadline_time_epoch \\\n",
"0 True True 3546234.0 1723829400 \n",
"1 True True 9442126.0 1724493600 \n",
"2 True True 430195.0 1725098400 \n",
"3 True True 3560750.0 1726308000 \n",
"4 True True 1773336.0 1726912800 \n",
"\n",
" deadline_time_game_offset ... ranked_count \\\n",
"0 0 ... 8597356 \n",
"1 0 ... 9543353 \n",
"2 0 ... 9912161 \n",
"3 0 ... 10178753 \n",
"4 0 ... 10279610 \n",
"\n",
" overrides \\\n",
"0 {'rules': {}, 'scoring': {}, 'element_types': ... \n",
"1 {'rules': {}, 'scoring': {}, 'element_types': ... \n",
"2 {'rules': {}, 'scoring': {}, 'element_types': ... \n",
"3 {'rules': {}, 'scoring': {}, 'element_types': ... \n",
"4 {'rules': {}, 'scoring': {}, 'element_types': ... \n",
"\n",
" chip_plays most_selected \\\n",
"0 [{'chip_name': 'bboost', 'num_played': 144974}... 401.0 \n",
"1 [{'chip_name': 'bboost', 'num_played': 118782}... 401.0 \n",
"2 [{'chip_name': 'bboost', 'num_played': 87334},... 351.0 \n",
"3 [{'chip_name': 'bboost', 'num_played': 83637},... 351.0 \n",
"4 [{'chip_name': 'bboost', 'num_played': 66447},... 351.0 \n",
"\n",
" most_transferred_in top_element top_element_info \\\n",
"0 27.0 328.0 {'id': 328, 'points': 14} \n",
"1 594.0 177.0 {'id': 177, 'points': 20} \n",
"2 177.0 328.0 {'id': 328, 'points': 17} \n",
"3 129.0 185.0 {'id': 185, 'points': 15} \n",
"4 58.0 180.0 {'id': 180, 'points': 16} \n",
"\n",
" transfers_made most_captained most_vice_captained \n",
"0 0 351.0 351.0 \n",
"1 13364453 351.0 401.0 \n",
"2 23723836 351.0 328.0 \n",
"3 25930392 351.0 328.0 \n",
"4 13036058 351.0 351.0 \n",
"\n",
"[5 rows x 29 columns]"
]
},
"execution_count": 3,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"info = pb.fpl.get_gameweek_info()\n",
"info.head()"
]
},
{
"cell_type": "markdown",
"id": "9ec99fba-afd4-479b-af86-bdfbd19937cc",
"metadata": {},
"source": [
"## Get Player Name to ID mappings "
]
},
{
"cell_type": "code",
"execution_count": 4,
"id": "f703862b-f8f6-4748-8c97-54cc672ece97",
"metadata": {
"tags": []
},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" first_name | \n",
" second_name | \n",
" web_name | \n",
" id | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" Fábio | \n",
" Ferreira Vieira | \n",
" Fábio Vieira | \n",
" 1 | \n",
"
\n",
" \n",
" 1 | \n",
" Gabriel | \n",
" Fernando de Jesus | \n",
" G.Jesus | \n",
" 2 | \n",
"
\n",
" \n",
" 2 | \n",
" Gabriel | \n",
" dos Santos Magalhães | \n",
" Gabriel | \n",
" 3 | \n",
"
\n",
" \n",
" 3 | \n",
" Kai | \n",
" Havertz | \n",
" Havertz | \n",
" 4 | \n",
"
\n",
" \n",
" 4 | \n",
" Karl | \n",
" Hein | \n",
" Hein | \n",
" 5 | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" first_name second_name web_name id\n",
"0 Fábio Ferreira Vieira Fábio Vieira 1\n",
"1 Gabriel Fernando de Jesus G.Jesus 2\n",
"2 Gabriel dos Santos Magalhães Gabriel 3\n",
"3 Kai Havertz Havertz 4\n",
"4 Karl Hein Hein 5"
]
},
"execution_count": 4,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"mappings = pb.fpl.get_player_id_mappings()\n",
"mappings.head()"
]
},
{
"cell_type": "markdown",
"id": "062c4777-6a7f-491d-9b9e-4151149a86b8",
"metadata": {
"tags": []
},
"source": [
"## Get the player data\n",
"\n",
"This contains information on each player, e.g. total score, total minutes played, form, current price etc"
]
},
{
"cell_type": "code",
"execution_count": 5,
"id": "5f3e96ad-1fe6-492c-a1c4-f27b8701f9cc",
"metadata": {
"tags": []
},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" can_transact | \n",
" can_select | \n",
" chance_of_playing_next_round | \n",
" chance_of_playing_this_round | \n",
" code | \n",
" cost_change_event | \n",
" cost_change_event_fall | \n",
" cost_change_start | \n",
" cost_change_start_fall | \n",
" dreamteam_count | \n",
" ... | \n",
" points_per_game_rank_type | \n",
" selected_rank | \n",
" selected_rank_type | \n",
" starts_per_90 | \n",
" clean_sheets_per_90 | \n",
" position | \n",
" position_short | \n",
" team_id | \n",
" team_name | \n",
" team_name_short | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" True | \n",
" False | \n",
" 0.0 | \n",
" 0.0 | \n",
" 438098 | \n",
" 0 | \n",
" 0 | \n",
" -1 | \n",
" 1 | \n",
" 0 | \n",
" ... | \n",
" 310 | \n",
" 636 | \n",
" 278 | \n",
" 0.00 | \n",
" 0.00 | \n",
" Midfielder | \n",
" MID | \n",
" 1 | \n",
" Arsenal | \n",
" ARS | \n",
"
\n",
" \n",
" 1 | \n",
" True | \n",
" True | \n",
" 100.0 | \n",
" 100.0 | \n",
" 205651 | \n",
" 0 | \n",
" 0 | \n",
" -2 | \n",
" 2 | \n",
" 0 | \n",
" ... | \n",
" 49 | \n",
" 214 | \n",
" 37 | \n",
" 0.74 | \n",
" 0.37 | \n",
" Forward | \n",
" FWD | \n",
" 1 | \n",
" Arsenal | \n",
" ARS | \n",
"
\n",
" \n",
" 2 | \n",
" True | \n",
" True | \n",
" 75.0 | \n",
" 75.0 | \n",
" 226597 | \n",
" 0 | \n",
" 0 | \n",
" 2 | \n",
" -2 | \n",
" 2 | \n",
" ... | \n",
" 4 | \n",
" 13 | \n",
" 5 | \n",
" 1.08 | \n",
" 0.33 | \n",
" Defender | \n",
" DEF | \n",
" 1 | \n",
" Arsenal | \n",
" ARS | \n",
"
\n",
" \n",
" 3 | \n",
" True | \n",
" True | \n",
" 100.0 | \n",
" 100.0 | \n",
" 219847 | \n",
" 0 | \n",
" 0 | \n",
" -1 | \n",
" 1 | \n",
" 1 | \n",
" ... | \n",
" 14 | \n",
" 37 | \n",
" 10 | \n",
" 1.01 | \n",
" 0.29 | \n",
" Forward | \n",
" FWD | \n",
" 1 | \n",
" Arsenal | \n",
" ARS | \n",
"
\n",
" \n",
" 4 | \n",
" True | \n",
" False | \n",
" 0.0 | \n",
" 0.0 | \n",
" 463748 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
" ... | \n",
" 58 | \n",
" 558 | \n",
" 68 | \n",
" 0.00 | \n",
" 0.00 | \n",
" Goalkeeper | \n",
" GKP | \n",
" 1 | \n",
" Arsenal | \n",
" ARS | \n",
"
\n",
" \n",
"
\n",
"
5 rows × 96 columns
\n",
"
"
],
"text/plain": [
" can_transact can_select chance_of_playing_next_round \\\n",
"0 True False 0.0 \n",
"1 True True 100.0 \n",
"2 True True 75.0 \n",
"3 True True 100.0 \n",
"4 True False 0.0 \n",
"\n",
" chance_of_playing_this_round code cost_change_event \\\n",
"0 0.0 438098 0 \n",
"1 100.0 205651 0 \n",
"2 75.0 226597 0 \n",
"3 100.0 219847 0 \n",
"4 0.0 463748 0 \n",
"\n",
" cost_change_event_fall cost_change_start cost_change_start_fall \\\n",
"0 0 -1 1 \n",
"1 0 -2 2 \n",
"2 0 2 -2 \n",
"3 0 -1 1 \n",
"4 0 0 0 \n",
"\n",
" dreamteam_count ... points_per_game_rank_type selected_rank \\\n",
"0 0 ... 310 636 \n",
"1 0 ... 49 214 \n",
"2 2 ... 4 13 \n",
"3 1 ... 14 37 \n",
"4 0 ... 58 558 \n",
"\n",
" selected_rank_type starts_per_90 clean_sheets_per_90 position \\\n",
"0 278 0.00 0.00 Midfielder \n",
"1 37 0.74 0.37 Forward \n",
"2 5 1.08 0.33 Defender \n",
"3 10 1.01 0.29 Forward \n",
"4 68 0.00 0.00 Goalkeeper \n",
"\n",
" position_short team_id team_name team_name_short \n",
"0 MID 1 Arsenal ARS \n",
"1 FWD 1 Arsenal ARS \n",
"2 DEF 1 Arsenal ARS \n",
"3 FWD 1 Arsenal ARS \n",
"4 GKP 1 Arsenal ARS \n",
"\n",
"[5 rows x 96 columns]"
]
},
"execution_count": 5,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"players = pb.fpl.get_player_data()\n",
"players.head()"
]
},
{
"cell_type": "markdown",
"id": "42988cb5-c27d-4754-89e8-ca66a041313e",
"metadata": {
"tags": []
},
"source": [
"## Let's extract the data for Oleksandr Zinchenko from the data frame"
]
},
{
"cell_type": "code",
"execution_count": 6,
"id": "b8e4635e-1420-4cb4-882c-41a905cb7044",
"metadata": {
"tags": []
},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" can_transact | \n",
" can_select | \n",
" chance_of_playing_next_round | \n",
" chance_of_playing_this_round | \n",
" code | \n",
" cost_change_event | \n",
" cost_change_event_fall | \n",
" cost_change_start | \n",
" cost_change_start_fall | \n",
" dreamteam_count | \n",
" ... | \n",
" points_per_game_rank_type | \n",
" selected_rank | \n",
" selected_rank_type | \n",
" starts_per_90 | \n",
" clean_sheets_per_90 | \n",
" position | \n",
" position_short | \n",
" team_id | \n",
" team_name | \n",
" team_name_short | \n",
"
\n",
" \n",
" \n",
" \n",
" 20 | \n",
" True | \n",
" True | \n",
" 75.0 | \n",
" 100.0 | \n",
" 206325 | \n",
" 0 | \n",
" 0 | \n",
" -2 | \n",
" 2 | \n",
" 0 | \n",
" ... | \n",
" 50 | \n",
" 204 | \n",
" 82 | \n",
" 0.77 | \n",
" 0.77 | \n",
" Defender | \n",
" DEF | \n",
" 1 | \n",
" Arsenal | \n",
" ARS | \n",
"
\n",
" \n",
"
\n",
"
1 rows × 96 columns
\n",
"
"
],
"text/plain": [
" can_transact can_select chance_of_playing_next_round \\\n",
"20 True True 75.0 \n",
"\n",
" chance_of_playing_this_round code cost_change_event \\\n",
"20 100.0 206325 0 \n",
"\n",
" cost_change_event_fall cost_change_start cost_change_start_fall \\\n",
"20 0 -2 2 \n",
"\n",
" dreamteam_count ... points_per_game_rank_type selected_rank \\\n",
"20 0 ... 50 204 \n",
"\n",
" selected_rank_type starts_per_90 clean_sheets_per_90 position \\\n",
"20 82 0.77 0.77 Defender \n",
"\n",
" position_short team_id team_name team_name_short \n",
"20 DEF 1 Arsenal ARS \n",
"\n",
"[1 rows x 96 columns]"
]
},
"execution_count": 6,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"zincs = mappings.query(\"web_name == 'Zinchenko'\")\n",
"zincs_id = zincs[\"id\"].iloc[0]\n",
"players.query(\"id == @zincs_id\")"
]
},
{
"cell_type": "markdown",
"id": "0f091655-3cd9-4c3c-bfe8-397f245cb96e",
"metadata": {
"tags": []
},
"source": [
"## Now extract the data about goalkeepers"
]
},
{
"cell_type": "code",
"execution_count": 7,
"id": "0895da76-2e03-4f6f-9618-278897d48909",
"metadata": {
"tags": []
},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" id | \n",
" first_name | \n",
" second_name | \n",
" position | \n",
" total_points | \n",
" minutes | \n",
"
\n",
" \n",
" \n",
" \n",
" 466 | \n",
" 383 | \n",
" André | \n",
" Onana | \n",
" Goalkeeper | \n",
" 65 | \n",
" 1350 | \n",
"
\n",
" \n",
" 536 | \n",
" 443 | \n",
" Matz | \n",
" Sels | \n",
" Goalkeeper | \n",
" 62 | \n",
" 1350 | \n",
"
\n",
" \n",
" 11 | \n",
" 15 | \n",
" David | \n",
" Raya Martin | \n",
" Goalkeeper | \n",
" 58 | \n",
" 1350 | \n",
"
\n",
" \n",
" 276 | \n",
" 235 | \n",
" Jordan | \n",
" Pickford | \n",
" Goalkeeper | \n",
" 58 | \n",
" 1260 | \n",
"
\n",
" \n",
" 234 | \n",
" 201 | \n",
" Dean | \n",
" Henderson | \n",
" Goalkeeper | \n",
" 53 | \n",
" 1350 | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" id first_name second_name position total_points minutes\n",
"466 383 André Onana Goalkeeper 65 1350\n",
"536 443 Matz Sels Goalkeeper 62 1350\n",
"11 15 David Raya Martin Goalkeeper 58 1350\n",
"276 235 Jordan Pickford Goalkeeper 58 1260\n",
"234 201 Dean Henderson Goalkeeper 53 1350"
]
},
"execution_count": 7,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"players.query(\"position_short == 'GKP'\")[\n",
" [\"id\", \"first_name\", \"second_name\", \"position\", \"total_points\", \"minutes\"]\n",
"].sort_values(\"total_points\", ascending=False).head()"
]
},
{
"cell_type": "markdown",
"id": "836a5e8b-f7b7-427b-9468-139b177592c9",
"metadata": {},
"source": [
"## Get Zinchenko's history by week for current season"
]
},
{
"cell_type": "code",
"execution_count": 8,
"id": "e9b7be83-5242-44ca-9cfc-2d77810d0a6e",
"metadata": {
"tags": []
},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" element | \n",
" fixture | \n",
" opponent_team | \n",
" total_points | \n",
" was_home | \n",
" kickoff_time | \n",
" team_h_score | \n",
" team_a_score | \n",
" round | \n",
" modified | \n",
" ... | \n",
" starts | \n",
" expected_goals | \n",
" expected_assists | \n",
" expected_goal_involvements | \n",
" expected_goals_conceded | \n",
" value | \n",
" transfers_balance | \n",
" selected | \n",
" transfers_in | \n",
" transfers_out | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" 25 | \n",
" 2 | \n",
" 20 | \n",
" 6 | \n",
" True | \n",
" 2024-08-17 14:00:00+00:00 | \n",
" 2 | \n",
" 0 | \n",
" 1 | \n",
" False | \n",
" ... | \n",
" 1 | \n",
" 0.00 | \n",
" 0.04 | \n",
" 0.04 | \n",
" 0.32 | \n",
" 5.0 | \n",
" 0 | \n",
" 230223 | \n",
" 0 | \n",
" 0 | \n",
"
\n",
" \n",
" 1 | \n",
" 25 | \n",
" 11 | \n",
" 2 | \n",
" 0 | \n",
" False | \n",
" 2024-08-24 16:30:00+00:00 | \n",
" 0 | \n",
" 2 | \n",
" 2 | \n",
" False | \n",
" ... | \n",
" 0 | \n",
" 0.00 | \n",
" 0.00 | \n",
" 0.00 | \n",
" 0.00 | \n",
" 5.0 | \n",
" 23613 | \n",
" 312806 | \n",
" 46003 | \n",
" 22390 | \n",
"
\n",
" \n",
" 2 | \n",
" 25 | \n",
" 21 | \n",
" 5 | \n",
" 1 | \n",
" True | \n",
" 2024-08-31 11:30:00+00:00 | \n",
" 1 | \n",
" 1 | \n",
" 3 | \n",
" False | \n",
" ... | \n",
" 0 | \n",
" 0.00 | \n",
" 0.00 | \n",
" 0.00 | \n",
" 0.28 | \n",
" 5.0 | \n",
" -56048 | \n",
" 264308 | \n",
" 16584 | \n",
" 72632 | \n",
"
\n",
" \n",
" 3 | \n",
" 25 | \n",
" 39 | \n",
" 18 | \n",
" 0 | \n",
" False | \n",
" 2024-09-15 13:00:00+00:00 | \n",
" 0 | \n",
" 1 | \n",
" 4 | \n",
" False | \n",
" ... | \n",
" 0 | \n",
" 0.00 | \n",
" 0.00 | \n",
" 0.00 | \n",
" 0.00 | \n",
" 4.9 | \n",
" -45776 | \n",
" 227563 | \n",
" 9852 | \n",
" 55628 | \n",
"
\n",
" \n",
" 4 | \n",
" 25 | \n",
" 47 | \n",
" 13 | \n",
" 0 | \n",
" False | \n",
" 2024-09-22 15:30:00+00:00 | \n",
" 2 | \n",
" 2 | \n",
" 5 | \n",
" False | \n",
" ... | \n",
" 0 | \n",
" 0.00 | \n",
" 0.00 | \n",
" 0.00 | \n",
" 0.00 | \n",
" 4.9 | \n",
" -44677 | \n",
" 184385 | \n",
" 1173 | \n",
" 45850 | \n",
"
\n",
" \n",
" 5 | \n",
" 25 | \n",
" 51 | \n",
" 11 | \n",
" 0 | \n",
" True | \n",
" 2024-09-28 14:00:00+00:00 | \n",
" 4 | \n",
" 2 | \n",
" 6 | \n",
" False | \n",
" ... | \n",
" 0 | \n",
" 0.00 | \n",
" 0.00 | \n",
" 0.00 | \n",
" 0.00 | \n",
" 4.8 | \n",
" -40098 | \n",
" 144882 | \n",
" 164 | \n",
" 40262 | \n",
"
\n",
" \n",
" 6 | \n",
" 25 | \n",
" 61 | \n",
" 17 | \n",
" 0 | \n",
" True | \n",
" 2024-10-05 14:00:00+00:00 | \n",
" 3 | \n",
" 1 | \n",
" 7 | \n",
" False | \n",
" ... | \n",
" 0 | \n",
" 0.00 | \n",
" 0.00 | \n",
" 0.00 | \n",
" 0.00 | \n",
" 4.8 | \n",
" -23935 | \n",
" 121540 | \n",
" 84 | \n",
" 24019 | \n",
"
\n",
" \n",
" 7 | \n",
" 25 | \n",
" 71 | \n",
" 3 | \n",
" 0 | \n",
" False | \n",
" 2024-10-19 16:30:00+00:00 | \n",
" 2 | \n",
" 0 | \n",
" 8 | \n",
" False | \n",
" ... | \n",
" 0 | \n",
" 0.00 | \n",
" 0.00 | \n",
" 0.00 | \n",
" 0.00 | \n",
" 4.8 | \n",
" -9937 | \n",
" 112095 | \n",
" 103 | \n",
" 10040 | \n",
"
\n",
" \n",
" 8 | \n",
" 25 | \n",
" 81 | \n",
" 12 | \n",
" 0 | \n",
" True | \n",
" 2024-10-27 16:30:00+00:00 | \n",
" 2 | \n",
" 2 | \n",
" 9 | \n",
" False | \n",
" ... | \n",
" 0 | \n",
" 0.00 | \n",
" 0.00 | \n",
" 0.00 | \n",
" 0.00 | \n",
" 4.8 | \n",
" -1519 | \n",
" 111488 | \n",
" 1054 | \n",
" 2573 | \n",
"
\n",
" \n",
" 9 | \n",
" 25 | \n",
" 96 | \n",
" 15 | \n",
" 1 | \n",
" False | \n",
" 2024-11-02 12:30:00+00:00 | \n",
" 1 | \n",
" 0 | \n",
" 10 | \n",
" False | \n",
" ... | \n",
" 0 | \n",
" 0.00 | \n",
" 0.01 | \n",
" 0.01 | \n",
" 0.08 | \n",
" 4.8 | \n",
" -1515 | \n",
" 110916 | \n",
" 1859 | \n",
" 3374 | \n",
"
\n",
" \n",
" 10 | \n",
" 25 | \n",
" 103 | \n",
" 6 | \n",
" 0 | \n",
" False | \n",
" 2024-11-10 16:30:00+00:00 | \n",
" 1 | \n",
" 1 | \n",
" 11 | \n",
" False | \n",
" ... | \n",
" 0 | \n",
" 0.00 | \n",
" 0.00 | \n",
" 0.00 | \n",
" 0.00 | \n",
" 4.8 | \n",
" -1711 | \n",
" 109869 | \n",
" 1132 | \n",
" 2843 | \n",
"
\n",
" \n",
" 11 | \n",
" 25 | \n",
" 111 | \n",
" 16 | \n",
" 1 | \n",
" True | \n",
" 2024-11-23 15:00:00+00:00 | \n",
" 3 | \n",
" 0 | \n",
" 12 | \n",
" False | \n",
" ... | \n",
" 0 | \n",
" 0.00 | \n",
" 0.00 | \n",
" 0.00 | \n",
" 0.17 | \n",
" 4.8 | \n",
" -928 | \n",
" 109888 | \n",
" 1706 | \n",
" 2634 | \n",
"
\n",
" \n",
" 12 | \n",
" 25 | \n",
" 129 | \n",
" 19 | \n",
" 1 | \n",
" False | \n",
" 2024-11-30 17:30:00+00:00 | \n",
" 2 | \n",
" 5 | \n",
" 13 | \n",
" False | \n",
" ... | \n",
" 0 | \n",
" 0.00 | \n",
" 0.02 | \n",
" 0.02 | \n",
" 0.74 | \n",
" 4.8 | \n",
" -807 | \n",
" 109626 | \n",
" 1086 | \n",
" 1893 | \n",
"
\n",
" \n",
" 13 | \n",
" 25 | \n",
" 131 | \n",
" 14 | \n",
" 5 | \n",
" True | \n",
" 2024-12-04 20:15:00+00:00 | \n",
" 2 | \n",
" 0 | \n",
" 14 | \n",
" False | \n",
" ... | \n",
" 1 | \n",
" 0.06 | \n",
" 0.01 | \n",
" 0.07 | \n",
" 0.14 | \n",
" 4.8 | \n",
" -1118 | \n",
" 108914 | \n",
" 960 | \n",
" 2078 | \n",
"
\n",
" \n",
" 14 | \n",
" 25 | \n",
" 145 | \n",
" 9 | \n",
" 0 | \n",
" False | \n",
" 2024-12-08 14:00:00+00:00 | \n",
" 1 | \n",
" 1 | \n",
" 15 | \n",
" False | \n",
" ... | \n",
" 0 | \n",
" 0.00 | \n",
" 0.00 | \n",
" 0.00 | \n",
" 0.00 | \n",
" 4.8 | \n",
" 2940 | \n",
" 112774 | \n",
" 4379 | \n",
" 1439 | \n",
"
\n",
" \n",
"
\n",
"
15 rows × 37 columns
\n",
"
"
],
"text/plain": [
" element fixture opponent_team total_points was_home \\\n",
"0 25 2 20 6 True \n",
"1 25 11 2 0 False \n",
"2 25 21 5 1 True \n",
"3 25 39 18 0 False \n",
"4 25 47 13 0 False \n",
"5 25 51 11 0 True \n",
"6 25 61 17 0 True \n",
"7 25 71 3 0 False \n",
"8 25 81 12 0 True \n",
"9 25 96 15 1 False \n",
"10 25 103 6 0 False \n",
"11 25 111 16 1 True \n",
"12 25 129 19 1 False \n",
"13 25 131 14 5 True \n",
"14 25 145 9 0 False \n",
"\n",
" kickoff_time team_h_score team_a_score round modified \\\n",
"0 2024-08-17 14:00:00+00:00 2 0 1 False \n",
"1 2024-08-24 16:30:00+00:00 0 2 2 False \n",
"2 2024-08-31 11:30:00+00:00 1 1 3 False \n",
"3 2024-09-15 13:00:00+00:00 0 1 4 False \n",
"4 2024-09-22 15:30:00+00:00 2 2 5 False \n",
"5 2024-09-28 14:00:00+00:00 4 2 6 False \n",
"6 2024-10-05 14:00:00+00:00 3 1 7 False \n",
"7 2024-10-19 16:30:00+00:00 2 0 8 False \n",
"8 2024-10-27 16:30:00+00:00 2 2 9 False \n",
"9 2024-11-02 12:30:00+00:00 1 0 10 False \n",
"10 2024-11-10 16:30:00+00:00 1 1 11 False \n",
"11 2024-11-23 15:00:00+00:00 3 0 12 False \n",
"12 2024-11-30 17:30:00+00:00 2 5 13 False \n",
"13 2024-12-04 20:15:00+00:00 2 0 14 False \n",
"14 2024-12-08 14:00:00+00:00 1 1 15 False \n",
"\n",
" ... starts expected_goals expected_assists expected_goal_involvements \\\n",
"0 ... 1 0.00 0.04 0.04 \n",
"1 ... 0 0.00 0.00 0.00 \n",
"2 ... 0 0.00 0.00 0.00 \n",
"3 ... 0 0.00 0.00 0.00 \n",
"4 ... 0 0.00 0.00 0.00 \n",
"5 ... 0 0.00 0.00 0.00 \n",
"6 ... 0 0.00 0.00 0.00 \n",
"7 ... 0 0.00 0.00 0.00 \n",
"8 ... 0 0.00 0.00 0.00 \n",
"9 ... 0 0.00 0.01 0.01 \n",
"10 ... 0 0.00 0.00 0.00 \n",
"11 ... 0 0.00 0.00 0.00 \n",
"12 ... 0 0.00 0.02 0.02 \n",
"13 ... 1 0.06 0.01 0.07 \n",
"14 ... 0 0.00 0.00 0.00 \n",
"\n",
" expected_goals_conceded value transfers_balance selected transfers_in \\\n",
"0 0.32 5.0 0 230223 0 \n",
"1 0.00 5.0 23613 312806 46003 \n",
"2 0.28 5.0 -56048 264308 16584 \n",
"3 0.00 4.9 -45776 227563 9852 \n",
"4 0.00 4.9 -44677 184385 1173 \n",
"5 0.00 4.8 -40098 144882 164 \n",
"6 0.00 4.8 -23935 121540 84 \n",
"7 0.00 4.8 -9937 112095 103 \n",
"8 0.00 4.8 -1519 111488 1054 \n",
"9 0.08 4.8 -1515 110916 1859 \n",
"10 0.00 4.8 -1711 109869 1132 \n",
"11 0.17 4.8 -928 109888 1706 \n",
"12 0.74 4.8 -807 109626 1086 \n",
"13 0.14 4.8 -1118 108914 960 \n",
"14 0.00 4.8 2940 112774 4379 \n",
"\n",
" transfers_out \n",
"0 0 \n",
"1 22390 \n",
"2 72632 \n",
"3 55628 \n",
"4 45850 \n",
"5 40262 \n",
"6 24019 \n",
"7 10040 \n",
"8 2573 \n",
"9 3374 \n",
"10 2843 \n",
"11 2634 \n",
"12 1893 \n",
"13 2078 \n",
"14 1439 \n",
"\n",
"[15 rows x 37 columns]"
]
},
"execution_count": 8,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"history = pb.fpl.get_player_history(zincs_id)\n",
"history"
]
},
{
"cell_type": "markdown",
"id": "86fe2b45-9529-4a20-bbc4-1fb580afa1a1",
"metadata": {},
"source": [
"## Fetch the current top 50 ranked FPL teams"
]
},
{
"cell_type": "code",
"execution_count": 9,
"id": "39b1f868-79b9-4c56-8559-7be7e3b5c1e6",
"metadata": {
"tags": []
},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" id | \n",
" event_total | \n",
" player_name | \n",
" rank | \n",
" last_rank | \n",
" rank_sort | \n",
" total | \n",
" entry | \n",
" entry_name | \n",
" has_played | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" 56463977 | \n",
" 61 | \n",
" yassine hilmi | \n",
" 1 | \n",
" 1 | \n",
" 1 | \n",
" 1114 | \n",
" 6790112 | \n",
" 3ALLA ALLAH | \n",
" True | \n",
"
\n",
" \n",
" 1 | \n",
" 50941237 | \n",
" 69 | \n",
" Ayoub NACIR 🇲🇦 | \n",
" 2 | \n",
" 5 | \n",
" 2 | \n",
" 1101 | \n",
" 6251129 | \n",
" BB GW1 | \n",
" True | \n",
"
\n",
" \n",
" 2 | \n",
" 4069405 | \n",
" 73 | \n",
" Niels Pretorius | \n",
" 3 | \n",
" 13 | \n",
" 3 | \n",
" 1097 | \n",
" 649015 | \n",
" Holy Boehly | \n",
" True | \n",
"
\n",
" \n",
" 3 | \n",
" 20948541 | \n",
" 75 | \n",
" Dani Lio messi 🇪🇹 | \n",
" 3 | \n",
" 16 | \n",
" 4 | \n",
" 1097 | \n",
" 3094856 | \n",
" LIV | \n",
" True | \n",
"
\n",
" \n",
" 4 | \n",
" 63597878 | \n",
" 67 | \n",
" Ollie Stannard | \n",
" 5 | \n",
" 7 | \n",
" 5 | \n",
" 1095 | \n",
" 7550131 | \n",
" hazardous behaviour | \n",
" True | \n",
"
\n",
" \n",
" 5 | \n",
" 58297199 | \n",
" 79 | \n",
" abdallah ali ali | \n",
" 6 | \n",
" 35 | \n",
" 6 | \n",
" 1094 | \n",
" 6987961 | \n",
" abdo abdo | \n",
" True | \n",
"
\n",
" \n",
" 6 | \n",
" 15255905 | \n",
" 76 | \n",
" Johnny Rouge | \n",
" 7 | \n",
" 33 | \n",
" 7 | \n",
" 1091 | \n",
" 2315419 | \n",
" Obi Wan - Kenobi Nil | \n",
" True | \n",
"
\n",
" \n",
" 7 | \n",
" 33809310 | \n",
" 78 | \n",
" abdullah alanazi | \n",
" 8 | \n",
" 44 | \n",
" 8 | \n",
" 1089 | \n",
" 4684786 | \n",
" ugly squad | \n",
" True | \n",
"
\n",
" \n",
" 8 | \n",
" 33179096 | \n",
" 67 | \n",
" Doug Yellowley | \n",
" 9 | \n",
" 19 | \n",
" 9 | \n",
" 1088 | \n",
" 4605389 | \n",
" The Notorious D.U.G | \n",
" True | \n",
"
\n",
" \n",
" 9 | \n",
" 60289692 | \n",
" 66 | \n",
" Abdullah AlGhfeli | \n",
" 9 | \n",
" 17 | \n",
" 10 | \n",
" 1088 | \n",
" 7203284 | \n",
" Jürgen Klopp | \n",
" True | \n",
"
\n",
" \n",
" 10 | \n",
" 17356161 | \n",
" 66 | \n",
" Sion Nierada | \n",
" 9 | \n",
" 15 | \n",
" 11 | \n",
" 1088 | \n",
" 2607470 | \n",
" Snoop Udogie Dogg | \n",
" True | \n",
"
\n",
" \n",
" 11 | \n",
" 4227781 | \n",
" 54 | \n",
" Mustafa YNWA | \n",
" 12 | \n",
" 4 | \n",
" 12 | \n",
" 1087 | \n",
" 673745 | \n",
" مصطفى فؤاد | \n",
" True | \n",
"
\n",
" \n",
" 12 | \n",
" 13655665 | \n",
" 54 | \n",
" Pipat Boss | \n",
" 12 | \n",
" 3 | \n",
" 13 | \n",
" 1087 | \n",
" 2085641 | \n",
" Pipat FC | \n",
" True | \n",
"
\n",
" \n",
" 13 | \n",
" 40588476 | \n",
" 60 | \n",
" Dara Bbat | \n",
" 12 | \n",
" 8 | \n",
" 14 | \n",
" 1087 | \n",
" 5478789 | \n",
" BurnDemAll | \n",
" True | \n",
"
\n",
" \n",
" 14 | \n",
" 5472397 | \n",
" 58 | \n",
" abdul hendricks | \n",
" 15 | \n",
" 6 | \n",
" 15 | \n",
" 1086 | \n",
" 865299 | \n",
" Pep a pig | \n",
" True | \n",
"
\n",
" \n",
" 15 | \n",
" 1997903 | \n",
" 59 | \n",
" Auwal SG | \n",
" 16 | \n",
" 11 | \n",
" 16 | \n",
" 1086 | \n",
" 322707 | \n",
" ASG | \n",
" True | \n",
"
\n",
" \n",
" 16 | \n",
" 6385437 | \n",
" 50 | \n",
" Harry Jones | \n",
" 17 | \n",
" 2 | \n",
" 17 | \n",
" 1086 | \n",
" 1001923 | \n",
" Kobs on the Job | \n",
" True | \n",
"
\n",
" \n",
" 17 | \n",
" 10732157 | \n",
" 75 | \n",
" Kostadin Chinov | \n",
" 18 | \n",
" 50 | \n",
" 18 | \n",
" 1085 | \n",
" 1661563 | \n",
" Debel lebeD | \n",
" True | \n",
"
\n",
" \n",
" 18 | \n",
" 102501 | \n",
" 92 | \n",
" Erin Robinson | \n",
" 19 | \n",
" 264 | \n",
" 19 | \n",
" 1084 | \n",
" 18949 | \n",
" Erin’s XI | \n",
" True | \n",
"
\n",
" \n",
" 19 | \n",
" 33875587 | \n",
" 89 | \n",
" Elijah Lamb | \n",
" 20 | \n",
" 199 | \n",
" 20 | \n",
" 1084 | \n",
" 4693003 | \n",
" Neville Wears Prada | \n",
" True | \n",
"
\n",
" \n",
" 20 | \n",
" 5029234 | \n",
" 57 | \n",
" Brendan Sylvester | \n",
" 21 | \n",
" 9 | \n",
" 21 | \n",
" 1084 | \n",
" 797171 | \n",
" Bukayo's Sadza | \n",
" True | \n",
"
\n",
" \n",
" 21 | \n",
" 63480780 | \n",
" 82 | \n",
" Medo Styen | \n",
" 22 | \n",
" 105 | \n",
" 22 | \n",
" 1083 | \n",
" 7537842 | \n",
" الاسطي | \n",
" True | \n",
"
\n",
" \n",
" 22 | \n",
" 1049473 | \n",
" 58 | \n",
" Harrison Lenihan | \n",
" 23 | \n",
" 12 | \n",
" 23 | \n",
" 1083 | \n",
" 172621 | \n",
" Max O’Deary | \n",
" True | \n",
"
\n",
" \n",
" 23 | \n",
" 72432638 | \n",
" 60 | \n",
" Alex Hirkjolen | \n",
" 24 | \n",
" 9 | \n",
" 24 | \n",
" 1083 | \n",
" 8448461 | \n",
" Blueberries | \n",
" True | \n",
"
\n",
" \n",
" 24 | \n",
" 6949071 | \n",
" 61 | \n",
" vjeran horvat | \n",
" 25 | \n",
" 21 | \n",
" 25 | \n",
" 1081 | \n",
" 1091388 | \n",
" Studentgrađanin | \n",
" True | \n",
"
\n",
" \n",
" 25 | \n",
" 48990325 | \n",
" 67 | \n",
" Derek SHANKS | \n",
" 26 | \n",
" 39 | \n",
" 26 | \n",
" 1080 | \n",
" 6085606 | \n",
" Que Salah Salah | \n",
" True | \n",
"
\n",
" \n",
" 26 | \n",
" 22682175 | \n",
" 64 | \n",
" Thanan Nuannukun | \n",
" 27 | \n",
" 31 | \n",
" 27 | \n",
" 1079 | \n",
" 3328748 | \n",
" ยอดทีมUnited | \n",
" True | \n",
"
\n",
" \n",
" 27 | \n",
" 12385549 | \n",
" 76 | \n",
" JAMIE WALKER | \n",
" 28 | \n",
" 85 | \n",
" 28 | \n",
" 1079 | \n",
" 1901957 | \n",
" KobbieManU | \n",
" True | \n",
"
\n",
" \n",
" 28 | \n",
" 5079758 | \n",
" 77 | \n",
" Ignaz Vrobel | \n",
" 29 | \n",
" 104 | \n",
" 29 | \n",
" 1079 | \n",
" 805343 | \n",
" OlympiqueCliftonHill | \n",
" True | \n",
"
\n",
" \n",
" 29 | \n",
" 41548504 | \n",
" 76 | \n",
" Innocent Kalukuta | \n",
" 29 | \n",
" 89 | \n",
" 30 | \n",
" 1079 | \n",
" 5554108 | \n",
" Kaluno City | \n",
" True | \n",
"
\n",
" \n",
" 30 | \n",
" 12660145 | \n",
" 74 | \n",
" Radhi Alqaisi | \n",
" 31 | \n",
" 79 | \n",
" 31 | \n",
" 1078 | \n",
" 1941895 | \n",
" The Seniors | \n",
" True | \n",
"
\n",
" \n",
" 31 | \n",
" 5679387 | \n",
" 59 | \n",
" Kristijan Anicic | \n",
" 31 | \n",
" 22 | \n",
" 32 | \n",
" 1078 | \n",
" 897442 | \n",
" Stella Rosa | \n",
" True | \n",
"
\n",
" \n",
" 32 | \n",
" 6597581 | \n",
" 55 | \n",
" Adrian Wagstyl | \n",
" 33 | \n",
" 14 | \n",
" 33 | \n",
" 1078 | \n",
" 1035135 | \n",
" AW | \n",
" True | \n",
"
\n",
" \n",
" 33 | \n",
" 3940951 | \n",
" 67 | \n",
" Fahad Al kharafi🇰🇼🇰🇼🇰🇼🇰🇼🇰🇼 | \n",
" 34 | \n",
" 47 | \n",
" 34 | \n",
" 1078 | \n",
" 628608 | \n",
" I AM PANDA | \n",
" True | \n",
"
\n",
" \n",
" 34 | \n",
" 47259967 | \n",
" 69 | \n",
" Mahmoud Ibrahim | \n",
" 35 | \n",
" 63 | \n",
" 35 | \n",
" 1077 | \n",
" 5975003 | \n",
" 7OoOda | \n",
" True | \n",
"
\n",
" \n",
" 35 | \n",
" 1270775 | \n",
" 65 | \n",
" marwen fathallah | \n",
" 36 | \n",
" 42 | \n",
" 36 | \n",
" 1077 | \n",
" 206983 | \n",
" back of the Neto | \n",
" True | \n",
"
\n",
" \n",
" 36 | \n",
" 1316826 | \n",
" 93 | \n",
" You guy My guy. | \n",
" 37 | \n",
" 606 | \n",
" 37 | \n",
" 1076 | \n",
" 214203 | \n",
" Gus@lito. | \n",
" True | \n",
"
\n",
" \n",
" 37 | \n",
" 70637 | \n",
" 57 | \n",
" Charlie Shepherd | \n",
" 38 | \n",
" 24 | \n",
" 38 | \n",
" 1075 | \n",
" 13609 | \n",
" Charlie’s team | \n",
" True | \n",
"
\n",
" \n",
" 38 | \n",
" 67468283 | \n",
" 55 | \n",
" Andrew Warriner | \n",
" 38 | \n",
" 20 | \n",
" 39 | \n",
" 1075 | \n",
" 7948422 | \n",
" NYC Whites | \n",
" True | \n",
"
\n",
" \n",
" 39 | \n",
" 114933 | \n",
" 61 | \n",
" Mohamed elkabiri | \n",
" 38 | \n",
" 37 | \n",
" 40 | \n",
" 1075 | \n",
" 20899 | \n",
" Elkabiri mohamed | \n",
" True | \n",
"
\n",
" \n",
" 40 | \n",
" 15670809 | \n",
" 64 | \n",
" the Big studio Ug | \n",
" 41 | \n",
" 45 | \n",
" 41 | \n",
" 1075 | \n",
" 2370962 | \n",
" Big Football | \n",
" True | \n",
"
\n",
" \n",
" 41 | \n",
" 13400633 | \n",
" 69 | \n",
" hossam Mohamed | \n",
" 41 | \n",
" 74 | \n",
" 42 | \n",
" 1075 | \n",
" 2048395 | \n",
" H&M | \n",
" True | \n",
"
\n",
" \n",
" 42 | \n",
" 15704915 | \n",
" 74 | \n",
" Remon Radany | \n",
" 41 | \n",
" 109 | \n",
" 43 | \n",
" 1075 | \n",
" 2375847 | \n",
" Remon FC | \n",
" True | \n",
"
\n",
" \n",
" 43 | \n",
" 4564586 | \n",
" 88 | \n",
" Yaser Hameed | \n",
" 41 | \n",
" 440 | \n",
" 44 | \n",
" 1075 | \n",
" 726395 | \n",
" The Leader Yaser | \n",
" True | \n",
"
\n",
" \n",
" 44 | \n",
" 2363269 | \n",
" 53 | \n",
" Tom Warlow | \n",
" 45 | \n",
" 17 | \n",
" 45 | \n",
" 1075 | \n",
" 378441 | \n",
" TAAnnihilation | \n",
" True | \n",
"
\n",
" \n",
" 45 | \n",
" 73241993 | \n",
" 59 | \n",
" Agustio Faizy | \n",
" 46 | \n",
" 30 | \n",
" 46 | \n",
" 1075 | \n",
" 8531841 | \n",
" Muthe #1 SSK | \n",
" True | \n",
"
\n",
" \n",
" 46 | \n",
" 2926297 | \n",
" 65 | \n",
" James White | \n",
" 47 | \n",
" 53 | \n",
" 47 | \n",
" 1075 | \n",
" 468901 | \n",
" Joelinton Enjoyer | \n",
" True | \n",
"
\n",
" \n",
" 47 | \n",
" 39761288 | \n",
" 62 | \n",
" Andrew Monaghan | \n",
" 48 | \n",
" 40 | \n",
" 48 | \n",
" 1074 | \n",
" 5400771 | \n",
" The Vampires | \n",
" True | \n",
"
\n",
" \n",
" 48 | \n",
" 34694562 | \n",
" 85 | \n",
" Sarah Henshaw | \n",
" 49 | \n",
" 351 | \n",
" 49 | \n",
" 1074 | \n",
" 4793916 | \n",
" Fly me to the Muniz | \n",
" True | \n",
"
\n",
" \n",
" 49 | \n",
" 3983208 | \n",
" 59 | \n",
" Oluchukwu Obiyo | \n",
" 49 | \n",
" 31 | \n",
" 50 | \n",
" 1074 | \n",
" 634991 | \n",
" Vee Fc | \n",
" True | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" id event_total player_name rank last_rank \\\n",
"0 56463977 61 yassine hilmi 1 1 \n",
"1 50941237 69 Ayoub NACIR 🇲🇦 2 5 \n",
"2 4069405 73 Niels Pretorius 3 13 \n",
"3 20948541 75 Dani Lio messi 🇪🇹 3 16 \n",
"4 63597878 67 Ollie Stannard 5 7 \n",
"5 58297199 79 abdallah ali ali 6 35 \n",
"6 15255905 76 Johnny Rouge 7 33 \n",
"7 33809310 78 abdullah alanazi 8 44 \n",
"8 33179096 67 Doug Yellowley 9 19 \n",
"9 60289692 66 Abdullah AlGhfeli 9 17 \n",
"10 17356161 66 Sion Nierada 9 15 \n",
"11 4227781 54 Mustafa YNWA 12 4 \n",
"12 13655665 54 Pipat Boss 12 3 \n",
"13 40588476 60 Dara Bbat 12 8 \n",
"14 5472397 58 abdul hendricks 15 6 \n",
"15 1997903 59 Auwal SG 16 11 \n",
"16 6385437 50 Harry Jones 17 2 \n",
"17 10732157 75 Kostadin Chinov 18 50 \n",
"18 102501 92 Erin Robinson 19 264 \n",
"19 33875587 89 Elijah Lamb 20 199 \n",
"20 5029234 57 Brendan Sylvester 21 9 \n",
"21 63480780 82 Medo Styen 22 105 \n",
"22 1049473 58 Harrison Lenihan 23 12 \n",
"23 72432638 60 Alex Hirkjolen 24 9 \n",
"24 6949071 61 vjeran horvat 25 21 \n",
"25 48990325 67 Derek SHANKS 26 39 \n",
"26 22682175 64 Thanan Nuannukun 27 31 \n",
"27 12385549 76 JAMIE WALKER 28 85 \n",
"28 5079758 77 Ignaz Vrobel 29 104 \n",
"29 41548504 76 Innocent Kalukuta 29 89 \n",
"30 12660145 74 Radhi Alqaisi 31 79 \n",
"31 5679387 59 Kristijan Anicic 31 22 \n",
"32 6597581 55 Adrian Wagstyl 33 14 \n",
"33 3940951 67 Fahad Al kharafi🇰🇼🇰🇼🇰🇼🇰🇼🇰🇼 34 47 \n",
"34 47259967 69 Mahmoud Ibrahim 35 63 \n",
"35 1270775 65 marwen fathallah 36 42 \n",
"36 1316826 93 You guy My guy. 37 606 \n",
"37 70637 57 Charlie Shepherd 38 24 \n",
"38 67468283 55 Andrew Warriner 38 20 \n",
"39 114933 61 Mohamed elkabiri 38 37 \n",
"40 15670809 64 the Big studio Ug 41 45 \n",
"41 13400633 69 hossam Mohamed 41 74 \n",
"42 15704915 74 Remon Radany 41 109 \n",
"43 4564586 88 Yaser Hameed 41 440 \n",
"44 2363269 53 Tom Warlow 45 17 \n",
"45 73241993 59 Agustio Faizy 46 30 \n",
"46 2926297 65 James White 47 53 \n",
"47 39761288 62 Andrew Monaghan 48 40 \n",
"48 34694562 85 Sarah Henshaw 49 351 \n",
"49 3983208 59 Oluchukwu Obiyo 49 31 \n",
"\n",
" rank_sort total entry entry_name has_played \n",
"0 1 1114 6790112 3ALLA ALLAH True \n",
"1 2 1101 6251129 BB GW1 True \n",
"2 3 1097 649015 Holy Boehly True \n",
"3 4 1097 3094856 LIV True \n",
"4 5 1095 7550131 hazardous behaviour True \n",
"5 6 1094 6987961 abdo abdo True \n",
"6 7 1091 2315419 Obi Wan - Kenobi Nil True \n",
"7 8 1089 4684786 ugly squad True \n",
"8 9 1088 4605389 The Notorious D.U.G True \n",
"9 10 1088 7203284 Jürgen Klopp True \n",
"10 11 1088 2607470 Snoop Udogie Dogg True \n",
"11 12 1087 673745 مصطفى فؤاد True \n",
"12 13 1087 2085641 Pipat FC True \n",
"13 14 1087 5478789 BurnDemAll True \n",
"14 15 1086 865299 Pep a pig True \n",
"15 16 1086 322707 ASG True \n",
"16 17 1086 1001923 Kobs on the Job True \n",
"17 18 1085 1661563 Debel lebeD True \n",
"18 19 1084 18949 Erin’s XI True \n",
"19 20 1084 4693003 Neville Wears Prada True \n",
"20 21 1084 797171 Bukayo's Sadza True \n",
"21 22 1083 7537842 الاسطي True \n",
"22 23 1083 172621 Max O’Deary True \n",
"23 24 1083 8448461 Blueberries True \n",
"24 25 1081 1091388 Studentgrađanin True \n",
"25 26 1080 6085606 Que Salah Salah True \n",
"26 27 1079 3328748 ยอดทีมUnited True \n",
"27 28 1079 1901957 KobbieManU True \n",
"28 29 1079 805343 OlympiqueCliftonHill True \n",
"29 30 1079 5554108 Kaluno City True \n",
"30 31 1078 1941895 The Seniors True \n",
"31 32 1078 897442 Stella Rosa True \n",
"32 33 1078 1035135 AW True \n",
"33 34 1078 628608 I AM PANDA True \n",
"34 35 1077 5975003 7OoOda True \n",
"35 36 1077 206983 back of the Neto True \n",
"36 37 1076 214203 Gus@lito. True \n",
"37 38 1075 13609 Charlie’s team True \n",
"38 39 1075 7948422 NYC Whites True \n",
"39 40 1075 20899 Elkabiri mohamed True \n",
"40 41 1075 2370962 Big Football True \n",
"41 42 1075 2048395 H&M True \n",
"42 43 1075 2375847 Remon FC True \n",
"43 44 1075 726395 The Leader Yaser True \n",
"44 45 1075 378441 TAAnnihilation True \n",
"45 46 1075 8531841 Muthe #1 SSK True \n",
"46 47 1075 468901 Joelinton Enjoyer True \n",
"47 48 1074 5400771 The Vampires True \n",
"48 49 1074 4793916 Fly me to the Muniz True \n",
"49 50 1074 634991 Vee Fc True "
]
},
"execution_count": 9,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"pb.fpl.get_rankings(1)"
]
},
{
"cell_type": "markdown",
"id": "973f539c-d91b-4782-9f0d-954649358344",
"metadata": {},
"source": [
"## Fetch the FPL teams ranked 51-100"
]
},
{
"cell_type": "code",
"execution_count": 10,
"id": "89b650c0-e122-46dc-9602-d6a0e344be1f",
"metadata": {
"tags": []
},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" id | \n",
" event_total | \n",
" player_name | \n",
" rank | \n",
" last_rank | \n",
" rank_sort | \n",
" total | \n",
" entry | \n",
" entry_name | \n",
" has_played | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" 32633580 | \n",
" 55 | \n",
" Max Littleproud | \n",
" 51 | \n",
" 23 | \n",
" 51 | \n",
" 1074 | \n",
" 4538028 | \n",
" Levenshulme Utd | \n",
" True | \n",
"
\n",
" \n",
" 1 | \n",
" 20253729 | \n",
" 83 | \n",
" Harrison Smith | \n",
" 52 | \n",
" 314 | \n",
" 52 | \n",
" 1073 | \n",
" 3002723 | \n",
" chicken tika masala | \n",
" True | \n",
"
\n",
" \n",
" 2 | \n",
" 8565725 | \n",
" 66 | \n",
" Bu Hussain | \n",
" 53 | \n",
" 68 | \n",
" 53 | \n",
" 1073 | \n",
" 1338837 | \n",
" Bu Hussain (BH) | \n",
" True | \n",
"
\n",
" \n",
" 3 | \n",
" 20749224 | \n",
" 64 | \n",
" Abd Alwahhab Mohammad | \n",
" 54 | \n",
" 60 | \n",
" 54 | \n",
" 1072 | \n",
" 3068916 | \n",
" ربك كريم | \n",
" True | \n",
"
\n",
" \n",
" 4 | \n",
" 35683261 | \n",
" 71 | \n",
" Come On You Surds | \n",
" 55 | \n",
" 113 | \n",
" 55 | \n",
" 1072 | \n",
" 4906982 | \n",
" Van de Ven Diagrams | \n",
" True | \n",
"
\n",
" \n",
" 5 | \n",
" 24058206 | \n",
" 71 | \n",
" Chris Tabor | \n",
" 55 | \n",
" 113 | \n",
" 56 | \n",
" 1072 | \n",
" 3506521 | \n",
" Marginal Baines | \n",
" True | \n",
"
\n",
" \n",
" 6 | \n",
" 48394075 | \n",
" 69 | \n",
" Einar Birkir Einarsson | \n",
" 55 | \n",
" 83 | \n",
" 57 | \n",
" 1072 | \n",
" 6045876 | \n",
" Saga Club | \n",
" True | \n",
"
\n",
" \n",
" 7 | \n",
" 6193323 | \n",
" 70 | \n",
" bakri ahmed | \n",
" 58 | \n",
" 99 | \n",
" 58 | \n",
" 1072 | \n",
" 972797 | \n",
" najm | \n",
" True | \n",
"
\n",
" \n",
" 8 | \n",
" 6825449 | \n",
" 61 | \n",
" Peter Amante-Roberts | \n",
" 59 | \n",
" 48 | \n",
" 59 | \n",
" 1071 | \n",
" 1071595 | \n",
" ZlatansZanyZerglings | \n",
" True | \n",
"
\n",
" \n",
" 9 | \n",
" 2830836 | \n",
" 82 | \n",
" Reidar Buskenes | \n",
" 60 | \n",
" 359 | \n",
" 60 | \n",
" 1071 | \n",
" 453429 | \n",
" Veiholmen | \n",
" True | \n",
"
\n",
" \n",
" 10 | \n",
" 34212118 | \n",
" 55 | \n",
" Ray Andre | \n",
" 61 | \n",
" 28 | \n",
" 61 | \n",
" 1071 | \n",
" 4735236 | \n",
" Turkish De Ligt | \n",
" True | \n",
"
\n",
" \n",
" 11 | \n",
" 1453653 | \n",
" 74 | \n",
" Mohamed Hosny | \n",
" 61 | \n",
" 163 | \n",
" 62 | \n",
" 1071 | \n",
" 235899 | \n",
" الكابتن مدحت فقوسة | \n",
" True | \n",
"
\n",
" \n",
" 12 | \n",
" 4954088 | \n",
" 69 | \n",
" Patrick O'Loghlen | \n",
" 63 | \n",
" 106 | \n",
" 63 | \n",
" 1070 | \n",
" 785876 | \n",
" Xhakaboom | \n",
" True | \n",
"
\n",
" \n",
" 13 | \n",
" 3995317 | \n",
" 61 | \n",
" Simon Baker | \n",
" 64 | \n",
" 57 | \n",
" 64 | \n",
" 1070 | \n",
" 636988 | \n",
" Marescapetovictory | \n",
" True | \n",
"
\n",
" \n",
" 14 | \n",
" 29477281 | \n",
" 73 | \n",
" james delaney | \n",
" 64 | \n",
" 163 | \n",
" 65 | \n",
" 1070 | \n",
" 4134522 | \n",
" Holy Boehly | \n",
" True | \n",
"
\n",
" \n",
" 15 | \n",
" 34073001 | \n",
" 90 | \n",
" Edward Campbell | \n",
" 66 | \n",
" 801 | \n",
" 66 | \n",
" 1070 | \n",
" 4717706 | \n",
" Saka Potatoes | \n",
" True | \n",
"
\n",
" \n",
" 16 | \n",
" 10448238 | \n",
" 52 | \n",
" Jack Brennan | \n",
" 67 | \n",
" 27 | \n",
" 67 | \n",
" 1070 | \n",
" 1620838 | \n",
" Hakuna Mateta | \n",
" True | \n",
"
\n",
" \n",
" 17 | \n",
" 913873 | \n",
" 61 | \n",
" Stephen Blakemore | \n",
" 67 | \n",
" 58 | \n",
" 68 | \n",
" 1070 | \n",
" 150191 | \n",
" Womp, womp. | \n",
" True | \n",
"
\n",
" \n",
" 18 | \n",
" 7427609 | \n",
" 55 | \n",
" Karim Radi | \n",
" 69 | \n",
" 36 | \n",
" 69 | \n",
" 1070 | \n",
" 1166488 | \n",
" Flying Dutchman ��☠ | \n",
" True | \n",
"
\n",
" \n",
" 19 | \n",
" 8893532 | \n",
" 73 | \n",
" Joe O’Callaghan | \n",
" 70 | \n",
" 176 | \n",
" 70 | \n",
" 1069 | \n",
" 1389327 | \n",
" Mo Problem | \n",
" True | \n",
"
\n",
" \n",
" 20 | \n",
" 31821094 | \n",
" 66 | \n",
" Matt Stephenson | \n",
" 71 | \n",
" 85 | \n",
" 71 | \n",
" 1069 | \n",
" 4435464 | \n",
" B’croft Big Bears FC | \n",
" True | \n",
"
\n",
" \n",
" 21 | \n",
" 7163746 | \n",
" 57 | \n",
" Eric Scott | \n",
" 72 | \n",
" 40 | \n",
" 72 | \n",
" 1069 | \n",
" 1125100 | \n",
" The Difference | \n",
" True | \n",
"
\n",
" \n",
" 22 | \n",
" 1614372 | \n",
" 53 | \n",
" youssif mohamed | \n",
" 73 | \n",
" 29 | \n",
" 73 | \n",
" 1069 | \n",
" 261538 | \n",
" VENOOM | \n",
" True | \n",
"
\n",
" \n",
" 23 | \n",
" 1184864 | \n",
" 74 | \n",
" Matt Biemans | \n",
" 73 | \n",
" 211 | \n",
" 74 | \n",
" 1069 | \n",
" 194081 | \n",
" Team Biemans | \n",
" True | \n",
"
\n",
" \n",
" 24 | \n",
" 726502 | \n",
" 84 | \n",
" Allan Omanovic | \n",
" 73 | \n",
" 507 | \n",
" 75 | \n",
" 1069 | \n",
" 120291 | \n",
" Bullyboy | \n",
" True | \n",
"
\n",
" \n",
" 25 | \n",
" 10489134 | \n",
" 61 | \n",
" Harry Nielsen | \n",
" 76 | \n",
" 65 | \n",
" 76 | \n",
" 1068 | \n",
" 1627092 | \n",
" Harryberry | \n",
" True | \n",
"
\n",
" \n",
" 26 | \n",
" 2486451 | \n",
" 66 | \n",
" Jake Poplawski | \n",
" 77 | \n",
" 94 | \n",
" 77 | \n",
" 1068 | \n",
" 398230 | \n",
" Feel Wood Inc | \n",
" True | \n",
"
\n",
" \n",
" 27 | \n",
" 6219817 | \n",
" 67 | \n",
" Chris Moss | \n",
" 77 | \n",
" 113 | \n",
" 78 | \n",
" 1068 | \n",
" 976142 | \n",
" Eze Does It | \n",
" True | \n",
"
\n",
" \n",
" 28 | \n",
" 6682894 | \n",
" 64 | \n",
" David Marco | \n",
" 77 | \n",
" 79 | \n",
" 79 | \n",
" 1068 | \n",
" 1048988 | \n",
" freepogba | \n",
" True | \n",
"
\n",
" \n",
" 29 | \n",
" 24324008 | \n",
" 50 | \n",
" Paras Poudel | \n",
" 80 | \n",
" 26 | \n",
" 80 | \n",
" 1068 | \n",
" 3541677 | \n",
" Ne Funk | \n",
" True | \n",
"
\n",
" \n",
" 30 | \n",
" 34270552 | \n",
" 70 | \n",
" Anna Bowman | \n",
" 80 | \n",
" 151 | \n",
" 81 | \n",
" 1068 | \n",
" 4742695 | \n",
" Yoro wizard Harry | \n",
" True | \n",
"
\n",
" \n",
" 31 | \n",
" 3633448 | \n",
" 91 | \n",
" David Cooney | \n",
" 82 | \n",
" 988 | \n",
" 82 | \n",
" 1068 | \n",
" 580349 | \n",
" The40YearOldVirgil | \n",
" True | \n",
"
\n",
" \n",
" 32 | \n",
" 1794467 | \n",
" 107 | \n",
" Dale Williams | \n",
" 82 | \n",
" 3213 | \n",
" 83 | \n",
" 1068 | \n",
" 290231 | \n",
" Harlows Dreamers | \n",
" True | \n",
"
\n",
" \n",
" 33 | \n",
" 36011005 | \n",
" 85 | \n",
" Haksbk 3lafekra | \n",
" 84 | \n",
" 643 | \n",
" 84 | \n",
" 1067 | \n",
" 4946679 | \n",
" � | \n",
" True | \n",
"
\n",
" \n",
" 34 | \n",
" 9120547 | \n",
" 72 | \n",
" Alex Lindholm | \n",
" 85 | \n",
" 196 | \n",
" 85 | \n",
" 1067 | \n",
" 1424600 | \n",
" Alex | \n",
" True | \n",
"
\n",
" \n",
" 35 | \n",
" 5717441 | \n",
" 75 | \n",
" المهلهل …. | \n",
" 86 | \n",
" 266 | \n",
" 86 | \n",
" 1067 | \n",
" 903279 | \n",
" الكشاف | \n",
" True | \n",
"
\n",
" \n",
" 36 | \n",
" 1886999 | \n",
" 71 | \n",
" Ciarán Rowland | \n",
" 86 | \n",
" 180 | \n",
" 87 | \n",
" 1067 | \n",
" 305054 | \n",
" Rainy Night in Szobo | \n",
" True | \n",
"
\n",
" \n",
" 37 | \n",
" 3728651 | \n",
" 58 | \n",
" Robb Lacey | \n",
" 86 | \n",
" 55 | \n",
" 88 | \n",
" 1067 | \n",
" 595633 | \n",
" Trust the Process ;) | \n",
" True | \n",
"
\n",
" \n",
" 38 | \n",
" 29920 | \n",
" 84 | \n",
" Mikołaj Ćwirko | \n",
" 89 | \n",
" 618 | \n",
" 89 | \n",
" 1067 | \n",
" 5924 | \n",
" Świry | \n",
" True | \n",
"
\n",
" \n",
" 39 | \n",
" 5242282 | \n",
" 74 | \n",
" salim Arbi | \n",
" 90 | \n",
" 260 | \n",
" 90 | \n",
" 1067 | \n",
" 830613 | \n",
" Salim Madrid | \n",
" True | \n",
"
\n",
" \n",
" 40 | \n",
" 4603571 | \n",
" 60 | \n",
" Max Matthews | \n",
" 91 | \n",
" 73 | \n",
" 91 | \n",
" 1066 | \n",
" 732660 | \n",
" Mount Kilman-jaro | \n",
" True | \n",
"
\n",
" \n",
" 41 | \n",
" 60650153 | \n",
" 65 | \n",
" Mohammed Hassan | \n",
" 92 | \n",
" 107 | \n",
" 92 | \n",
" 1066 | \n",
" 7241449 | \n",
" محمد حسن | \n",
" True | \n",
"
\n",
" \n",
" 42 | \n",
" 61131071 | \n",
" 64 | \n",
" souhaib Algérie | \n",
" 93 | \n",
" 90 | \n",
" 93 | \n",
" 1066 | \n",
" 7291676 | \n",
" Khenchela team � | \n",
" True | \n",
"
\n",
" \n",
" 43 | \n",
" 2545591 | \n",
" 71 | \n",
" Emil Appleson | \n",
" 93 | \n",
" 199 | \n",
" 94 | \n",
" 1066 | \n",
" 407494 | \n",
" Endo’s Men | \n",
" True | \n",
"
\n",
" \n",
" 44 | \n",
" 5023130 | \n",
" 75 | \n",
" klimis xanthopoulos | \n",
" 95 | \n",
" 286 | \n",
" 95 | \n",
" 1066 | \n",
" 796202 | \n",
" Makis | \n",
" True | \n",
"
\n",
" \n",
" 45 | \n",
" 213151 | \n",
" 74 | \n",
" Mohammed Haji | \n",
" 95 | \n",
" 264 | \n",
" 96 | \n",
" 1066 | \n",
" 36655 | \n",
" ســـرێـــشــمــەیــی | \n",
" True | \n",
"
\n",
" \n",
" 46 | \n",
" 62302397 | \n",
" 73 | \n",
" David Ionescu | \n",
" 97 | \n",
" 247 | \n",
" 97 | \n",
" 1066 | \n",
" 7415805 | \n",
" SlotMeOut | \n",
" True | \n",
"
\n",
" \n",
" 47 | \n",
" 5086911 | \n",
" 81 | \n",
" Rafael Mathisen | \n",
" 97 | \n",
" 494 | \n",
" 98 | \n",
" 1066 | \n",
" 806467 | \n",
" FK Matfisen | \n",
" True | \n",
"
\n",
" \n",
" 48 | \n",
" 7864092 | \n",
" 68 | \n",
" Craig Davis | \n",
" 97 | \n",
" 151 | \n",
" 99 | \n",
" 1066 | \n",
" 1233020 | \n",
" Memyselfandi | \n",
" True | \n",
"
\n",
" \n",
" 49 | \n",
" 2472461 | \n",
" 55 | \n",
" Thomas Lawlor | \n",
" 100 | \n",
" 46 | \n",
" 100 | \n",
" 1066 | \n",
" 395942 | \n",
" T90 LWR | \n",
" True | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" id event_total player_name rank last_rank rank_sort \\\n",
"0 32633580 55 Max Littleproud 51 23 51 \n",
"1 20253729 83 Harrison Smith 52 314 52 \n",
"2 8565725 66 Bu Hussain 53 68 53 \n",
"3 20749224 64 Abd Alwahhab Mohammad 54 60 54 \n",
"4 35683261 71 Come On You Surds 55 113 55 \n",
"5 24058206 71 Chris Tabor 55 113 56 \n",
"6 48394075 69 Einar Birkir Einarsson 55 83 57 \n",
"7 6193323 70 bakri ahmed 58 99 58 \n",
"8 6825449 61 Peter Amante-Roberts 59 48 59 \n",
"9 2830836 82 Reidar Buskenes 60 359 60 \n",
"10 34212118 55 Ray Andre 61 28 61 \n",
"11 1453653 74 Mohamed Hosny 61 163 62 \n",
"12 4954088 69 Patrick O'Loghlen 63 106 63 \n",
"13 3995317 61 Simon Baker 64 57 64 \n",
"14 29477281 73 james delaney 64 163 65 \n",
"15 34073001 90 Edward Campbell 66 801 66 \n",
"16 10448238 52 Jack Brennan 67 27 67 \n",
"17 913873 61 Stephen Blakemore 67 58 68 \n",
"18 7427609 55 Karim Radi 69 36 69 \n",
"19 8893532 73 Joe O’Callaghan 70 176 70 \n",
"20 31821094 66 Matt Stephenson 71 85 71 \n",
"21 7163746 57 Eric Scott 72 40 72 \n",
"22 1614372 53 youssif mohamed 73 29 73 \n",
"23 1184864 74 Matt Biemans 73 211 74 \n",
"24 726502 84 Allan Omanovic 73 507 75 \n",
"25 10489134 61 Harry Nielsen 76 65 76 \n",
"26 2486451 66 Jake Poplawski 77 94 77 \n",
"27 6219817 67 Chris Moss 77 113 78 \n",
"28 6682894 64 David Marco 77 79 79 \n",
"29 24324008 50 Paras Poudel 80 26 80 \n",
"30 34270552 70 Anna Bowman 80 151 81 \n",
"31 3633448 91 David Cooney 82 988 82 \n",
"32 1794467 107 Dale Williams 82 3213 83 \n",
"33 36011005 85 Haksbk 3lafekra 84 643 84 \n",
"34 9120547 72 Alex Lindholm 85 196 85 \n",
"35 5717441 75 المهلهل …. 86 266 86 \n",
"36 1886999 71 Ciarán Rowland 86 180 87 \n",
"37 3728651 58 Robb Lacey 86 55 88 \n",
"38 29920 84 Mikołaj Ćwirko 89 618 89 \n",
"39 5242282 74 salim Arbi 90 260 90 \n",
"40 4603571 60 Max Matthews 91 73 91 \n",
"41 60650153 65 Mohammed Hassan 92 107 92 \n",
"42 61131071 64 souhaib Algérie 93 90 93 \n",
"43 2545591 71 Emil Appleson 93 199 94 \n",
"44 5023130 75 klimis xanthopoulos 95 286 95 \n",
"45 213151 74 Mohammed Haji 95 264 96 \n",
"46 62302397 73 David Ionescu 97 247 97 \n",
"47 5086911 81 Rafael Mathisen 97 494 98 \n",
"48 7864092 68 Craig Davis 97 151 99 \n",
"49 2472461 55 Thomas Lawlor 100 46 100 \n",
"\n",
" total entry entry_name has_played \n",
"0 1074 4538028 Levenshulme Utd True \n",
"1 1073 3002723 chicken tika masala True \n",
"2 1073 1338837 Bu Hussain (BH) True \n",
"3 1072 3068916 ربك كريم True \n",
"4 1072 4906982 Van de Ven Diagrams True \n",
"5 1072 3506521 Marginal Baines True \n",
"6 1072 6045876 Saga Club True \n",
"7 1072 972797 najm True \n",
"8 1071 1071595 ZlatansZanyZerglings True \n",
"9 1071 453429 Veiholmen True \n",
"10 1071 4735236 Turkish De Ligt True \n",
"11 1071 235899 الكابتن مدحت فقوسة True \n",
"12 1070 785876 Xhakaboom True \n",
"13 1070 636988 Marescapetovictory True \n",
"14 1070 4134522 Holy Boehly True \n",
"15 1070 4717706 Saka Potatoes True \n",
"16 1070 1620838 Hakuna Mateta True \n",
"17 1070 150191 Womp, womp. True \n",
"18 1070 1166488 Flying Dutchman ��☠ True \n",
"19 1069 1389327 Mo Problem True \n",
"20 1069 4435464 B’croft Big Bears FC True \n",
"21 1069 1125100 The Difference True \n",
"22 1069 261538 VENOOM True \n",
"23 1069 194081 Team Biemans True \n",
"24 1069 120291 Bullyboy True \n",
"25 1068 1627092 Harryberry True \n",
"26 1068 398230 Feel Wood Inc True \n",
"27 1068 976142 Eze Does It True \n",
"28 1068 1048988 freepogba True \n",
"29 1068 3541677 Ne Funk True \n",
"30 1068 4742695 Yoro wizard Harry True \n",
"31 1068 580349 The40YearOldVirgil True \n",
"32 1068 290231 Harlows Dreamers True \n",
"33 1067 4946679 � True \n",
"34 1067 1424600 Alex True \n",
"35 1067 903279 الكشاف True \n",
"36 1067 305054 Rainy Night in Szobo True \n",
"37 1067 595633 Trust the Process ;) True \n",
"38 1067 5924 Świry True \n",
"39 1067 830613 Salim Madrid True \n",
"40 1066 732660 Mount Kilman-jaro True \n",
"41 1066 7241449 محمد حسن True \n",
"42 1066 7291676 Khenchela team � True \n",
"43 1066 407494 Endo’s Men True \n",
"44 1066 796202 Makis True \n",
"45 1066 36655 ســـرێـــشــمــەیــی True \n",
"46 1066 7415805 SlotMeOut True \n",
"47 1066 806467 FK Matfisen True \n",
"48 1066 1233020 Memyselfandi True \n",
"49 1066 395942 T90 LWR True "
]
},
"execution_count": 10,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"pb.fpl.get_rankings(2)"
]
},
{
"cell_type": "markdown",
"id": "9b423bbf-48ef-4278-8dbc-af0d89f51dc2",
"metadata": {
"tags": []
},
"source": [
"## Fetch a team's player picks by gameweek"
]
},
{
"cell_type": "code",
"execution_count": 11,
"id": "55a4bdf3-48eb-4cd9-a267-3cf3701d5c94",
"metadata": {
"tags": []
},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" team_id | \n",
" active_chip | \n",
" event | \n",
" points | \n",
" total_points | \n",
" rank | \n",
" rank_sort | \n",
" overall_rank | \n",
" value | \n",
" bank | \n",
" ... | \n",
" player_pick_7 | \n",
" player_pick_8 | \n",
" player_pick_9 | \n",
" player_pick_10 | \n",
" player_pick_11 | \n",
" player_pick_12 | \n",
" player_pick_13 | \n",
" player_pick_14 | \n",
" captain_id | \n",
" is_vice_captain | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" 4975559 | \n",
" None | \n",
" 1 | \n",
" 55 | \n",
" 55 | \n",
" 4895408 | \n",
" 5033649 | \n",
" 4895408 | \n",
" 100.0 | \n",
" 7.5 | \n",
" ... | \n",
" 16 | \n",
" 401 | \n",
" 58 | \n",
" 82 | \n",
" 47 | \n",
" 520 | \n",
" 44 | \n",
" 216 | \n",
" 401 | \n",
" 372 | \n",
"
\n",
" \n",
"
\n",
"
1 rows × 34 columns
\n",
"
"
],
"text/plain": [
" team_id active_chip event points total_points rank rank_sort \\\n",
"0 4975559 None 1 55 55 4895408 5033649 \n",
"\n",
" overall_rank value bank ... player_pick_7 player_pick_8 \\\n",
"0 4895408 100.0 7.5 ... 16 401 \n",
"\n",
" player_pick_9 player_pick_10 player_pick_11 player_pick_12 player_pick_13 \\\n",
"0 58 82 47 520 44 \n",
"\n",
" player_pick_14 captain_id is_vice_captain \n",
"0 216 401 372 \n",
"\n",
"[1 rows x 34 columns]"
]
},
"execution_count": 11,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"team_id = 4975559\n",
"pb.fpl.get_entry_picks_by_gameweek(team_id, 1)"
]
},
{
"cell_type": "markdown",
"id": "1517513d-f430-4dd5-bb31-f6b589f559d5",
"metadata": {},
"source": [
"### Get entry's transfer history for this season"
]
},
{
"cell_type": "code",
"execution_count": 12,
"id": "52a75a61-5af4-43ef-a316-2e322515d3cf",
"metadata": {
"tags": []
},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" player_id_in | \n",
" player_in_cost | \n",
" player_id_out | \n",
" player_out_cost | \n",
" entry | \n",
" event | \n",
" time | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" 82 | \n",
" 7.7 | \n",
" 180 | \n",
" 7.9 | \n",
" 4975559 | \n",
" 11 | \n",
" 2024-11-08 21:58:38.532929+00:00 | \n",
"
\n",
" \n",
" 1 | \n",
" 252 | \n",
" 5.7 | \n",
" 220 | \n",
" 6.0 | \n",
" 4975559 | \n",
" 9 | \n",
" 2024-10-24 19:07:47.537012+00:00 | \n",
"
\n",
" \n",
" 2 | \n",
" 180 | \n",
" 7.9 | \n",
" 4 | \n",
" 8.2 | \n",
" 4975559 | \n",
" 9 | \n",
" 2024-10-24 19:07:47.536831+00:00 | \n",
"
\n",
" \n",
" 3 | \n",
" 78 | \n",
" 5.6 | \n",
" 514 | \n",
" 7.4 | \n",
" 4975559 | \n",
" 9 | \n",
" 2024-10-24 19:07:47.536620+00:00 | \n",
"
\n",
" \n",
" 4 | \n",
" 491 | \n",
" 6.7 | \n",
" 398 | \n",
" 7.3 | \n",
" 4975559 | \n",
" 9 | \n",
" 2024-10-24 19:07:47.536384+00:00 | \n",
"
\n",
" \n",
" 5 | \n",
" 99 | \n",
" 7.6 | \n",
" 317 | \n",
" 7.4 | \n",
" 4975559 | \n",
" 9 | \n",
" 2024-10-24 19:07:47.536209+00:00 | \n",
"
\n",
" \n",
" 6 | \n",
" 182 | \n",
" 10.9 | \n",
" 19 | \n",
" 5.6 | \n",
" 4975559 | \n",
" 9 | \n",
" 2024-10-24 19:07:47.536018+00:00 | \n",
"
\n",
" \n",
" 7 | \n",
" 88 | \n",
" 4.5 | \n",
" 422 | \n",
" 4.5 | \n",
" 4975559 | \n",
" 9 | \n",
" 2024-10-24 19:07:47.535831+00:00 | \n",
"
\n",
" \n",
" 8 | \n",
" 162 | \n",
" 4.6 | \n",
" 369 | \n",
" 5.0 | \n",
" 4975559 | \n",
" 9 | \n",
" 2024-10-24 19:07:47.535638+00:00 | \n",
"
\n",
" \n",
" 9 | \n",
" 573 | \n",
" 4.5 | \n",
" 44 | \n",
" 4.5 | \n",
" 4975559 | \n",
" 9 | \n",
" 2024-10-24 19:07:47.535371+00:00 | \n",
"
\n",
" \n",
" 10 | \n",
" 145 | \n",
" 4.5 | \n",
" 18 | \n",
" 6.0 | \n",
" 4975559 | \n",
" 9 | \n",
" 2024-10-24 19:07:47.535179+00:00 | \n",
"
\n",
" \n",
" 11 | \n",
" 152 | \n",
" 4.5 | \n",
" 413 | \n",
" 5.0 | \n",
" 4975559 | \n",
" 9 | \n",
" 2024-10-24 19:07:47.534961+00:00 | \n",
"
\n",
" \n",
" 12 | \n",
" 235 | \n",
" 4.8 | \n",
" 47 | \n",
" 5.0 | \n",
" 4975559 | \n",
" 9 | \n",
" 2024-10-24 19:07:47.534506+00:00 | \n",
"
\n",
" \n",
" 13 | \n",
" 422 | \n",
" 4.5 | \n",
" 520 | \n",
" 4.4 | \n",
" 4975559 | \n",
" 8 | \n",
" 2024-10-18 07:13:38.487428+00:00 | \n",
"
\n",
" \n",
" 14 | \n",
" 4 | \n",
" 8.2 | \n",
" 82 | \n",
" 7.5 | \n",
" 4975559 | \n",
" 7 | \n",
" 2024-10-04 18:12:04.665563+00:00 | \n",
"
\n",
" \n",
" 15 | \n",
" 82 | \n",
" 7.5 | \n",
" 401 | \n",
" 8.3 | \n",
" 4975559 | \n",
" 6 | \n",
" 2024-09-28 06:41:03.727840+00:00 | \n",
"
\n",
" \n",
" 16 | \n",
" 220 | \n",
" 6.0 | \n",
" 129 | \n",
" 5.6 | \n",
" 4975559 | \n",
" 6 | \n",
" 2024-09-28 06:41:03.721162+00:00 | \n",
"
\n",
" \n",
" 17 | \n",
" 514 | \n",
" 7.5 | \n",
" 342 | \n",
" 6.6 | \n",
" 4975559 | \n",
" 5 | \n",
" 2024-09-20 17:50:08.943188+00:00 | \n",
"
\n",
" \n",
" 18 | \n",
" 327 | \n",
" 7.7 | \n",
" 136 | \n",
" 6.6 | \n",
" 4975559 | \n",
" 4 | \n",
" 2024-09-14 09:54:52.300593+00:00 | \n",
"
\n",
" \n",
" 19 | \n",
" 129 | \n",
" 5.7 | \n",
" 82 | \n",
" 7.5 | \n",
" 4975559 | \n",
" 4 | \n",
" 2024-09-13 16:21:03.307871+00:00 | \n",
"
\n",
" \n",
" 20 | \n",
" 136 | \n",
" 6.6 | \n",
" 16 | \n",
" 6.4 | \n",
" 4975559 | \n",
" 4 | \n",
" 2024-09-13 16:21:03.299689+00:00 | \n",
"
\n",
" \n",
" 21 | \n",
" 19 | \n",
" 5.6 | \n",
" 216 | \n",
" 5.0 | \n",
" 4975559 | \n",
" 3 | \n",
" 2024-08-31 08:32:51.029245+00:00 | \n",
"
\n",
" \n",
" 22 | \n",
" 351 | \n",
" 15.0 | \n",
" 58 | \n",
" 9.0 | \n",
" 4975559 | \n",
" 2 | \n",
" 2024-08-24 08:46:07.977426+00:00 | \n",
"
\n",
" \n",
" 23 | \n",
" 342 | \n",
" 6.6 | \n",
" 372 | \n",
" 6.5 | \n",
" 4975559 | \n",
" 2 | \n",
" 2024-08-24 08:46:07.973476+00:00 | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" player_id_in player_in_cost player_id_out player_out_cost entry \\\n",
"0 82 7.7 180 7.9 4975559 \n",
"1 252 5.7 220 6.0 4975559 \n",
"2 180 7.9 4 8.2 4975559 \n",
"3 78 5.6 514 7.4 4975559 \n",
"4 491 6.7 398 7.3 4975559 \n",
"5 99 7.6 317 7.4 4975559 \n",
"6 182 10.9 19 5.6 4975559 \n",
"7 88 4.5 422 4.5 4975559 \n",
"8 162 4.6 369 5.0 4975559 \n",
"9 573 4.5 44 4.5 4975559 \n",
"10 145 4.5 18 6.0 4975559 \n",
"11 152 4.5 413 5.0 4975559 \n",
"12 235 4.8 47 5.0 4975559 \n",
"13 422 4.5 520 4.4 4975559 \n",
"14 4 8.2 82 7.5 4975559 \n",
"15 82 7.5 401 8.3 4975559 \n",
"16 220 6.0 129 5.6 4975559 \n",
"17 514 7.5 342 6.6 4975559 \n",
"18 327 7.7 136 6.6 4975559 \n",
"19 129 5.7 82 7.5 4975559 \n",
"20 136 6.6 16 6.4 4975559 \n",
"21 19 5.6 216 5.0 4975559 \n",
"22 351 15.0 58 9.0 4975559 \n",
"23 342 6.6 372 6.5 4975559 \n",
"\n",
" event time \n",
"0 11 2024-11-08 21:58:38.532929+00:00 \n",
"1 9 2024-10-24 19:07:47.537012+00:00 \n",
"2 9 2024-10-24 19:07:47.536831+00:00 \n",
"3 9 2024-10-24 19:07:47.536620+00:00 \n",
"4 9 2024-10-24 19:07:47.536384+00:00 \n",
"5 9 2024-10-24 19:07:47.536209+00:00 \n",
"6 9 2024-10-24 19:07:47.536018+00:00 \n",
"7 9 2024-10-24 19:07:47.535831+00:00 \n",
"8 9 2024-10-24 19:07:47.535638+00:00 \n",
"9 9 2024-10-24 19:07:47.535371+00:00 \n",
"10 9 2024-10-24 19:07:47.535179+00:00 \n",
"11 9 2024-10-24 19:07:47.534961+00:00 \n",
"12 9 2024-10-24 19:07:47.534506+00:00 \n",
"13 8 2024-10-18 07:13:38.487428+00:00 \n",
"14 7 2024-10-04 18:12:04.665563+00:00 \n",
"15 6 2024-09-28 06:41:03.727840+00:00 \n",
"16 6 2024-09-28 06:41:03.721162+00:00 \n",
"17 5 2024-09-20 17:50:08.943188+00:00 \n",
"18 4 2024-09-14 09:54:52.300593+00:00 \n",
"19 4 2024-09-13 16:21:03.307871+00:00 \n",
"20 4 2024-09-13 16:21:03.299689+00:00 \n",
"21 3 2024-08-31 08:32:51.029245+00:00 \n",
"22 2 2024-08-24 08:46:07.977426+00:00 \n",
"23 2 2024-08-24 08:46:07.973476+00:00 "
]
},
"execution_count": 12,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"pb.fpl.get_entry_transfers(team_id)"
]
},
{
"cell_type": "markdown",
"id": "5b076cac-4ce3-4e7f-a27c-b06337a74985",
"metadata": {
"tags": []
},
"source": [
"### Get optimal fantasy football squad for a budget of £100m"
]
},
{
"cell_type": "code",
"execution_count": 13,
"id": "9303fa20-3306-4d13-9f2b-06ed9c989d23",
"metadata": {
"tags": []
},
"outputs": [
{
"data": {
"text/plain": [
"{'status': 'Optimal', 'total_points': 1170.0, 'total_price': np.float64(99.6)}"
]
},
"execution_count": 13,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"optimiser_results, team = pb.fpl.optimise_team(budget=100)\n",
"\n",
"optimiser_results"
]
},
{
"cell_type": "code",
"execution_count": 14,
"id": "249401f1-c4e9-447a-add5-0aec81a1ee37",
"metadata": {
"tags": []
},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" id | \n",
" full_name | \n",
" team | \n",
" position | \n",
" price | \n",
" total_points | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" 383 | \n",
" André Onana | \n",
" MUN | \n",
" GKP | \n",
" 5.2 | \n",
" 65 | \n",
"
\n",
" \n",
" 1 | \n",
" 443 | \n",
" Matz Sels | \n",
" NFO | \n",
" GKP | \n",
" 4.7 | \n",
" 62 | \n",
"
\n",
" \n",
" 2 | \n",
" 339 | \n",
" Virgil van Dijk | \n",
" LIV | \n",
" DEF | \n",
" 6.4 | \n",
" 64 | \n",
"
\n",
" \n",
" 3 | \n",
" 3 | \n",
" Gabriel dos Santos Magalhães | \n",
" ARS | \n",
" DEF | \n",
" 6.2 | \n",
" 60 | \n",
"
\n",
" \n",
" 4 | \n",
" 422 | \n",
" Ola Aina | \n",
" NFO | \n",
" DEF | \n",
" 4.9 | \n",
" 58 | \n",
"
\n",
" \n",
" 5 | \n",
" 238 | \n",
" Ashley Young | \n",
" EVE | \n",
" DEF | \n",
" 4.6 | \n",
" 57 | \n",
"
\n",
" \n",
" 6 | \n",
" 211 | \n",
" Daniel Muñoz | \n",
" CRY | \n",
" DEF | \n",
" 4.7 | \n",
" 50 | \n",
"
\n",
" \n",
" 7 | \n",
" 328 | \n",
" Mohamed Salah | \n",
" LIV | \n",
" MID | \n",
" 13.3 | \n",
" 151 | \n",
"
\n",
" \n",
" 8 | \n",
" 182 | \n",
" Cole Palmer | \n",
" CHE | \n",
" MID | \n",
" 11.1 | \n",
" 125 | \n",
"
\n",
" \n",
" 9 | \n",
" 99 | \n",
" Bryan Mbeumo | \n",
" BRE | \n",
" MID | \n",
" 7.6 | \n",
" 96 | \n",
"
\n",
" \n",
" 10 | \n",
" 247 | \n",
" Alex Iwobi | \n",
" FUL | \n",
" MID | \n",
" 5.7 | \n",
" 76 | \n",
"
\n",
" \n",
" 11 | \n",
" 230 | \n",
" Dwight McNeil | \n",
" EVE | \n",
" MID | \n",
" 5.4 | \n",
" 65 | \n",
"
\n",
" \n",
" 12 | \n",
" 447 | \n",
" Chris Wood | \n",
" NFO | \n",
" FWD | \n",
" 6.5 | \n",
" 88 | \n",
"
\n",
" \n",
" 13 | \n",
" 541 | \n",
" Matheus Santos Carneiro Da Cunha | \n",
" WOL | \n",
" FWD | \n",
" 7.1 | \n",
" 80 | \n",
"
\n",
" \n",
" 14 | \n",
" 110 | \n",
" Yoane Wissa | \n",
" BRE | \n",
" FWD | \n",
" 6.2 | \n",
" 73 | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" id full_name team position price total_points\n",
"0 383 André Onana MUN GKP 5.2 65\n",
"1 443 Matz Sels NFO GKP 4.7 62\n",
"2 339 Virgil van Dijk LIV DEF 6.4 64\n",
"3 3 Gabriel dos Santos Magalhães ARS DEF 6.2 60\n",
"4 422 Ola Aina NFO DEF 4.9 58\n",
"5 238 Ashley Young EVE DEF 4.6 57\n",
"6 211 Daniel Muñoz CRY DEF 4.7 50\n",
"7 328 Mohamed Salah LIV MID 13.3 151\n",
"8 182 Cole Palmer CHE MID 11.1 125\n",
"9 99 Bryan Mbeumo BRE MID 7.6 96\n",
"10 247 Alex Iwobi FUL MID 5.7 76\n",
"11 230 Dwight McNeil EVE MID 5.4 65\n",
"12 447 Chris Wood NFO FWD 6.5 88\n",
"13 541 Matheus Santos Carneiro Da Cunha WOL FWD 7.1 80\n",
"14 110 Yoane Wissa BRE FWD 6.2 73"
]
},
"execution_count": 14,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"team"
]
},
{
"cell_type": "markdown",
"id": "a930704d-7395-4327-86dd-f36023c874a0",
"metadata": {
"tags": []
},
"source": [
"### Get optimal fantasy football first eleven if playing 3-5-2 if spending £85m"
]
},
{
"cell_type": "code",
"execution_count": 15,
"id": "5448ff5f-cd9f-4691-a8e2-56556c735cf3",
"metadata": {
"tags": []
},
"outputs": [
{
"data": {
"text/plain": [
"{'status': 'Optimal', 'total_points': 966.0, 'total_price': np.float64(84.5)}"
]
},
"execution_count": 15,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"optimiser_results, team = pb.fpl.optimise_team(formation=\"1-3-5-2\", budget=85)\n",
"\n",
"optimiser_results"
]
},
{
"cell_type": "code",
"execution_count": 16,
"id": "d583b570-74f8-4a2d-848b-8a9b4292d774",
"metadata": {
"tags": []
},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" id | \n",
" full_name | \n",
" team | \n",
" position | \n",
" price | \n",
" total_points | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" 383 | \n",
" André Onana | \n",
" MUN | \n",
" GKP | \n",
" 5.2 | \n",
" 65 | \n",
"
\n",
" \n",
" 1 | \n",
" 339 | \n",
" Virgil van Dijk | \n",
" LIV | \n",
" DEF | \n",
" 6.4 | \n",
" 64 | \n",
"
\n",
" \n",
" 2 | \n",
" 3 | \n",
" Gabriel dos Santos Magalhães | \n",
" ARS | \n",
" DEF | \n",
" 6.2 | \n",
" 60 | \n",
"
\n",
" \n",
" 3 | \n",
" 422 | \n",
" Ola Aina | \n",
" NFO | \n",
" DEF | \n",
" 4.9 | \n",
" 58 | \n",
"
\n",
" \n",
" 4 | \n",
" 328 | \n",
" Mohamed Salah | \n",
" LIV | \n",
" MID | \n",
" 13.3 | \n",
" 151 | \n",
"
\n",
" \n",
" 5 | \n",
" 182 | \n",
" Cole Palmer | \n",
" CHE | \n",
" MID | \n",
" 11.1 | \n",
" 125 | \n",
"
\n",
" \n",
" 6 | \n",
" 17 | \n",
" Bukayo Saka | \n",
" ARS | \n",
" MID | \n",
" 10.5 | \n",
" 103 | \n",
"
\n",
" \n",
" 7 | \n",
" 99 | \n",
" Bryan Mbeumo | \n",
" BRE | \n",
" MID | \n",
" 7.6 | \n",
" 96 | \n",
"
\n",
" \n",
" 8 | \n",
" 247 | \n",
" Alex Iwobi | \n",
" FUL | \n",
" MID | \n",
" 5.7 | \n",
" 76 | \n",
"
\n",
" \n",
" 9 | \n",
" 447 | \n",
" Chris Wood | \n",
" NFO | \n",
" FWD | \n",
" 6.5 | \n",
" 88 | \n",
"
\n",
" \n",
" 10 | \n",
" 541 | \n",
" Matheus Santos Carneiro Da Cunha | \n",
" WOL | \n",
" FWD | \n",
" 7.1 | \n",
" 80 | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" id full_name team position price total_points\n",
"0 383 André Onana MUN GKP 5.2 65\n",
"1 339 Virgil van Dijk LIV DEF 6.4 64\n",
"2 3 Gabriel dos Santos Magalhães ARS DEF 6.2 60\n",
"3 422 Ola Aina NFO DEF 4.9 58\n",
"4 328 Mohamed Salah LIV MID 13.3 151\n",
"5 182 Cole Palmer CHE MID 11.1 125\n",
"6 17 Bukayo Saka ARS MID 10.5 103\n",
"7 99 Bryan Mbeumo BRE MID 7.6 96\n",
"8 247 Alex Iwobi FUL MID 5.7 76\n",
"9 447 Chris Wood NFO FWD 6.5 88\n",
"10 541 Matheus Santos Carneiro Da Cunha WOL FWD 7.1 80"
]
},
"execution_count": 16,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"team"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "58eeba2f-edce-470d-b484-efe33361af68",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "venv",
"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.13.1"
}
},
"nbformat": 4,
"nbformat_minor": 5
}