got all tempearatures :)
This commit is contained in:
parent
03b3a1fea0
commit
6c68790fd6
383
1_zaj.ipynb
383
1_zaj.ipynb
@ -1,34 +1,8 @@
|
||||
{
|
||||
"metadata": {
|
||||
"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.8.10-final"
|
||||
},
|
||||
"orig_nbformat": 2,
|
||||
"kernelspec": {
|
||||
"name": "python3",
|
||||
"display_name": "Python 3.8.10 64-bit",
|
||||
"metadata": {
|
||||
"interpreter": {
|
||||
"hash": "767d51c1340bd893661ea55ea3124f6de3c7a262a8b4abca0554b478b1e2ff90"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 2,
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 3,
|
||||
"execution_count": 1,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
@ -38,12 +12,215 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 90,
|
||||
"execution_count": 2,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"output_type": "execute_result",
|
||||
"data": {
|
||||
"text/html": [
|
||||
"<div>\n",
|
||||
"<style scoped>\n",
|
||||
" .dataframe tbody tr th:only-of-type {\n",
|
||||
" vertical-align: middle;\n",
|
||||
" }\n",
|
||||
"\n",
|
||||
" .dataframe tbody tr th {\n",
|
||||
" vertical-align: top;\n",
|
||||
" }\n",
|
||||
"\n",
|
||||
" .dataframe thead th {\n",
|
||||
" text-align: right;\n",
|
||||
" }\n",
|
||||
"</style>\n",
|
||||
"<table border=\"1\" class=\"dataframe\">\n",
|
||||
" <thead>\n",
|
||||
" <tr style=\"text-align: right;\">\n",
|
||||
" <th></th>\n",
|
||||
" <th>Wk</th>\n",
|
||||
" <th>Day</th>\n",
|
||||
" <th>Date</th>\n",
|
||||
" <th>Time</th>\n",
|
||||
" <th>Home</th>\n",
|
||||
" <th>Score</th>\n",
|
||||
" <th>Away</th>\n",
|
||||
" <th>Attendance</th>\n",
|
||||
" <th>Venue</th>\n",
|
||||
" <th>Referee</th>\n",
|
||||
" <th>Match Report</th>\n",
|
||||
" <th>Notes</th>\n",
|
||||
" </tr>\n",
|
||||
" </thead>\n",
|
||||
" <tbody>\n",
|
||||
" <tr>\n",
|
||||
" <th>0</th>\n",
|
||||
" <td>1.0</td>\n",
|
||||
" <td>Fri</td>\n",
|
||||
" <td>2020-08-21</td>\n",
|
||||
" <td>18:00</td>\n",
|
||||
" <td>Zagłębie Lubin</td>\n",
|
||||
" <td>2–1</td>\n",
|
||||
" <td>Lech Poznań</td>\n",
|
||||
" <td>3968.0</td>\n",
|
||||
" <td>Stadion Zagłębia Lubin</td>\n",
|
||||
" <td>Bartosz Frankowski</td>\n",
|
||||
" <td>Match Report</td>\n",
|
||||
" <td>NaN</td>\n",
|
||||
" </tr>\n",
|
||||
" <tr>\n",
|
||||
" <th>1</th>\n",
|
||||
" <td>1.0</td>\n",
|
||||
" <td>Sat</td>\n",
|
||||
" <td>2020-08-22</td>\n",
|
||||
" <td>15:00</td>\n",
|
||||
" <td>Cracovia</td>\n",
|
||||
" <td>2–1</td>\n",
|
||||
" <td>Pogoń Szczecin</td>\n",
|
||||
" <td>4053.0</td>\n",
|
||||
" <td>Stadion Cracovii</td>\n",
|
||||
" <td>Paweł Raczkowski</td>\n",
|
||||
" <td>Match Report</td>\n",
|
||||
" <td>NaN</td>\n",
|
||||
" </tr>\n",
|
||||
" <tr>\n",
|
||||
" <th>2</th>\n",
|
||||
" <td>1.0</td>\n",
|
||||
" <td>Sat</td>\n",
|
||||
" <td>2020-08-22</td>\n",
|
||||
" <td>17:30</td>\n",
|
||||
" <td>Śląsk Wrocław</td>\n",
|
||||
" <td>2–0</td>\n",
|
||||
" <td>Piast Gliwice</td>\n",
|
||||
" <td>5259.0</td>\n",
|
||||
" <td>Stadion Miejski</td>\n",
|
||||
" <td>Wojciech Myć</td>\n",
|
||||
" <td>Match Report</td>\n",
|
||||
" <td>NaN</td>\n",
|
||||
" </tr>\n",
|
||||
" <tr>\n",
|
||||
" <th>3</th>\n",
|
||||
" <td>1.0</td>\n",
|
||||
" <td>Sat</td>\n",
|
||||
" <td>2020-08-22</td>\n",
|
||||
" <td>20:00</td>\n",
|
||||
" <td>RKS Raków</td>\n",
|
||||
" <td>1–2</td>\n",
|
||||
" <td>Legia Warsaw</td>\n",
|
||||
" <td>1985.0</td>\n",
|
||||
" <td>Stadion GKS-u</td>\n",
|
||||
" <td>Jarosław Przybył</td>\n",
|
||||
" <td>Match Report</td>\n",
|
||||
" <td>NaN</td>\n",
|
||||
" </tr>\n",
|
||||
" <tr>\n",
|
||||
" <th>4</th>\n",
|
||||
" <td>1.0</td>\n",
|
||||
" <td>Sun</td>\n",
|
||||
" <td>2020-08-23</td>\n",
|
||||
" <td>12:30</td>\n",
|
||||
" <td>Wisła Płock</td>\n",
|
||||
" <td>1–1</td>\n",
|
||||
" <td>Stal Mielec</td>\n",
|
||||
" <td>1318.0</td>\n",
|
||||
" <td>Stadion im. Kazimierza Górskiego</td>\n",
|
||||
" <td>Sebastian Jarzębak</td>\n",
|
||||
" <td>Match Report</td>\n",
|
||||
" <td>NaN</td>\n",
|
||||
" </tr>\n",
|
||||
" <tr>\n",
|
||||
" <th>...</th>\n",
|
||||
" <td>...</td>\n",
|
||||
" <td>...</td>\n",
|
||||
" <td>...</td>\n",
|
||||
" <td>...</td>\n",
|
||||
" <td>...</td>\n",
|
||||
" <td>...</td>\n",
|
||||
" <td>...</td>\n",
|
||||
" <td>...</td>\n",
|
||||
" <td>...</td>\n",
|
||||
" <td>...</td>\n",
|
||||
" <td>...</td>\n",
|
||||
" <td>...</td>\n",
|
||||
" </tr>\n",
|
||||
" <tr>\n",
|
||||
" <th>275</th>\n",
|
||||
" <td>30.0</td>\n",
|
||||
" <td>Sun</td>\n",
|
||||
" <td>2021-05-16</td>\n",
|
||||
" <td>17:30</td>\n",
|
||||
" <td>Pogoń Szczecin</td>\n",
|
||||
" <td>1–3</td>\n",
|
||||
" <td>RKS Raków</td>\n",
|
||||
" <td>NaN</td>\n",
|
||||
" <td>Stadion Miejski im. Floriana Krygiera</td>\n",
|
||||
" <td>Sebastian Krasny</td>\n",
|
||||
" <td>Match Report</td>\n",
|
||||
" <td>NaN</td>\n",
|
||||
" </tr>\n",
|
||||
" <tr>\n",
|
||||
" <th>276</th>\n",
|
||||
" <td>30.0</td>\n",
|
||||
" <td>Sun</td>\n",
|
||||
" <td>2021-05-16</td>\n",
|
||||
" <td>17:30</td>\n",
|
||||
" <td>Piast Gliwice</td>\n",
|
||||
" <td>2–3</td>\n",
|
||||
" <td>Wisła Kraków</td>\n",
|
||||
" <td>NaN</td>\n",
|
||||
" <td>Stadion Miejski</td>\n",
|
||||
" <td>Mariusz Zlotek</td>\n",
|
||||
" <td>Match Report</td>\n",
|
||||
" <td>NaN</td>\n",
|
||||
" </tr>\n",
|
||||
" <tr>\n",
|
||||
" <th>277</th>\n",
|
||||
" <td>30.0</td>\n",
|
||||
" <td>Sun</td>\n",
|
||||
" <td>2021-05-16</td>\n",
|
||||
" <td>17:30</td>\n",
|
||||
" <td>Cracovia</td>\n",
|
||||
" <td>0–1</td>\n",
|
||||
" <td>Warta Poznań</td>\n",
|
||||
" <td>3670.0</td>\n",
|
||||
" <td>Stadion Cracovii</td>\n",
|
||||
" <td>Pawel Malec</td>\n",
|
||||
" <td>Match Report</td>\n",
|
||||
" <td>NaN</td>\n",
|
||||
" </tr>\n",
|
||||
" <tr>\n",
|
||||
" <th>278</th>\n",
|
||||
" <td>30.0</td>\n",
|
||||
" <td>Sun</td>\n",
|
||||
" <td>2021-05-16</td>\n",
|
||||
" <td>17:30</td>\n",
|
||||
" <td>Śląsk Wrocław</td>\n",
|
||||
" <td>1–1</td>\n",
|
||||
" <td>Stal Mielec</td>\n",
|
||||
" <td>NaN</td>\n",
|
||||
" <td>Stadion Miejski</td>\n",
|
||||
" <td>Tomasz Kwiatkowski</td>\n",
|
||||
" <td>Match Report</td>\n",
|
||||
" <td>NaN</td>\n",
|
||||
" </tr>\n",
|
||||
" <tr>\n",
|
||||
" <th>279</th>\n",
|
||||
" <td>30.0</td>\n",
|
||||
" <td>Sun</td>\n",
|
||||
" <td>2021-05-16</td>\n",
|
||||
" <td>17:30</td>\n",
|
||||
" <td>Wisła Płock</td>\n",
|
||||
" <td>4–0</td>\n",
|
||||
" <td>Zagłębie Lubin</td>\n",
|
||||
" <td>NaN</td>\n",
|
||||
" <td>Stadion im. Kazimierza Górskiego</td>\n",
|
||||
" <td>Paweł Raczkowski</td>\n",
|
||||
" <td>Match Report</td>\n",
|
||||
" <td>NaN</td>\n",
|
||||
" </tr>\n",
|
||||
" </tbody>\n",
|
||||
"</table>\n",
|
||||
"<p>280 rows × 12 columns</p>\n",
|
||||
"</div>"
|
||||
],
|
||||
"text/plain": [
|
||||
" Wk Day Date Time Home Score Away \\\n",
|
||||
"0 1.0 Fri 2020-08-21 18:00 Zagłębie Lubin 2–1 Lech Poznań \n",
|
||||
@ -85,11 +262,11 @@
|
||||
"279 Match Report NaN \n",
|
||||
"\n",
|
||||
"[280 rows x 12 columns]"
|
||||
],
|
||||
"text/html": "<div>\n<style scoped>\n .dataframe tbody tr th:only-of-type {\n vertical-align: middle;\n }\n\n .dataframe tbody tr th {\n vertical-align: top;\n }\n\n .dataframe thead th {\n text-align: right;\n }\n</style>\n<table border=\"1\" class=\"dataframe\">\n <thead>\n <tr style=\"text-align: right;\">\n <th></th>\n <th>Wk</th>\n <th>Day</th>\n <th>Date</th>\n <th>Time</th>\n <th>Home</th>\n <th>Score</th>\n <th>Away</th>\n <th>Attendance</th>\n <th>Venue</th>\n <th>Referee</th>\n <th>Match Report</th>\n <th>Notes</th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <th>0</th>\n <td>1.0</td>\n <td>Fri</td>\n <td>2020-08-21</td>\n <td>18:00</td>\n <td>Zagłębie Lubin</td>\n <td>2–1</td>\n <td>Lech Poznań</td>\n <td>3968.0</td>\n <td>Stadion Zagłębia Lubin</td>\n <td>Bartosz Frankowski</td>\n <td>Match Report</td>\n <td>NaN</td>\n </tr>\n <tr>\n <th>1</th>\n <td>1.0</td>\n <td>Sat</td>\n <td>2020-08-22</td>\n <td>15:00</td>\n <td>Cracovia</td>\n <td>2–1</td>\n <td>Pogoń Szczecin</td>\n <td>4053.0</td>\n <td>Stadion Cracovii</td>\n <td>Paweł Raczkowski</td>\n <td>Match Report</td>\n <td>NaN</td>\n </tr>\n <tr>\n <th>2</th>\n <td>1.0</td>\n <td>Sat</td>\n <td>2020-08-22</td>\n <td>17:30</td>\n <td>Śląsk Wrocław</td>\n <td>2–0</td>\n <td>Piast Gliwice</td>\n <td>5259.0</td>\n <td>Stadion Miejski</td>\n <td>Wojciech Myć</td>\n <td>Match Report</td>\n <td>NaN</td>\n </tr>\n <tr>\n <th>3</th>\n <td>1.0</td>\n <td>Sat</td>\n <td>2020-08-22</td>\n <td>20:00</td>\n <td>RKS Raków</td>\n <td>1–2</td>\n <td>Legia Warsaw</td>\n <td>1985.0</td>\n <td>Stadion GKS-u</td>\n <td>Jarosław Przybył</td>\n <td>Match Report</td>\n <td>NaN</td>\n </tr>\n <tr>\n <th>4</th>\n <td>1.0</td>\n <td>Sun</td>\n <td>2020-08-23</td>\n <td>12:30</td>\n <td>Wisła Płock</td>\n <td>1–1</td>\n <td>Stal Mielec</td>\n <td>1318.0</td>\n <td>Stadion im. Kazimierza Górskiego</td>\n <td>Sebastian Jarzębak</td>\n <td>Match Report</td>\n <td>NaN</td>\n </tr>\n <tr>\n <th>...</th>\n <td>...</td>\n <td>...</td>\n <td>...</td>\n <td>...</td>\n <td>...</td>\n <td>...</td>\n <td>...</td>\n <td>...</td>\n <td>...</td>\n <td>...</td>\n <td>...</td>\n <td>...</td>\n </tr>\n <tr>\n <th>275</th>\n <td>30.0</td>\n <td>Sun</td>\n <td>2021-05-16</td>\n <td>17:30</td>\n <td>Pogoń Szczecin</td>\n <td>1–3</td>\n <td>RKS Raków</td>\n <td>NaN</td>\n <td>Stadion Miejski im. Floriana Krygiera</td>\n <td>Sebastian Krasny</td>\n <td>Match Report</td>\n <td>NaN</td>\n </tr>\n <tr>\n <th>276</th>\n <td>30.0</td>\n <td>Sun</td>\n <td>2021-05-16</td>\n <td>17:30</td>\n <td>Piast Gliwice</td>\n <td>2–3</td>\n <td>Wisła Kraków</td>\n <td>NaN</td>\n <td>Stadion Miejski</td>\n <td>Mariusz Zlotek</td>\n <td>Match Report</td>\n <td>NaN</td>\n </tr>\n <tr>\n <th>277</th>\n <td>30.0</td>\n <td>Sun</td>\n <td>2021-05-16</td>\n <td>17:30</td>\n <td>Cracovia</td>\n <td>0–1</td>\n <td>Warta Poznań</td>\n <td>3670.0</td>\n <td>Stadion Cracovii</td>\n <td>Pawel Malec</td>\n <td>Match Report</td>\n <td>NaN</td>\n </tr>\n <tr>\n <th>278</th>\n <td>30.0</td>\n <td>Sun</td>\n <td>2021-05-16</td>\n <td>17:30</td>\n <td>Śląsk Wrocław</td>\n <td>1–1</td>\n <td>Stal Mielec</td>\n <td>NaN</td>\n <td>Stadion Miejski</td>\n <td>Tomasz Kwiatkowski</td>\n <td>Match Report</td>\n <td>NaN</td>\n </tr>\n <tr>\n <th>279</th>\n <td>30.0</td>\n <td>Sun</td>\n <td>2021-05-16</td>\n <td>17:30</td>\n <td>Wisła Płock</td>\n <td>4–0</td>\n <td>Zagłębie Lubin</td>\n <td>NaN</td>\n <td>Stadion im. Kazimierza Górskiego</td>\n <td>Paweł Raczkowski</td>\n <td>Match Report</td>\n <td>NaN</td>\n </tr>\n </tbody>\n</table>\n<p>280 rows × 12 columns</p>\n</div>"
|
||||
]
|
||||
},
|
||||
"execution_count": 2,
|
||||
"metadata": {},
|
||||
"execution_count": 90
|
||||
"output_type": "execute_result"
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
@ -99,18 +276,18 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 91,
|
||||
"execution_count": 3,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"output_type": "execute_result",
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"45"
|
||||
]
|
||||
},
|
||||
"execution_count": 3,
|
||||
"metadata": {},
|
||||
"execution_count": 91
|
||||
"output_type": "execute_result"
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
@ -123,7 +300,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 85,
|
||||
"execution_count": 5,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
@ -165,14 +342,14 @@
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"output_type": "execute_result",
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"'2020-08-21'"
|
||||
]
|
||||
},
|
||||
"execution_count": 6,
|
||||
"metadata": {},
|
||||
"execution_count": 6
|
||||
"output_type": "execute_result"
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
@ -181,61 +358,66 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 25,
|
||||
"execution_count": 9,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"output_type": "stream",
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"WARNING: pip is being invoked by an old script wrapper. This will fail in a future version of pip.\n",
|
||||
"Please see https://github.com/pypa/pip/issues/5599 for advice on fixing the underlying issue.\n",
|
||||
"To avoid this problem you can invoke Python with '-m pip' instead of running pip directly.\n",
|
||||
"Defaulting to user installation because normal site-packages is not writeable\n",
|
||||
"Collecting wolframalpha\n",
|
||||
" Downloading wolframalpha-5.0.0-py3-none-any.whl (7.5 kB)\n",
|
||||
"Collecting xmltodict\n",
|
||||
" Downloading xmltodict-0.13.0-py2.py3-none-any.whl (10.0 kB)\n",
|
||||
"Requirement already satisfied: more-itertools in /usr/lib/python3/dist-packages (from wolframalpha) (4.2.0)\n",
|
||||
"Collecting jaraco.context\n",
|
||||
" Downloading jaraco.context-4.1.2-py3-none-any.whl (4.7 kB)\n",
|
||||
"Installing collected packages: xmltodict, jaraco.context, wolframalpha\n",
|
||||
"Successfully installed jaraco.context-4.1.2 wolframalpha-5.0.0 xmltodict-0.13.0\n",
|
||||
"\u001b[33mWARNING: You are using pip version 21.2.4; however, version 22.3 is available.\n",
|
||||
"You should consider upgrading via the '/usr/bin/python3 -m pip install --upgrade pip' command.\u001b[0m\n"
|
||||
"Requirement already satisfied: xmltodict in /home/mikolaj/.local/lib/python3.8/site-packages (from wolframalpha) (0.12.0)\n",
|
||||
"Collecting more-itertools\n",
|
||||
" Downloading more_itertools-8.14.0-py3-none-any.whl (52 kB)\n",
|
||||
"\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m52.2/52.2 kB\u001b[0m \u001b[31m1.3 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
|
||||
"\u001b[?25hInstalling collected packages: more-itertools, jaraco.context, wolframalpha\n",
|
||||
"Successfully installed jaraco.context-4.1.2 more-itertools-8.14.0 wolframalpha-5.0.0\n",
|
||||
"\n",
|
||||
"\u001b[1m[\u001b[0m\u001b[34;49mnotice\u001b[0m\u001b[1;39;49m]\u001b[0m\u001b[39;49m A new release of pip available: \u001b[0m\u001b[31;49m22.2.2\u001b[0m\u001b[39;49m -> \u001b[0m\u001b[32;49m22.3\u001b[0m\n",
|
||||
"\u001b[1m[\u001b[0m\u001b[34;49mnotice\u001b[0m\u001b[1;39;49m]\u001b[0m\u001b[39;49m To update, run: \u001b[0m\u001b[32;49mpip install --upgrade pip\u001b[0m\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"!pip install wolframalpha"
|
||||
"!pip3 install wolframalpha"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 11,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"import wolframalpha"
|
||||
],
|
||||
"cell_type": "code",
|
||||
"metadata": {},
|
||||
"execution_count": 26,
|
||||
"outputs": []
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 64,
|
||||
"execution_count": 12,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"output_type": "execute_result",
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"'7'"
|
||||
"'23'"
|
||||
]
|
||||
},
|
||||
"execution_count": 12,
|
||||
"metadata": {},
|
||||
"execution_count": 64
|
||||
"output_type": "execute_result"
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"import time\n",
|
||||
"import re\n",
|
||||
"def check_weather(date: str, city: str = 'Warsaw'):\n",
|
||||
"def check_weather(date: str, city: str = 'Warsaw') -> int:\n",
|
||||
" api_id = '5KAEPX-EXX246XAW7'\n",
|
||||
" question = 'Weather ' + date + ' ' + city\n",
|
||||
" client = wolframalpha.Client(api_id)\n",
|
||||
@ -243,13 +425,14 @@
|
||||
" res = client.query(question)\n",
|
||||
" a = str(res)\n",
|
||||
" result = re.findall(r'average: \\d+ °C', a)[0]\n",
|
||||
" return re.search(r'\\d+', result).group()\n",
|
||||
" temp = re.search(r'\\d+', result).group()\n",
|
||||
" return int(temp)\n",
|
||||
"check_weather('2020-08-22')"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 86,
|
||||
"execution_count": 13,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
@ -268,9 +451,20 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 98,
|
||||
"execution_count": 24,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"outputs": [
|
||||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"['14', '17', '17', '18', '14', '14']"
|
||||
]
|
||||
},
|
||||
"execution_count": 24,
|
||||
"metadata": {},
|
||||
"output_type": "execute_result"
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"final_data = np.array([])\n",
|
||||
"days_num = []\n",
|
||||
@ -282,19 +476,70 @@
|
||||
"is_away_top = []\n",
|
||||
"for d in scores_data['Away']:\n",
|
||||
" is_away_top.append(int(d in win_table_20))\n",
|
||||
" \n",
|
||||
"\n",
|
||||
"weather = []\n",
|
||||
"for d in scores_data['Date']:\n",
|
||||
" \n",
|
||||
" is_away_top.append(int(d in win_table_20))"
|
||||
"for d in scores_data['Date'][-6:]:\n",
|
||||
" temp = check_weather(d)\n",
|
||||
" weather.append(temp)\n",
|
||||
"attendedce = [x for x in scores_data['Attendance']]\n",
|
||||
"weather"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"execution_count": 25,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": []
|
||||
"source": [
|
||||
"weather = ['23', '23', '23', '23', '20', '20', '20', '19', '17', '17', '18', '18', '18', '17', '17', '17', '14', '14', '16', '16', '16', '17', '17', '18', '12', '12', '12', '12', '12', '13', '13', '15', '19', '19', '19', '19', '19', '11', '14', '14', '17', '17', '18', '14', '14']"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 26,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"(45, 45)"
|
||||
]
|
||||
},
|
||||
"execution_count": 26,
|
||||
"metadata": {},
|
||||
"output_type": "execute_result"
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"len(weather), len(scores_data['Date'])"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
"kernelspec": {
|
||||
"display_name": "Python 3.8.10 64-bit",
|
||||
"metadata": {
|
||||
"interpreter": {
|
||||
"hash": "767d51c1340bd893661ea55ea3124f6de3c7a262a8b4abca0554b478b1e2ff90"
|
||||
}
|
||||
},
|
||||
"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.8.10-final"
|
||||
},
|
||||
"orig_nbformat": 2
|
||||
},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 2
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user