From 81be11997de798350bc846aa27545ee4c6a28bae Mon Sep 17 00:00:00 2001 From: Marcus Read Date: Tue, 25 Jun 2024 18:11:05 +0100 Subject: [PATCH] Update deps --- .github/workflows/draft-release-notes.yml | 2 +- etc/requirements.txt | 72 +++--- .../requirements_tests.txt | 86 +++---- etc/requirements_dev.txt | 213 ++++++++++-------- tests/test_analysis.py | 6 +- 5 files changed, 197 insertions(+), 182 deletions(-) diff --git a/.github/workflows/draft-release-notes.yml b/.github/workflows/draft-release-notes.yml index 739280f..057b29f 100644 --- a/.github/workflows/draft-release-notes.yml +++ b/.github/workflows/draft-release-notes.yml @@ -11,6 +11,6 @@ jobs: update_release_draft: runs-on: ubuntu-latest steps: - - uses: release-drafter/release-drafter@v5 + - uses: release-drafter/release-drafter@v6 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/etc/requirements.txt b/etc/requirements.txt index 4c4fb20..873c35c 100644 --- a/etc/requirements.txt +++ b/etc/requirements.txt @@ -8,9 +8,9 @@ asttokens==2.4.1 # via stack-data beautifulsoup4==4.12.3 # via yahooquery -bqplot==0.12.42 +bqplot==0.12.43 # via market_analy (pyproject.toml) -certifi==2024.2.2 +certifi==2024.6.2 # via requests charset-normalizer==3.3.2 # via requests @@ -18,44 +18,44 @@ colorama==0.4.6 # via # ipython # tqdm -comm==0.2.1 +comm==0.2.2 # via ipywidgets -contourpy==1.2.0 +contourpy==1.2.1 # via matplotlib cycler==0.12.1 # via matplotlib decorator==5.1.1 # via ipython -exceptiongroup==1.2.0 +exceptiongroup==1.2.1 # via ipython -exchange-calendars==4.5.2 +exchange-calendars==4.5.5 # via # market-prices # market_analy (pyproject.toml) executing==2.0.1 # via stack-data -fonttools==4.47.2 +fonttools==4.53.0 # via matplotlib -idna==3.6 +idna==3.7 # via requests -importlib-resources==6.1.1 +importlib-resources==6.4.0 # via matplotlib ipython==8.18.1 # via ipywidgets -ipyvue==1.10.1 +ipyvue==1.11.1 # via ipyvuetify -ipyvuetify==1.8.10 +ipyvuetify==1.9.4 # via market_analy (pyproject.toml) -ipywidgets==8.1.1 +ipywidgets==8.1.3 # via # bqplot # ipyvue # market_analy (pyproject.toml) jedi==0.19.1 # via ipython -jinja2==3.1.3 +jinja2==3.1.4 # via market_analy (pyproject.toml) -jupyterlab-widgets==3.0.9 +jupyterlab-widgets==3.0.11 # via ipywidgets kiwisolver==1.4.5 # via matplotlib @@ -63,15 +63,15 @@ korean-lunar-calendar==0.3.1 # via exchange-calendars lxml==4.9.4 # via yahooquery -market-prices==0.12.1 +market-prices==0.12.3 # via market_analy (pyproject.toml) -markupsafe==2.1.4 +markupsafe==2.1.5 # via jinja2 -matplotlib==3.8.2 +matplotlib==3.9.0 # via market_analy (pyproject.toml) -matplotlib-inline==0.1.6 +matplotlib-inline==0.1.7 # via ipython -numpy==1.26.3 +numpy==1.26.4 # via # bqplot # contourpy @@ -80,36 +80,36 @@ numpy==1.26.3 # market_analy (pyproject.toml) # matplotlib # pandas -packaging==23.2 +packaging==24.1 # via matplotlib -pandas==2.2.0 +pandas==2.2.2 # via # bqplot # exchange-calendars # market-prices # market_analy (pyproject.toml) # yahooquery -parso==0.8.3 +parso==0.8.4 # via jedi -pillow==10.2.0 +pillow==10.3.0 # via matplotlib -prompt-toolkit==3.0.43 +prompt-toolkit==3.0.47 # via ipython pure-eval==0.2.2 # via stack-data -pygments==2.17.2 +pygments==2.18.0 # via ipython pyluach==2.2.0 # via exchange-calendars -pyparsing==3.1.1 +pyparsing==3.1.2 # via matplotlib -python-dateutil==2.8.2 +python-dateutil==2.9.0.post0 # via # matplotlib # pandas pytz==2024.1 # via pandas -requests==2.31.0 +requests==2.32.3 # via # requests-futures # yahooquery @@ -125,9 +125,9 @@ stack-data==0.6.3 # via ipython toolz==0.12.1 # via exchange-calendars -tqdm==4.66.1 +tqdm==4.66.4 # via yahooquery -traitlets==5.14.1 +traitlets==5.14.3 # via # bqplot # comm @@ -138,23 +138,23 @@ traitlets==5.14.1 # traittypes traittypes==0.2.1 # via bqplot -typing-extensions==4.9.0 +typing-extensions==4.12.2 # via ipython -tzdata==2023.4 +tzdata==2024.1 # via # exchange-calendars # market-prices # market_analy (pyproject.toml) # pandas -urllib3==2.2.0 +urllib3==2.2.2 # via requests -valimp==0.2 +valimp==0.3 # via market-prices wcwidth==0.2.13 # via prompt-toolkit -widgetsnbextension==4.0.9 +widgetsnbextension==4.0.11 # via ipywidgets yahooquery==2.3.7 # via market-prices -zipp==3.17.0 +zipp==3.19.2 # via importlib-resources diff --git a/etc/requirements_dependabot/requirements_tests.txt b/etc/requirements_dependabot/requirements_tests.txt index c81199d..e9f2948 100644 --- a/etc/requirements_dependabot/requirements_tests.txt +++ b/etc/requirements_dependabot/requirements_tests.txt @@ -8,11 +8,11 @@ asttokens==2.4.1 # via stack-data beautifulsoup4==4.12.3 # via yahooquery -black==24.1.1 +black==24.4.2 # via market_analy (pyproject.toml) -bqplot==0.12.42 +bqplot==0.12.43 # via market_analy (pyproject.toml) -certifi==2024.2.2 +certifi==2024.6.2 # via requests charset-normalizer==3.3.2 # via requests @@ -24,54 +24,54 @@ colorama==0.4.6 # ipython # pytest # tqdm -comm==0.2.1 +comm==0.2.2 # via ipywidgets -contourpy==1.2.0 +contourpy==1.2.1 # via matplotlib cycler==0.12.1 # via matplotlib decorator==5.1.1 # via ipython -exceptiongroup==1.2.0 +exceptiongroup==1.2.1 # via # ipython # pytest -exchange-calendars==4.5.2 +exchange-calendars==4.5.5 # via # market-prices # market_analy (pyproject.toml) executing==2.0.1 # via stack-data -flake8==7.0.0 +flake8==7.1.0 # via # flake8-docstrings # market_analy (pyproject.toml) flake8-docstrings==1.7.0 # via market_analy (pyproject.toml) -fonttools==4.47.2 +fonttools==4.53.0 # via matplotlib -idna==3.6 +idna==3.7 # via requests -importlib-resources==6.1.1 +importlib-resources==6.4.0 # via matplotlib iniconfig==2.0.0 # via pytest ipython==8.18.1 # via ipywidgets -ipyvue==1.10.1 +ipyvue==1.11.1 # via ipyvuetify -ipyvuetify==1.8.10 +ipyvuetify==1.9.4 # via market_analy (pyproject.toml) -ipywidgets==8.1.1 +ipywidgets==8.1.3 # via # bqplot # ipyvue # market_analy (pyproject.toml) jedi==0.19.1 # via ipython -jinja2==3.1.3 +jinja2==3.1.4 # via market_analy (pyproject.toml) -jupyterlab-widgets==3.0.9 +jupyterlab-widgets==3.0.11 # via ipywidgets kiwisolver==1.4.5 # via matplotlib @@ -79,19 +79,19 @@ korean-lunar-calendar==0.3.1 # via exchange-calendars lxml==4.9.4 # via yahooquery -market-prices==0.12.1 +market-prices==0.12.3 # via market_analy (pyproject.toml) -markupsafe==2.1.4 +markupsafe==2.1.5 # via jinja2 -matplotlib==3.8.2 +matplotlib==3.9.0 # via market_analy (pyproject.toml) -matplotlib-inline==0.1.6 +matplotlib-inline==0.1.7 # via ipython mccabe==0.7.0 # via flake8 mypy-extensions==1.0.0 # via black -numpy==1.26.3 +numpy==1.26.4 # via # bqplot # contourpy @@ -100,57 +100,57 @@ numpy==1.26.3 # market_analy (pyproject.toml) # matplotlib # pandas -packaging==23.2 +packaging==24.1 # via # black # matplotlib # pytest -pandas==2.2.0 +pandas==2.2.2 # via # bqplot # exchange-calendars # market-prices # market_analy (pyproject.toml) # yahooquery -parso==0.8.3 +parso==0.8.4 # via jedi pathspec==0.12.1 # via black -pillow==10.2.0 +pillow==10.3.0 # via matplotlib -platformdirs==4.2.0 +platformdirs==4.2.2 # via black -pluggy==1.4.0 +pluggy==1.5.0 # via pytest -prompt-toolkit==3.0.43 +prompt-toolkit==3.0.47 # via ipython pure-eval==0.2.2 # via stack-data -pycodestyle==2.11.1 +pycodestyle==2.12.0 # via flake8 pydocstyle==6.3.0 # via flake8-docstrings pyflakes==3.2.0 # via flake8 -pygments==2.17.2 +pygments==2.18.0 # via ipython pyluach==2.2.0 # via exchange-calendars -pyparsing==3.1.1 +pyparsing==3.1.2 # via matplotlib -pytest==8.0.0 +pytest==8.2.2 # via # market_analy (pyproject.toml) # pytest-mock -pytest-mock==3.12.0 +pytest-mock==3.14.0 # via market_analy (pyproject.toml) -python-dateutil==2.8.2 +python-dateutil==2.9.0.post0 # via # matplotlib # pandas pytz==2024.1 # via pandas -requests==2.31.0 +requests==2.32.3 # via # requests-futures # yahooquery @@ -172,9 +172,9 @@ tomli==2.0.1 # pytest toolz==0.12.1 # via exchange-calendars -tqdm==4.66.1 +tqdm==4.66.4 # via yahooquery -traitlets==5.14.1 +traitlets==5.14.3 # via # bqplot # comm @@ -185,25 +185,25 @@ traitlets==5.14.1 # traittypes traittypes==0.2.1 # via bqplot -typing-extensions==4.9.0 +typing-extensions==4.12.2 # via # black # ipython -tzdata==2023.4 +tzdata==2024.1 # via # exchange-calendars # market-prices # market_analy (pyproject.toml) # pandas -urllib3==2.2.0 +urllib3==2.2.2 # via requests -valimp==0.2 +valimp==0.3 # via market-prices wcwidth==0.2.13 # via prompt-toolkit -widgetsnbextension==4.0.9 +widgetsnbextension==4.0.11 # via ipywidgets yahooquery==2.3.7 # via market-prices -zipp==3.17.0 +zipp==3.19.2 # via importlib-resources diff --git a/etc/requirements_dev.txt b/etc/requirements_dev.txt index 033e26a..2b6388d 100644 --- a/etc/requirements_dev.txt +++ b/etc/requirements_dev.txt @@ -4,15 +4,17 @@ # # pip-compile --extra=dev --output-file=etc/requirements_dev.txt pyproject.toml # -anyio==4.2.0 - # via jupyter-server +anyio==4.4.0 + # via + # httpx + # jupyter-server argon2-cffi==23.1.0 # via jupyter-server argon2-cffi-bindings==21.2.0 # via argon2-cffi arrow==1.3.0 # via isoduration -astroid==3.0.2 +astroid==3.2.2 # via pylint asttokens==2.4.1 # via stack-data @@ -22,22 +24,25 @@ attrs==23.2.0 # via # jsonschema # referencing -babel==2.14.0 +babel==2.15.0 # via jupyterlab-server beautifulsoup4==4.12.3 # via # nbconvert # yahooquery -black==24.1.1 +black==24.4.2 # via market_analy (pyproject.toml) bleach==6.1.0 # via nbconvert -bqplot==0.12.42 +bqplot==0.12.43 # via market_analy (pyproject.toml) -build==1.0.3 +build==1.2.1 # via pip-tools -certifi==2024.2.2 - # via requests +certifi==2024.6.2 + # via + # httpcore + # httpx + # requests cffi==1.16.0 # via argon2-cffi-bindings cfgv==3.4.0 @@ -56,15 +61,15 @@ colorama==0.4.6 # pylint # pytest # tqdm -comm==0.2.1 +comm==0.2.2 # via # ipykernel # ipywidgets -contourpy==1.2.0 +contourpy==1.2.1 # via matplotlib cycler==0.12.1 # via matplotlib -debugpy==1.8.0 +debugpy==1.8.1 # via ipykernel decorator==5.1.1 # via ipython @@ -74,39 +79,46 @@ dill==0.3.8 # via pylint distlib==0.3.8 # via virtualenv -exceptiongroup==1.2.0 +exceptiongroup==1.2.1 # via # anyio # ipython # pytest -exchange-calendars==4.5.2 +exchange-calendars==4.5.5 # via # market-prices # market_analy (pyproject.toml) executing==2.0.1 # via stack-data -fastjsonschema==2.19.1 +fastjsonschema==2.20.0 # via nbformat -filelock==3.13.1 +filelock==3.15.4 # via virtualenv -flake8==7.0.0 +flake8==7.1.0 # via # flake8-docstrings # market_analy (pyproject.toml) flake8-docstrings==1.7.0 # via market_analy (pyproject.toml) -fonttools==4.47.2 +fonttools==4.53.0 # via matplotlib fqdn==1.5.1 # via jsonschema -identify==2.5.33 +h11==0.14.0 + # via httpcore +httpcore==1.0.5 + # via httpx +httpx==0.27.0 + # via jupyterlab +identify==2.5.36 # via pre-commit -idna==3.6 +idna==3.7 # via # anyio + # httpx # jsonschema # requests -importlib-metadata==7.0.1 +importlib-metadata==7.2.1 # via # build # jupyter-client @@ -114,21 +126,21 @@ importlib-metadata==7.0.1 # jupyterlab # jupyterlab-server # nbconvert -importlib-resources==6.1.1 +importlib-resources==6.4.0 # via matplotlib iniconfig==2.0.0 # via pytest -ipykernel==6.29.0 +ipykernel==6.29.4 # via jupyterlab ipython==8.18.1 # via # ipykernel # ipywidgets -ipyvue==1.10.1 +ipyvue==1.11.1 # via ipyvuetify -ipyvuetify==1.8.10 +ipyvuetify==1.9.4 # via market_analy (pyproject.toml) -ipywidgets==8.1.1 +ipywidgets==8.1.3 # via # bqplot # ipyvue @@ -139,30 +151,30 @@ isort==5.13.2 # via pylint jedi==0.19.1 # via ipython -jinja2==3.1.3 +jinja2==3.1.4 # via # jupyter-server # jupyterlab # jupyterlab-server # market_analy (pyproject.toml) # nbconvert -json5==0.9.14 +json5==0.9.25 # via jupyterlab-server -jsonpointer==2.4 +jsonpointer==3.0.0 # via jsonschema -jsonschema[format-nongpl]==4.21.1 +jsonschema[format-nongpl]==4.22.0 # via # jupyter-events # jupyterlab-server # nbformat jsonschema-specifications==2023.12.1 # via jsonschema -jupyter-client==8.6.0 +jupyter-client==8.6.2 # via # ipykernel # jupyter-server # nbclient -jupyter-core==5.7.1 +jupyter-core==5.7.2 # via # ipykernel # jupyter-client @@ -171,25 +183,25 @@ jupyter-core==5.7.1 # nbclient # nbconvert # nbformat -jupyter-events==0.9.0 +jupyter-events==0.10.0 # via jupyter-server -jupyter-lsp==2.2.2 +jupyter-lsp==2.2.5 # via jupyterlab -jupyter-server==2.12.5 +jupyter-server==2.14.1 # via # jupyter-lsp # jupyterlab # jupyterlab-server # notebook-shim -jupyter-server-terminals==0.5.2 +jupyter-server-terminals==0.5.3 # via jupyter-server -jupyterlab==4.0.12 +jupyterlab==4.2.2 # via market_analy (pyproject.toml) jupyterlab-pygments==0.3.0 # via nbconvert -jupyterlab-server==2.25.2 +jupyterlab-server==2.27.2 # via jupyterlab -jupyterlab-widgets==3.0.9 +jupyterlab-widgets==3.0.11 # via ipywidgets kiwisolver==1.4.5 # via matplotlib @@ -197,15 +209,15 @@ korean-lunar-calendar==0.3.1 # via exchange-calendars lxml==4.9.4 # via yahooquery -market-prices==0.12.1 +market-prices==0.12.3 # via market_analy (pyproject.toml) -markupsafe==2.1.4 +markupsafe==2.1.5 # via # jinja2 # nbconvert -matplotlib==3.8.2 +matplotlib==3.9.0 # via market_analy (pyproject.toml) -matplotlib-inline==0.1.6 +matplotlib-inline==0.1.7 # via # ipykernel # ipython @@ -215,28 +227,28 @@ mccabe==0.7.0 # pylint mistune==3.0.2 # via nbconvert -mypy==1.8.0 +mypy==1.10.1 # via market_analy (pyproject.toml) mypy-extensions==1.0.0 # via # black # mypy -nbclient==0.9.0 +nbclient==0.10.0 # via nbconvert -nbconvert==7.14.2 +nbconvert==7.16.4 # via jupyter-server -nbformat==5.9.2 +nbformat==5.10.4 # via # jupyter-server # nbclient # nbconvert nest-asyncio==1.6.0 # via ipykernel -nodeenv==1.8.0 +nodeenv==1.9.1 # via pre-commit -notebook-shim==0.2.3 +notebook-shim==0.2.4 # via jupyterlab -numpy==1.26.3 +numpy==1.26.4 # via # bqplot # contourpy @@ -248,7 +260,7 @@ numpy==1.26.3 # pandas-stubs overrides==7.7.0 # via jupyter-server -packaging==23.2 +packaging==24.1 # via # black # build @@ -259,70 +271,72 @@ packaging==23.2 # matplotlib # nbconvert # pytest -pandas==2.2.0 +pandas==2.2.2 # via # bqplot # exchange-calendars # market-prices # market_analy (pyproject.toml) # yahooquery -pandas-stubs==2.1.4.231227 +pandas-stubs==2.2.2.240603 # via market_analy (pyproject.toml) pandocfilters==1.5.1 # via nbconvert -parso==0.8.3 +parso==0.8.4 # via jedi pathspec==0.12.1 # via black -pillow==10.2.0 +pillow==10.3.0 # via matplotlib -pip-tools==7.3.0 +pip-tools==7.4.1 # via market_analy (pyproject.toml) -platformdirs==4.2.0 +platformdirs==4.2.2 # via # black # jupyter-core # pylint # virtualenv -pluggy==1.4.0 +pluggy==1.5.0 # via pytest -pre-commit==3.6.0 +pre-commit==3.7.1 # via market_analy (pyproject.toml) -prometheus-client==0.19.0 +prometheus-client==0.20.0 # via jupyter-server -prompt-toolkit==3.0.43 +prompt-toolkit==3.0.47 # via ipython -psutil==5.9.8 +psutil==6.0.0 # via ipykernel pure-eval==0.2.2 # via stack-data -pycodestyle==2.11.1 +pycodestyle==2.12.0 # via flake8 -pycparser==2.21 +pycparser==2.22 # via cffi pydocstyle==6.3.0 # via flake8-docstrings pyflakes==3.2.0 # via flake8 -pygments==2.17.2 +pygments==2.18.0 # via # ipython # nbconvert -pylint==3.0.3 +pylint==3.2.3 # via market_analy (pyproject.toml) pyluach==2.2.0 # via exchange-calendars -pyparsing==3.1.1 +pyparsing==3.1.2 # via matplotlib -pyproject-hooks==1.0.0 - # via build -pytest==8.0.0 +pyproject-hooks==1.1.0 + # via + # build + # pip-tools +pytest==8.2.2 # via # market_analy (pyproject.toml) # pytest-mock -pytest-mock==3.12.0 +pytest-mock==3.14.0 # via market_analy (pyproject.toml) -python-dateutil==2.8.2 +python-dateutil==2.9.0.post0 # via # arrow # jupyter-client @@ -334,7 +348,7 @@ pytz==2024.1 # via pandas pywin32==306 # via jupyter-core -pywinpty==2.0.12 +pywinpty==2.0.13 # via # jupyter-server # jupyter-server-terminals @@ -343,17 +357,17 @@ pyyaml==6.0.1 # via # jupyter-events # pre-commit -pyzmq==25.1.2 +pyzmq==26.0.3 # via # ipykernel # jupyter-client # jupyter-server -referencing==0.33.0 +referencing==0.35.1 # via # jsonschema # jsonschema-specifications # jupyter-events -requests==2.31.0 +requests==2.32.3 # via # jupyterlab-server # requests-futures @@ -368,11 +382,11 @@ rfc3986-validator==0.1.1 # via # jsonschema # jupyter-events -rpds-py==0.17.1 +rpds-py==0.18.1 # via # jsonschema # referencing -send2trash==1.8.2 +send2trash==1.8.3 # via jupyter-server six==1.16.0 # via @@ -380,19 +394,21 @@ six==1.16.0 # bleach # python-dateutil # rfc3339-validator -sniffio==1.3.0 - # via anyio +sniffio==1.3.1 + # via + # anyio + # httpx snowballstemmer==2.2.0 # via pydocstyle soupsieve==2.5 # via beautifulsoup4 stack-data==0.6.3 # via ipython -terminado==0.18.0 +terminado==0.18.1 # via # jupyter-server # jupyter-server-terminals -tinycss2==1.2.1 +tinycss2==1.3.0 # via nbconvert tomli==2.0.1 # via @@ -402,22 +418,21 @@ tomli==2.0.1 # mypy # pip-tools # pylint - # pyproject-hooks # pytest -tomlkit==0.12.3 +tomlkit==0.12.5 # via pylint toolz==0.12.1 # via exchange-calendars -tornado==6.4 +tornado==6.4.1 # via # ipykernel # jupyter-client # jupyter-server # jupyterlab # terminado -tqdm==4.66.1 +tqdm==4.66.4 # via yahooquery -traitlets==5.14.1 +traitlets==5.14.3 # via # bqplot # comm @@ -437,11 +452,11 @@ traitlets==5.14.1 # traittypes traittypes==0.2.1 # via bqplot -types-python-dateutil==2.8.19.20240106 +types-python-dateutil==2.9.0.20240316 # via arrow -types-pytz==2023.4.0.20240130 +types-pytz==2024.1.0.20240417 # via pandas-stubs -typing-extensions==4.9.0 +typing-extensions==4.12.2 # via # anyio # astroid @@ -450,7 +465,7 @@ typing-extensions==4.9.0 # ipython # mypy # pylint -tzdata==2023.4 +tzdata==2024.1 # via # exchange-calendars # market-prices @@ -458,29 +473,29 @@ tzdata==2023.4 # pandas uri-template==1.3.0 # via jsonschema -urllib3==2.2.0 +urllib3==2.2.2 # via requests -valimp==0.2 +valimp==0.3 # via market-prices -virtualenv==20.25.0 +virtualenv==20.26.3 # via pre-commit wcwidth==0.2.13 # via prompt-toolkit -webcolors==1.13 +webcolors==24.6.0 # via jsonschema webencodings==0.5.1 # via # bleach # tinycss2 -websocket-client==1.7.0 +websocket-client==1.8.0 # via jupyter-server -wheel==0.42.0 +wheel==0.43.0 # via pip-tools -widgetsnbextension==4.0.9 +widgetsnbextension==4.0.11 # via ipywidgets yahooquery==2.3.7 # via market-prices -zipp==3.17.0 +zipp==3.19.2 # via # importlib-metadata # importlib-resources diff --git a/tests/test_analysis.py b/tests/test_analysis.py index 501b7f9..1cc92ec 100644 --- a/tests/test_analysis.py +++ b/tests/test_analysis.py @@ -86,7 +86,7 @@ def test_add_summary(): # check axis "both" expected = df.copy() expected.loc["SUMMARY"] = [6, 60] - expected["SUMMARY"] = [0, 11, 22, 33, np.NaN] + expected["SUMMARY"] = [0, 11, 22, 33, np.nan] assert_frame_equal(f(df, aggmethod="sum", axis="both"), expected) # check invalid axis @@ -102,14 +102,14 @@ def test_add_summary_row(): df = pd.DataFrame(dict(a=a, b=b)) rtrn = f(df, [("mean", "a")]) expected = df.copy() - expected.loc["SUMMARY"] = [1.5, np.NaN] + expected.loc["SUMMARY"] = [1.5, np.nan] assert_frame_equal(rtrn, expected) # verify can pass in a list of a single column rtrn = f(df, [("sum", "b")], label="foO") expected = df.copy() expected.loc["foO"] = [0, 60] - expected.loc[("foO", "a")] = np.NaN + expected.loc[("foO", "a")] = np.nan assert_frame_equal(rtrn, expected) rtrn = f(df, [("mean", "a"), ("sum", "b")], label="spam")