Skip to content

Commit 2ed81b7

Browse files
revise examples
1 parent f37c104 commit 2ed81b7

File tree

1 file changed

+44
-45
lines changed

1 file changed

+44
-45
lines changed

examples/Stock_NeurIPS2018_SB3.ipynb

+44-45
Original file line numberDiff line numberDiff line change
@@ -168,62 +168,63 @@
168168
" Cloning https://github.com/AI4Finance-Foundation/FinRL.git to /tmp/pip-req-build-flt95p98\n",
169169
" Running command git clone --filter=blob:none --quiet https://github.com/AI4Finance-Foundation/FinRL.git /tmp/pip-req-build-flt95p98\n",
170170
" Resolved https://github.com/AI4Finance-Foundation/FinRL.git to commit ef471fcea1f3667442f5ecbf7b4c214610a5dd55\n",
171-
" Installing build dependencies ... \u001b[?25ldone\n",
172-
"\u001b[?25h Getting requirements to build wheel ... \u001b[?25ldone\n",
173-
"\u001b[?25h Preparing metadata (pyproject.toml) ... \u001b[?25ldone\n",
174-
"\u001b[?25hCollecting elegantrl@ git+https://github.com/AI4Finance-Foundation/ElegantRL.git (from finrl==0.3.6)\n",
171+
" Installing build dependencies ... \u001B[?25ldone\n",
172+
"\u001B[?25h Getting requirements to build wheel ... \u001B[?25ldone\n",
173+
"\u001B[?25h Preparing metadata (pyproject.toml) ... \u001B[?25ldone\n",
174+
"\u001B[?25hCollecting elegantrl@ git+https://github.com/AI4Finance-Foundation/ElegantRL.git (from finrl==0.3.6)\n",
175175
" Cloning https://github.com/AI4Finance-Foundation/ElegantRL.git to /tmp/pip-install-u43l6ss9/elegantrl_36782baa6d82461e89b600dda61820c8\n",
176176
" Running command git clone --filter=blob:none --quiet https://github.com/AI4Finance-Foundation/ElegantRL.git /tmp/pip-install-u43l6ss9/elegantrl_36782baa6d82461e89b600dda61820c8\n",
177177
" Resolved https://github.com/AI4Finance-Foundation/ElegantRL.git to commit 59d9a33e2b3ba2d77c052c2810bb61059736d88c\n",
178-
" Preparing metadata (setup.py) ... \u001b[?25ldone\n",
179-
"\u001b[?25hRequirement already satisfied: alpaca-trade-api<4,>=3 in /home/random/.local/lib/python3.12/site-packages (from finrl==0.3.6) (3.2.0)\n",
178+
" Preparing metadata (setup.py) ... \u001B[?25ldone\n",
179+
"\u001B[?25hRequirement already satisfied: alpaca-trade-api<4,>=3 in /home/random/.local/lib/python3.12/site-packages (from finrl==0.3.6) (3.2.0)\n",
180180
"Collecting ccxt<4,>=3 (from finrl==0.3.6)\n",
181181
" Using cached ccxt-3.1.60-py2.py3-none-any.whl.metadata (108 kB)\n",
182182
"Requirement already satisfied: exchange-calendars<5,>=4 in /home/random/.local/lib/python3.12/site-packages (from finrl==0.3.6) (4.6)\n",
183183
"Collecting jqdatasdk<2,>=1 (from finrl==0.3.6)\n",
184184
" Using cached jqdatasdk-1.9.7-py3-none-any.whl.metadata (5.8 kB)\n",
185185
"Collecting pyfolio<0.10,>=0.9 (from finrl==0.3.6)\n",
186186
" Using cached pyfolio-0.9.2.tar.gz (91 kB)\n",
187-
" Preparing metadata (setup.py) ... \u001b[?25lerror\n",
188-
" \u001b[1;31merror\u001b[0m: \u001b[1msubprocess-exited-with-error\u001b[0m\n",
187+
" Preparing metadata (setup.py) ... \u001B[?25lerror\n",
188+
" \u001B[1;31merror\u001B[0m: \u001B[1msubprocess-exited-with-error\u001B[0m\n",
189189
" \n",
190-
" \u001b[31m×\u001b[0m \u001b[32mpython setup.py egg_info\u001b[0m did not run successfully.\n",
191-
" \u001b[31m│\u001b[0m exit code: \u001b[1;36m1\u001b[0m\n",
192-
" \u001b[31m╰─>\u001b[0m \u001b[31m[18 lines of output]\u001b[0m\n",
193-
" \u001b[31m \u001b[0m /tmp/pip-install-u43l6ss9/pyfolio_f61a15f976d345b4a7050d0999ff9c7b/versioneer.py:468: SyntaxWarning: invalid escape sequence '\\s'\n",
194-
" \u001b[31m \u001b[0m LONG_VERSION_PY['git'] = '''\n",
195-
" \u001b[31m \u001b[0m Traceback (most recent call last):\n",
196-
" \u001b[31m \u001b[0m File \"<string>\", line 2, in <module>\n",
197-
" \u001b[31m \u001b[0m File \"<pip-setuptools-caller>\", line 34, in <module>\n",
198-
" \u001b[31m \u001b[0m File \"/tmp/pip-install-u43l6ss9/pyfolio_f61a15f976d345b4a7050d0999ff9c7b/setup.py\", line 71, in <module>\n",
199-
" \u001b[31m \u001b[0m version=versioneer.get_version(),\n",
200-
" \u001b[31m \u001b[0m ^^^^^^^^^^^^^^^^^^^^^^^^\n",
201-
" \u001b[31m \u001b[0m File \"/tmp/pip-install-u43l6ss9/pyfolio_f61a15f976d345b4a7050d0999ff9c7b/versioneer.py\", line 1407, in get_version\n",
202-
" \u001b[31m \u001b[0m return get_versions()[\"version\"]\n",
203-
" \u001b[31m \u001b[0m ^^^^^^^^^^^^^^\n",
204-
" \u001b[31m \u001b[0m File \"/tmp/pip-install-u43l6ss9/pyfolio_f61a15f976d345b4a7050d0999ff9c7b/versioneer.py\", line 1341, in get_versions\n",
205-
" \u001b[31m \u001b[0m cfg = get_config_from_root(root)\n",
206-
" \u001b[31m \u001b[0m ^^^^^^^^^^^^^^^^^^^^^^^^^^\n",
207-
" \u001b[31m \u001b[0m File \"/tmp/pip-install-u43l6ss9/pyfolio_f61a15f976d345b4a7050d0999ff9c7b/versioneer.py\", line 399, in get_config_from_root\n",
208-
" \u001b[31m \u001b[0m parser = configparser.SafeConfigParser()\n",
209-
" \u001b[31m \u001b[0m ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n",
210-
" \u001b[31m \u001b[0m AttributeError: module 'configparser' has no attribute 'SafeConfigParser'. Did you mean: 'RawConfigParser'?\n",
211-
" \u001b[31m \u001b[0m \u001b[31m[end of output]\u001b[0m\n",
190+
" \u001B[31m×\u001B[0m \u001B[32mpython setup.py egg_info\u001B[0m did not run successfully.\n",
191+
" \u001B[31m│\u001B[0m exit code: \u001B[1;36m1\u001B[0m\n",
192+
" \u001B[31m╰─>\u001B[0m \u001B[31m[18 lines of output]\u001B[0m\n",
193+
" \u001B[31m \u001B[0m /tmp/pip-install-u43l6ss9/pyfolio_f61a15f976d345b4a7050d0999ff9c7b/versioneer.py:468: SyntaxWarning: invalid escape sequence '\\s'\n",
194+
" \u001B[31m \u001B[0m LONG_VERSION_PY['git'] = '''\n",
195+
" \u001B[31m \u001B[0m Traceback (most recent call last):\n",
196+
" \u001B[31m \u001B[0m File \"<string>\", line 2, in <module>\n",
197+
" \u001B[31m \u001B[0m File \"<pip-setuptools-caller>\", line 34, in <module>\n",
198+
" \u001B[31m \u001B[0m File \"/tmp/pip-install-u43l6ss9/pyfolio_f61a15f976d345b4a7050d0999ff9c7b/setup.py\", line 71, in <module>\n",
199+
" \u001B[31m \u001B[0m version=versioneer.get_version(),\n",
200+
" \u001B[31m \u001B[0m ^^^^^^^^^^^^^^^^^^^^^^^^\n",
201+
" \u001B[31m \u001B[0m File \"/tmp/pip-install-u43l6ss9/pyfolio_f61a15f976d345b4a7050d0999ff9c7b/versioneer.py\", line 1407, in get_version\n",
202+
" \u001B[31m \u001B[0m return get_versions()[\"version\"]\n",
203+
" \u001B[31m \u001B[0m ^^^^^^^^^^^^^^\n",
204+
" \u001B[31m \u001B[0m File \"/tmp/pip-install-u43l6ss9/pyfolio_f61a15f976d345b4a7050d0999ff9c7b/versioneer.py\", line 1341, in get_versions\n",
205+
" \u001B[31m \u001B[0m cfg = get_config_from_root(root)\n",
206+
" \u001B[31m \u001B[0m ^^^^^^^^^^^^^^^^^^^^^^^^^^\n",
207+
" \u001B[31m \u001B[0m File \"/tmp/pip-install-u43l6ss9/pyfolio_f61a15f976d345b4a7050d0999ff9c7b/versioneer.py\", line 399, in get_config_from_root\n",
208+
" \u001B[31m \u001B[0m parser = configparser.SafeConfigParser()\n",
209+
" \u001B[31m \u001B[0m ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n",
210+
" \u001B[31m \u001B[0m AttributeError: module 'configparser' has no attribute 'SafeConfigParser'. Did you mean: 'RawConfigParser'?\n",
211+
" \u001B[31m \u001B[0m \u001B[31m[end of output]\u001B[0m\n",
212212
" \n",
213-
" \u001b[1;35mnote\u001b[0m: This error originates from a subprocess, and is likely not a problem with pip.\n",
214-
"\u001b[1;31merror\u001b[0m: \u001b[1mmetadata-generation-failed\u001b[0m\n",
213+
" \u001B[1;35mnote\u001B[0m: This error originates from a subprocess, and is likely not a problem with pip.\n",
214+
"\u001B[1;31merror\u001B[0m: \u001B[1mmetadata-generation-failed\u001B[0m\n",
215215
"\n",
216-
"\u001b[31m×\u001b[0m Encountered error while generating package metadata.\n",
217-
"\u001b[31m╰─>\u001b[0m See above for output.\n",
216+
"\u001B[31m×\u001B[0m Encountered error while generating package metadata.\n",
217+
"\u001B[31m╰─>\u001B[0m See above for output.\n",
218218
"\n",
219-
"\u001b[1;35mnote\u001b[0m: This is an issue with the package mentioned above, not pip.\n",
220-
"\u001b[1;36mhint\u001b[0m: See above for details.\n",
221-
"\u001b[?25h"
219+
"\u001B[1;35mnote\u001B[0m: This is an issue with the package mentioned above, not pip.\n",
220+
"\u001B[1;36mhint\u001B[0m: See above for details.\n",
221+
"\u001B[?25h"
222222
]
223223
}
224224
],
225225
"source": [
226226
"## install required packages\n",
227+
"\n",
227228
"!pip install swig\n",
228229
"!pip install wrds\n",
229230
"!pip install pyportfolioopt\n",
@@ -298,8 +299,6 @@
298299
"import matplotlib\n",
299300
"import matplotlib.pyplot as plt\n",
300301
"# matplotlib.use('Agg')\n",
301-
"import datetime\n",
302-
"\n",
303302
"%matplotlib inline\n",
304303
"\n",
305304
"from finrl.meta.preprocessor.yahoodownloader import YahooDownloader\n",
@@ -595,12 +594,12 @@
595594
"evalue": "'date'",
596595
"output_type": "error",
597596
"traceback": [
598-
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
599-
"\u001b[0;31mKeyError\u001b[0m Traceback (most recent call last)",
600-
"\u001b[0;32m/tmp/ipykernel_24692/1255811168.py\u001b[0m in \u001b[0;36m?\u001b[0;34m()\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0mdf\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0msort_values\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;34m'date'\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m'tic'\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0mignore_index\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;32mTrue\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mhead\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m",
601-
"\u001b[0;32m~/.local/lib/python3.12/site-packages/pandas/core/frame.py\u001b[0m in \u001b[0;36m?\u001b[0;34m(self, by, axis, ascending, inplace, kind, na_position, ignore_index, key)\u001b[0m\n\u001b[1;32m 7168\u001b[0m \u001b[0;34mf\"\u001b[0m\u001b[0;34mLength of ascending (\u001b[0m\u001b[0;34m{\u001b[0m\u001b[0mlen\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mascending\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m}\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\"\u001b[0m \u001b[0;31m# type: ignore[arg-type]\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 7169\u001b[0m \u001b[0;34mf\"\u001b[0m\u001b[0;34m != length of by (\u001b[0m\u001b[0;34m{\u001b[0m\u001b[0mlen\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mby\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m}\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\"\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 7170\u001b[0m \u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 7171\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mlen\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mby\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;34m>\u001b[0m \u001b[0;36m1\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 7172\u001b[0;31m \u001b[0mkeys\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m[\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_get_label_or_level_values\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mx\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0maxis\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0maxis\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;32mfor\u001b[0m \u001b[0mx\u001b[0m \u001b[0;32min\u001b[0m \u001b[0mby\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 7173\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 7174\u001b[0m \u001b[0;31m# need to rewrap columns in Series to apply key function\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 7175\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mkey\u001b[0m \u001b[0;32mis\u001b[0m \u001b[0;32mnot\u001b[0m \u001b[0;32mNone\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
602-
"\u001b[0;32m~/.local/lib/python3.12/site-packages/pandas/core/generic.py\u001b[0m in \u001b[0;36m?\u001b[0;34m(self, key, axis)\u001b[0m\n\u001b[1;32m 1907\u001b[0m \u001b[0mvalues\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mxs\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mkey\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0maxis\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mother_axes\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;36m0\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_values\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 1908\u001b[0m \u001b[0;32melif\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_is_level_reference\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mkey\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0maxis\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0maxis\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 1909\u001b[0m \u001b[0mvalues\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0maxes\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0maxis\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mget_level_values\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mkey\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_values\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 1910\u001b[0m \u001b[0;32melse\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 1911\u001b[0;31m \u001b[0;32mraise\u001b[0m \u001b[0mKeyError\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mkey\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 1912\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 1913\u001b[0m \u001b[0;31m# Check for duplicates\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 1914\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mvalues\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mndim\u001b[0m \u001b[0;34m>\u001b[0m \u001b[0;36m1\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
603-
"\u001b[0;31mKeyError\u001b[0m: 'date'"
597+
"\u001B[0;31m---------------------------------------------------------------------------\u001B[0m",
598+
"\u001B[0;31mKeyError\u001B[0m Traceback (most recent call last)",
599+
"\u001B[0;32m/tmp/ipykernel_24692/1255811168.py\u001B[0m in \u001B[0;36m?\u001B[0;34m()\u001B[0m\n\u001B[0;32m----> 1\u001B[0;31m \u001B[0mdf\u001B[0m\u001B[0;34m.\u001B[0m\u001B[0msort_values\u001B[0m\u001B[0;34m(\u001B[0m\u001B[0;34m[\u001B[0m\u001B[0;34m'date'\u001B[0m\u001B[0;34m,\u001B[0m\u001B[0;34m'tic'\u001B[0m\u001B[0;34m]\u001B[0m\u001B[0;34m,\u001B[0m\u001B[0mignore_index\u001B[0m\u001B[0;34m=\u001B[0m\u001B[0;32mTrue\u001B[0m\u001B[0;34m)\u001B[0m\u001B[0;34m.\u001B[0m\u001B[0mhead\u001B[0m\u001B[0;34m(\u001B[0m\u001B[0;34m)\u001B[0m\u001B[0;34m\u001B[0m\u001B[0;34m\u001B[0m\u001B[0m\n\u001B[0m",
600+
"\u001B[0;32m~/.local/lib/python3.12/site-packages/pandas/core/frame.py\u001B[0m in \u001B[0;36m?\u001B[0;34m(self, by, axis, ascending, inplace, kind, na_position, ignore_index, key)\u001B[0m\n\u001B[1;32m 7168\u001B[0m \u001B[0;34mf\"\u001B[0m\u001B[0;34mLength of ascending (\u001B[0m\u001B[0;34m{\u001B[0m\u001B[0mlen\u001B[0m\u001B[0;34m(\u001B[0m\u001B[0mascending\u001B[0m\u001B[0;34m)\u001B[0m\u001B[0;34m}\u001B[0m\u001B[0;34m)\u001B[0m\u001B[0;34m\"\u001B[0m \u001B[0;31m# type: ignore[arg-type]\u001B[0m\u001B[0;34m\u001B[0m\u001B[0;34m\u001B[0m\u001B[0m\n\u001B[1;32m 7169\u001B[0m \u001B[0;34mf\"\u001B[0m\u001B[0;34m != length of by (\u001B[0m\u001B[0;34m{\u001B[0m\u001B[0mlen\u001B[0m\u001B[0;34m(\u001B[0m\u001B[0mby\u001B[0m\u001B[0;34m)\u001B[0m\u001B[0;34m}\u001B[0m\u001B[0;34m)\u001B[0m\u001B[0;34m\"\u001B[0m\u001B[0;34m\u001B[0m\u001B[0;34m\u001B[0m\u001B[0m\n\u001B[1;32m 7170\u001B[0m \u001B[0;34m)\u001B[0m\u001B[0;34m\u001B[0m\u001B[0;34m\u001B[0m\u001B[0m\n\u001B[1;32m 7171\u001B[0m \u001B[0;32mif\u001B[0m \u001B[0mlen\u001B[0m\u001B[0;34m(\u001B[0m\u001B[0mby\u001B[0m\u001B[0;34m)\u001B[0m \u001B[0;34m>\u001B[0m \u001B[0;36m1\u001B[0m\u001B[0;34m:\u001B[0m\u001B[0;34m\u001B[0m\u001B[0;34m\u001B[0m\u001B[0m\n\u001B[0;32m-> 7172\u001B[0;31m \u001B[0mkeys\u001B[0m \u001B[0;34m=\u001B[0m \u001B[0;34m[\u001B[0m\u001B[0mself\u001B[0m\u001B[0;34m.\u001B[0m\u001B[0m_get_label_or_level_values\u001B[0m\u001B[0;34m(\u001B[0m\u001B[0mx\u001B[0m\u001B[0;34m,\u001B[0m \u001B[0maxis\u001B[0m\u001B[0;34m=\u001B[0m\u001B[0maxis\u001B[0m\u001B[0;34m)\u001B[0m \u001B[0;32mfor\u001B[0m \u001B[0mx\u001B[0m \u001B[0;32min\u001B[0m \u001B[0mby\u001B[0m\u001B[0;34m]\u001B[0m\u001B[0;34m\u001B[0m\u001B[0;34m\u001B[0m\u001B[0m\n\u001B[0m\u001B[1;32m 7173\u001B[0m \u001B[0;34m\u001B[0m\u001B[0m\n\u001B[1;32m 7174\u001B[0m \u001B[0;31m# need to rewrap columns in Series to apply key function\u001B[0m\u001B[0;34m\u001B[0m\u001B[0;34m\u001B[0m\u001B[0m\n\u001B[1;32m 7175\u001B[0m \u001B[0;32mif\u001B[0m \u001B[0mkey\u001B[0m \u001B[0;32mis\u001B[0m \u001B[0;32mnot\u001B[0m \u001B[0;32mNone\u001B[0m\u001B[0;34m:\u001B[0m\u001B[0;34m\u001B[0m\u001B[0;34m\u001B[0m\u001B[0m\n",
601+
"\u001B[0;32m~/.local/lib/python3.12/site-packages/pandas/core/generic.py\u001B[0m in \u001B[0;36m?\u001B[0;34m(self, key, axis)\u001B[0m\n\u001B[1;32m 1907\u001B[0m \u001B[0mvalues\u001B[0m \u001B[0;34m=\u001B[0m \u001B[0mself\u001B[0m\u001B[0;34m.\u001B[0m\u001B[0mxs\u001B[0m\u001B[0;34m(\u001B[0m\u001B[0mkey\u001B[0m\u001B[0;34m,\u001B[0m \u001B[0maxis\u001B[0m\u001B[0;34m=\u001B[0m\u001B[0mother_axes\u001B[0m\u001B[0;34m[\u001B[0m\u001B[0;36m0\u001B[0m\u001B[0;34m]\u001B[0m\u001B[0;34m)\u001B[0m\u001B[0;34m.\u001B[0m\u001B[0m_values\u001B[0m\u001B[0;34m\u001B[0m\u001B[0;34m\u001B[0m\u001B[0m\n\u001B[1;32m 1908\u001B[0m \u001B[0;32melif\u001B[0m \u001B[0mself\u001B[0m\u001B[0;34m.\u001B[0m\u001B[0m_is_level_reference\u001B[0m\u001B[0;34m(\u001B[0m\u001B[0mkey\u001B[0m\u001B[0;34m,\u001B[0m \u001B[0maxis\u001B[0m\u001B[0;34m=\u001B[0m\u001B[0maxis\u001B[0m\u001B[0;34m)\u001B[0m\u001B[0;34m:\u001B[0m\u001B[0;34m\u001B[0m\u001B[0;34m\u001B[0m\u001B[0m\n\u001B[1;32m 1909\u001B[0m \u001B[0mvalues\u001B[0m \u001B[0;34m=\u001B[0m \u001B[0mself\u001B[0m\u001B[0;34m.\u001B[0m\u001B[0maxes\u001B[0m\u001B[0;34m[\u001B[0m\u001B[0maxis\u001B[0m\u001B[0;34m]\u001B[0m\u001B[0;34m.\u001B[0m\u001B[0mget_level_values\u001B[0m\u001B[0;34m(\u001B[0m\u001B[0mkey\u001B[0m\u001B[0;34m)\u001B[0m\u001B[0;34m.\u001B[0m\u001B[0m_values\u001B[0m\u001B[0;34m\u001B[0m\u001B[0;34m\u001B[0m\u001B[0m\n\u001B[1;32m 1910\u001B[0m \u001B[0;32melse\u001B[0m\u001B[0;34m:\u001B[0m\u001B[0;34m\u001B[0m\u001B[0;34m\u001B[0m\u001B[0m\n\u001B[0;32m-> 1911\u001B[0;31m \u001B[0;32mraise\u001B[0m \u001B[0mKeyError\u001B[0m\u001B[0;34m(\u001B[0m\u001B[0mkey\u001B[0m\u001B[0;34m)\u001B[0m\u001B[0;34m\u001B[0m\u001B[0;34m\u001B[0m\u001B[0m\n\u001B[0m\u001B[1;32m 1912\u001B[0m \u001B[0;34m\u001B[0m\u001B[0m\n\u001B[1;32m 1913\u001B[0m \u001B[0;31m# Check for duplicates\u001B[0m\u001B[0;34m\u001B[0m\u001B[0;34m\u001B[0m\u001B[0m\n\u001B[1;32m 1914\u001B[0m \u001B[0;32mif\u001B[0m \u001B[0mvalues\u001B[0m\u001B[0;34m.\u001B[0m\u001B[0mndim\u001B[0m \u001B[0;34m>\u001B[0m \u001B[0;36m1\u001B[0m\u001B[0;34m:\u001B[0m\u001B[0;34m\u001B[0m\u001B[0;34m\u001B[0m\u001B[0m\n",
602+
"\u001B[0;31mKeyError\u001B[0m: 'date'"
604603
]
605604
}
606605
],

0 commit comments

Comments
 (0)