Update matchday 22 + code fixed for new FBRef data and Fantacalcio probable lineups

This commit is contained in:
Giuseppe Musicco
2023-02-11 08:44:48 +01:00
parent 8f7df5dd7f
commit 09302a08e4
53 changed files with 23890 additions and 19225 deletions
+152 -119
View File
@@ -12,7 +12,7 @@
},
{
"cell_type": "code",
"execution_count": 17,
"execution_count": 53,
"id": "8a74364d",
"metadata": {},
"outputs": [],
@@ -22,7 +22,7 @@
},
{
"cell_type": "code",
"execution_count": 18,
"execution_count": 54,
"id": "8a6867a5",
"metadata": {},
"outputs": [
@@ -30,7 +30,7 @@
"name": "stderr",
"output_type": "stream",
"text": [
"C:\\Users\\nicol\\AppData\\Local\\Temp\\ipykernel_5084\\813865162.py:21: SettingWithCopyWarning: \n",
"C:\\Users\\nicol\\AppData\\Local\\Temp\\ipykernel_7860\\813865162.py:21: SettingWithCopyWarning: \n",
"A value is trying to be set on a copy of a slice from a DataFrame\n",
"\n",
"See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
@@ -588,7 +588,7 @@
" </tr>\n",
" </tbody>\n",
"</table>\n",
"<p>20 rows × 321 columns</p>\n",
"<p>20 rows × 303 columns</p>\n",
"</div>"
],
"text/plain": [
@@ -730,10 +730,10 @@
"Torino 595.0 51.1 \n",
"Udinese 491.0 47.4 \n",
"\n",
"[20 rows x 321 columns]"
"[20 rows x 303 columns]"
]
},
"execution_count": 18,
"execution_count": 54,
"metadata": {},
"output_type": "execute_result"
}
@@ -769,7 +769,7 @@
},
{
"cell_type": "code",
"execution_count": 19,
"execution_count": 55,
"id": "b6a3db98",
"metadata": {},
"outputs": [],
@@ -779,7 +779,7 @@
},
{
"cell_type": "code",
"execution_count": 20,
"execution_count": 56,
"id": "c34eb398",
"metadata": {},
"outputs": [
@@ -1017,8 +1017,8 @@
" <td>0.0</td>\n",
" <td>0.00</td>\n",
" <td>0.0</td>\n",
" <td>6.027304</td>\n",
" <td>0.472755</td>\n",
" <td>6.112216</td>\n",
" <td>0.535288</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Oddei</th>\n",
@@ -1041,8 +1041,8 @@
" <td>0.0</td>\n",
" <td>0.00</td>\n",
" <td>0.0</td>\n",
" <td>6.207968</td>\n",
" <td>0.447162</td>\n",
" <td>6.153091</td>\n",
" <td>0.381442</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Karamoko Is.</th>\n",
@@ -1065,8 +1065,8 @@
" <td>0.0</td>\n",
" <td>0.00</td>\n",
" <td>0.0</td>\n",
" <td>6.186813</td>\n",
" <td>0.444240</td>\n",
" <td>6.042560</td>\n",
" <td>0.412530</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Correia</th>\n",
@@ -1089,8 +1089,8 @@
" <td>0.0</td>\n",
" <td>0.00</td>\n",
" <td>0.0</td>\n",
" <td>6.600386</td>\n",
" <td>0.396770</td>\n",
" <td>6.286596</td>\n",
" <td>0.267071</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Raimondo</th>\n",
@@ -1113,12 +1113,12 @@
" <td>0.0</td>\n",
" <td>0.00</td>\n",
" <td>0.0</td>\n",
" <td>6.209072</td>\n",
" <td>0.275318</td>\n",
" <td>6.363572</td>\n",
" <td>0.428066</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"<p>564 rows × 169 columns</p>\n",
"<p>564 rows × 160 columns</p>\n",
"</div>"
],
"text/plain": [
@@ -1200,16 +1200,16 @@
"Gollini 17.4 6.100000 0.632456 \n",
"Audero 14.8 6.378378 0.409439 \n",
"... ... ... ... \n",
"Rabbi 0.0 6.027304 0.472755 \n",
"Oddei 0.0 6.207968 0.447162 \n",
"Karamoko Is. 0.0 6.186813 0.444240 \n",
"Correia 0.0 6.600386 0.396770 \n",
"Raimondo 0.0 6.209072 0.275318 \n",
"Rabbi 0.0 6.112216 0.535288 \n",
"Oddei 0.0 6.153091 0.381442 \n",
"Karamoko Is. 0.0 6.042560 0.412530 \n",
"Correia 0.0 6.286596 0.267071 \n",
"Raimondo 0.0 6.363572 0.428066 \n",
"\n",
"[564 rows x 169 columns]"
"[564 rows x 160 columns]"
]
},
"execution_count": 20,
"execution_count": 56,
"metadata": {},
"output_type": "execute_result"
}
@@ -1223,7 +1223,7 @@
},
{
"cell_type": "code",
"execution_count": 21,
"execution_count": 57,
"id": "f9f7f88c",
"metadata": {},
"outputs": [],
@@ -1248,7 +1248,7 @@
},
{
"cell_type": "code",
"execution_count": 22,
"execution_count": 58,
"id": "7eb4e666",
"metadata": {},
"outputs": [
@@ -1323,7 +1323,7 @@
" </tr>\n",
" </tbody>\n",
"</table>\n",
"<p>1 rows × 811 columns</p>\n",
"<p>1 rows × 766 columns</p>\n",
"</div>"
],
"text/plain": [
@@ -1345,10 +1345,10 @@
" opp_vs_team_aerials_lost opp_vs_team_aerials_won_pct \n",
"Immobile 633.0 44.4 \n",
"\n",
"[1 rows x 811 columns]"
"[1 rows x 766 columns]"
]
},
"execution_count": 22,
"execution_count": 58,
"metadata": {},
"output_type": "execute_result"
}
@@ -1362,7 +1362,7 @@
},
{
"cell_type": "code",
"execution_count": 23,
"execution_count": 59,
"id": "6b4c1b00",
"metadata": {},
"outputs": [
@@ -1372,7 +1372,7 @@
"'Lazio'"
]
},
"execution_count": 23,
"execution_count": 59,
"metadata": {},
"output_type": "execute_result"
}
@@ -1385,7 +1385,7 @@
},
{
"cell_type": "code",
"execution_count": 24,
"execution_count": 60,
"id": "6ea6df1f",
"metadata": {},
"outputs": [
@@ -1485,7 +1485,7 @@
" 'vs_team_aerials_won_pct']"
]
},
"execution_count": 24,
"execution_count": 60,
"metadata": {},
"output_type": "execute_result"
}
@@ -1504,7 +1504,7 @@
},
{
"cell_type": "code",
"execution_count": 25,
"execution_count": 61,
"id": "47bc651f",
"metadata": {},
"outputs": [],
@@ -1517,8 +1517,8 @@
" 'goals_per_shot',\n",
" 'goals_per_shot_on_target',\n",
" 'passes_pct',\n",
" 'dribble_tackles_pct',\n",
" 'dribbles_completed_pct',\n",
" #'dribble_tackles_pct',\n",
" #'dribbles_completed_pct',\n",
" 'aerials_won_pct',\n",
" 'team_possession',\n",
" 'team_goals_assists_per90',\n",
@@ -1533,7 +1533,7 @@
" 'team_passes_pct_long',\n",
" 'team_sca_per90',\n",
" 'team_gca_per90',\n",
" 'team_dribble_tackles_pct',\n",
" #'team_dribble_tackles_pct',\n",
" 'team_aerials_won_pct',\n",
" 'vs_team_possession',\n",
" 'vs_team_goals_per90',\n",
@@ -1550,8 +1550,8 @@
" 'vs_team_passes_pct_long',\n",
" 'vs_team_sca_per90',\n",
" 'vs_team_gca_per90',\n",
" 'vs_team_dribble_tackles_pct',\n",
" 'vs_team_dribbles_completed_pct',\n",
" #'vs_team_dribble_tackles_pct',\n",
" #'vs_team_dribbles_completed_pct',\n",
" 'vs_team_aerials_won_pct',\n",
" 'opp_team_possession',\n",
" 'opp_team_goals_assists_per90',\n",
@@ -1566,7 +1566,7 @@
" 'opp_team_passes_pct_long',\n",
" 'opp_team_sca_per90',\n",
" 'opp_team_gca_per90',\n",
" 'opp_team_dribble_tackles_pct',\n",
" #'opp_team_dribble_tackles_pct',\n",
" 'opp_team_aerials_won_pct',\n",
" 'opp_vs_team_possession',\n",
" 'opp_vs_team_goals_per90',\n",
@@ -1583,8 +1583,8 @@
" 'opp_vs_team_passes_pct_long',\n",
" 'opp_vs_team_sca_per90',\n",
" 'opp_vs_team_gca_per90',\n",
" 'opp_vs_team_dribble_tackles_pct',\n",
" 'opp_vs_team_dribbles_completed_pct',\n",
" #'opp_vs_team_dribble_tackles_pct',\n",
" #'opp_vs_team_dribbles_completed_pct',\n",
" 'opp_vs_team_aerials_won_pct',\n",
" \n",
" 'vote_avg',\n",
@@ -1608,9 +1608,9 @@
" 'passes_switches',\n",
" 'crosses',\n",
" 'corner_kicks',\n",
" 'dribble_tackles',\n",
" 'dribbles_vs',\n",
" 'dribbled_past',\n",
" #'dribble_tackles',\n",
" #'dribbles_vs',\n",
" #'dribbled_past',\n",
" 'blocks',\n",
" 'blocked_shots',\n",
" 'blocked_passes',\n",
@@ -1624,8 +1624,8 @@
" 'touches_att_3rd',\n",
" 'touches_att_pen_area',\n",
" 'touches_live_ball',\n",
" 'dribbles_completed',\n",
" 'dribbles',\n",
" #'dribbles_completed',\n",
" #'dribbles',\n",
" 'passes_received',\n",
" 'miscontrols',\n",
" 'dispossessed',\n",
@@ -1650,7 +1650,7 @@
},
{
"cell_type": "code",
"execution_count": 26,
"execution_count": 62,
"id": "3f43d509",
"metadata": {},
"outputs": [],
@@ -1673,7 +1673,7 @@
},
{
"cell_type": "code",
"execution_count": 27,
"execution_count": 63,
"id": "930d00c7",
"metadata": {},
"outputs": [
@@ -1706,8 +1706,8 @@
" <th>goals_per_shot</th>\n",
" <th>goals_per_shot_on_target</th>\n",
" <th>passes_pct</th>\n",
" <th>dribble_tackles_pct</th>\n",
" <th>dribbles_completed_pct</th>\n",
" <th>aerials_won_pct</th>\n",
" <th>team_possession</th>\n",
" <th>...</th>\n",
" <th>miscontrols</th>\n",
" <th>dispossessed</th>\n",
@@ -1732,8 +1732,8 @@
" <td>0.14</td>\n",
" <td>0.36</td>\n",
" <td>72.6</td>\n",
" <td>31.8</td>\n",
" <td>57.4</td>\n",
" <td>32.5</td>\n",
" <td>53.0</td>\n",
" <td>...</td>\n",
" <td>0.024921</td>\n",
" <td>0.011934</td>\n",
@@ -1748,7 +1748,7 @@
" </tr>\n",
" </tbody>\n",
"</table>\n",
"<p>1 rows × 125 columns</p>\n",
"<p>1 rows × 112 columns</p>\n",
"</div>"
],
"text/plain": [
@@ -1758,22 +1758,22 @@
" goals_per_shot goals_per_shot_on_target passes_pct \\\n",
"Immobile 0.14 0.36 72.6 \n",
"\n",
" dribble_tackles_pct dribbles_completed_pct ... miscontrols \\\n",
"Immobile 31.8 57.4 ... 0.024921 \n",
" aerials_won_pct team_possession ... miscontrols dispossessed \\\n",
"Immobile 32.5 53.0 ... 0.024921 0.011934 \n",
"\n",
" dispossessed fouls fouled aerials_won aerials_lost \\\n",
"Immobile 0.011934 0.012987 0.015444 0.009126 0.018954 \n",
" fouls fouled aerials_won aerials_lost carries \\\n",
"Immobile 0.012987 0.015444 0.009126 0.018954 0.2457 \n",
"\n",
" carries progressive_carries carries_into_final_third \\\n",
"Immobile 0.2457 0.025974 0.015093 \n",
" progressive_carries carries_into_final_third \\\n",
"Immobile 0.025974 0.015093 \n",
"\n",
" carries_into_penalty_area \n",
"Immobile 0.013338 \n",
"\n",
"[1 rows x 125 columns]"
"[1 rows x 112 columns]"
]
},
"execution_count": 27,
"execution_count": 63,
"metadata": {},
"output_type": "execute_result"
}
@@ -1788,7 +1788,7 @@
},
{
"cell_type": "code",
"execution_count": 28,
"execution_count": 64,
"id": "3ae718d2",
"metadata": {},
"outputs": [
@@ -2004,7 +2004,7 @@
"[10574 rows x 10 columns]"
]
},
"execution_count": 28,
"execution_count": 64,
"metadata": {},
"output_type": "execute_result"
}
@@ -2016,7 +2016,7 @@
},
{
"cell_type": "code",
"execution_count": 29,
"execution_count": 65,
"id": "ec0bc56b",
"metadata": {},
"outputs": [
@@ -2154,7 +2154,7 @@
},
{
"cell_type": "code",
"execution_count": 30,
"execution_count": 66,
"id": "b292f9f9",
"metadata": {},
"outputs": [
@@ -2469,7 +2469,7 @@
" </tr>\n",
" </tbody>\n",
"</table>\n",
"<p>10574 rows × 135 columns</p>\n",
"<p>10574 rows × 122 columns</p>\n",
"</div>"
],
"text/plain": [
@@ -2525,10 +2525,10 @@
"10572 0.014207 0.013418 \n",
"10573 0.004704 0.002822 \n",
"\n",
"[10574 rows x 135 columns]"
"[10574 rows x 122 columns]"
]
},
"execution_count": 30,
"execution_count": 66,
"metadata": {},
"output_type": "execute_result"
}
@@ -2539,7 +2539,7 @@
},
{
"cell_type": "code",
"execution_count": 31,
"execution_count": 67,
"id": "1db9f77f",
"metadata": {},
"outputs": [],
@@ -2552,7 +2552,7 @@
},
{
"cell_type": "code",
"execution_count": 32,
"execution_count": 68,
"id": "f56df3ca",
"metadata": {},
"outputs": [
@@ -2867,7 +2867,7 @@
" </tr>\n",
" </tbody>\n",
"</table>\n",
"<p>9663 rows × 135 columns</p>\n",
"<p>9663 rows × 122 columns</p>\n",
"</div>"
],
"text/plain": [
@@ -2923,10 +2923,10 @@
"10572 0.014207 0.013418 \n",
"10573 0.004704 0.002822 \n",
"\n",
"[9663 rows x 135 columns]"
"[9663 rows x 122 columns]"
]
},
"execution_count": 32,
"execution_count": 68,
"metadata": {},
"output_type": "execute_result"
}
@@ -2937,7 +2937,7 @@
},
{
"cell_type": "code",
"execution_count": 33,
"execution_count": 69,
"id": "df26c8e0",
"metadata": {},
"outputs": [],
@@ -2955,7 +2955,7 @@
},
{
"cell_type": "code",
"execution_count": 56,
"execution_count": 70,
"id": "ba7b838c",
"metadata": {},
"outputs": [],
@@ -2990,7 +2990,7 @@
" 'team_passes_pct_long',\n",
" 'team_sca_per90',\n",
" 'team_gca_per90',\n",
" 'team_dribble_tackles_pct',\n",
" #'team_dribble_tackles_pct',\n",
" 'team_aerials_won_pct',\n",
" 'vs_team_possession',\n",
" 'vs_team_goals_per90',\n",
@@ -3007,8 +3007,8 @@
" 'vs_team_passes_pct_long',\n",
" 'vs_team_sca_per90',\n",
" 'vs_team_gca_per90',\n",
" 'vs_team_dribble_tackles_pct',\n",
" 'vs_team_dribbles_completed_pct',\n",
" #'vs_team_dribble_tackles_pct',\n",
" #'vs_team_dribbles_completed_pct',\n",
" 'vs_team_aerials_won_pct',\n",
" 'opp_team_possession',\n",
" 'opp_team_goals_assists_per90',\n",
@@ -3023,7 +3023,7 @@
" 'opp_team_passes_pct_long',\n",
" 'opp_team_sca_per90',\n",
" 'opp_team_gca_per90',\n",
" 'opp_team_dribble_tackles_pct',\n",
" #'opp_team_dribble_tackles_pct',\n",
" 'opp_team_aerials_won_pct',\n",
" 'opp_vs_team_possession',\n",
" 'opp_vs_team_goals_per90',\n",
@@ -3040,8 +3040,8 @@
" 'opp_vs_team_passes_pct_long',\n",
" 'opp_vs_team_sca_per90',\n",
" 'opp_vs_team_gca_per90',\n",
" 'opp_vs_team_dribble_tackles_pct',\n",
" 'opp_vs_team_dribbles_completed_pct',\n",
" #'opp_vs_team_dribble_tackles_pct',\n",
" #'opp_vs_team_dribbles_completed_pct',\n",
" 'opp_vs_team_aerials_won_pct',\n",
" \n",
" 'vote_avg',\n",
@@ -3068,7 +3068,7 @@
},
{
"cell_type": "code",
"execution_count": 57,
"execution_count": 71,
"id": "1d2682b9",
"metadata": {},
"outputs": [],
@@ -3092,7 +3092,7 @@
},
{
"cell_type": "code",
"execution_count": 58,
"execution_count": 72,
"id": "bc6e9d52",
"metadata": {},
"outputs": [
@@ -3143,59 +3143,59 @@
" <tbody>\n",
" <tr>\n",
" <th>Consigli</th>\n",
" <td>37</td>\n",
" <td>37</td>\n",
" <td>3330</td>\n",
" <td>1.51</td>\n",
" <td>71.9</td>\n",
" <td>18.9</td>\n",
" <td>-0.04</td>\n",
" <td>37.0</td>\n",
" <td>37.0</td>\n",
" <td>3322.0</td>\n",
" <td>1.71</td>\n",
" <td>67.8</td>\n",
" <td>8.1</td>\n",
" <td>-0.16</td>\n",
" <td>43.2</td>\n",
" <td>29.0</td>\n",
" <td>30.9</td>\n",
" <td>24.0</td>\n",
" <td>27.7</td>\n",
" <td>...</td>\n",
" <td>56.0</td>\n",
" <td>0.28</td>\n",
" <td>-6.0</td>\n",
" <td>186.0</td>\n",
" <td>431.0</td>\n",
" <td>1219.0</td>\n",
" <td>174.0</td>\n",
" <td>246.0</td>\n",
" <td>491.0</td>\n",
" <td>21.0</td>\n",
" <td>53.6</td>\n",
" <td>0.27</td>\n",
" <td>-1.4</td>\n",
" <td>118.0</td>\n",
" <td>319.0</td>\n",
" <td>1114.0</td>\n",
" <td>172.0</td>\n",
" <td>240.0</td>\n",
" <td>513.0</td>\n",
" <td>26.0</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"<p>1 rows × 98 columns</p>\n",
"<p>1 rows × 92 columns</p>\n",
"</div>"
],
"text/plain": [
" gk_games gk_games_starts gk_minutes gk_goals_against_per90 \\\n",
"Consigli 37.0 37.0 3322.0 1.71 \n",
"Consigli 37 37 3330 1.51 \n",
"\n",
" gk_save_pct gk_clean_sheets_pct gk_psxg_net_per90 \\\n",
"Consigli 67.8 8.1 -0.16 \n",
"Consigli 71.9 18.9 -0.04 \n",
"\n",
" gk_passes_pct_launched gk_pct_passes_launched \\\n",
"Consigli 43.2 29.0 \n",
"Consigli 37.0 24.0 \n",
"\n",
" gk_passes_length_avg ... gk_psxg \\\n",
"Consigli 30.9 ... 56.0 \n",
"Consigli 27.7 ... 53.6 \n",
"\n",
" gk_psnpxg_per_shot_on_target_against gk_psxg_net \\\n",
"Consigli 0.28 -6.0 \n",
"Consigli 0.27 -1.4 \n",
"\n",
" gk_passes_completed_launched gk_passes_launched gk_passes \\\n",
"Consigli 186.0 431.0 1219.0 \n",
"Consigli 118.0 319.0 1114.0 \n",
"\n",
" gk_passes_throws gk_goal_kicks gk_crosses gk_crosses_stopped \n",
"Consigli 174.0 246.0 491.0 21.0 \n",
"Consigli 172.0 240.0 513.0 26.0 \n",
"\n",
"[1 rows x 98 columns]"
"[1 rows x 92 columns]"
]
},
"execution_count": 58,
"execution_count": 72,
"metadata": {},
"output_type": "execute_result"
}
@@ -3210,7 +3210,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 73,
"id": "6f08e718",
"metadata": {},
"outputs": [
@@ -3290,7 +3290,40 @@
"6900\n",
"7000\n",
"7100\n",
"7200\n"
"7200\n",
"7300\n",
"7400\n",
"7500\n",
"7600\n",
"7700\n",
"7800\n",
"7900\n",
"8000\n",
"8100\n",
"8200\n",
"8300\n",
"8400\n",
"8500\n",
"8600\n",
"8700\n",
"8800\n",
"8900\n",
"9000\n",
"9100\n",
"9200\n",
"9300\n",
"9400\n",
"9500\n",
"9600\n",
"9700\n",
"9800\n",
"9900\n",
"10000\n",
"10100\n",
"10200\n",
"10300\n",
"10400\n",
"10500\n"
]
}
],
@@ -3320,7 +3353,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 74,
"id": "2b540670",
"metadata": {},
"outputs": [],
@@ -3330,7 +3363,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 75,
"id": "35495581",
"metadata": {},
"outputs": [],