From 353e6f128e2d4747458c7895a25b87207071d0a5 Mon Sep 17 00:00:00 2001 From: Daniel Caspi Date: Mon, 5 Aug 2024 10:28:33 -0500 Subject: [PATCH] update dependencies --- docs/grid.js | 2 +- docs/index.html | 2 +- package.json | 2 +- src/babynames.py | 4 +-- src/requirements.in | 5 +++ src/requirements.txt | 80 ++++++++++++++++++++++++++++++++++++++++++-- 6 files changed, 88 insertions(+), 7 deletions(-) create mode 100644 src/requirements.in diff --git a/docs/grid.js b/docs/grid.js index c58d47e..ec68a8e 100644 --- a/docs/grid.js +++ b/docs/grid.js @@ -147,7 +147,7 @@ document.querySelectorAll("a.btn-gender").forEach((button) => e.preventDefault(); const gender = e.currentTarget.dataset.gender; loadBabyNames(gender); - }) + }), ); // load boys by default diff --git a/docs/index.html b/docs/index.html index 937bee5..f897d81 100644 --- a/docs/index.html +++ b/docs/index.html @@ -1,4 +1,4 @@ - + diff --git a/package.json b/package.json index 454368e..ebdedd5 100644 --- a/package.json +++ b/package.json @@ -20,6 +20,6 @@ "license": "MIT", "devDependencies": { "markdown-spellcheck": "^1.3.1", - "prettier": "^2.8.8" + "prettier": "^3.3.3" } } diff --git a/src/babynames.py b/src/babynames.py index 348d78e..035fe12 100644 --- a/src/babynames.py +++ b/src/babynames.py @@ -188,7 +188,7 @@ def main(): "phones": lambda x: list(set(list(chain(*x)))), } ) - .drop("full_alt_spellings", 1) + .drop("full_alt_spellings", axis=1) .sort_values(by=["sex", "n_sum", "name"], ascending=[True, False, True]) ) @@ -235,7 +235,7 @@ def main(): ## split by gender (M, F), assign n_percent, which represents the cumulative percentage of names for sex in ["M", "F"]: - gender = df[df["sex"] == sex].drop("sex", 1) + gender = df[df["sex"] == sex].drop("sex", axis=1) gender.insert( 3, "n_percent", diff --git a/src/requirements.in b/src/requirements.in new file mode 100644 index 0000000..9bd61a1 --- /dev/null +++ b/src/requirements.in @@ -0,0 +1,5 @@ +nltk +numpy==1.26.4 +pandas +pronouncing +swifter diff --git a/src/requirements.txt b/src/requirements.txt index e7b0287..b544d31 100644 --- a/src/requirements.txt +++ b/src/requirements.txt @@ -1,4 +1,80 @@ +# +# This file is autogenerated by pip-compile with Python 3.11 +# by the following command: +# +# pip-compile --strip-extras requirements.in +# +click==8.1.7 + # via + # dask + # nltk +cloudpickle==3.0.0 + # via dask +cmudict==1.0.27 + # via pronouncing +dask==2024.7.1 + # via + # dask-expr + # swifter +dask-expr==1.1.9 + # via dask +fsspec==2024.6.1 + # via dask +importlib-metadata==8.2.0 + # via + # cmudict + # dask +importlib-resources==6.4.0 + # via cmudict +joblib==1.4.2 + # via nltk +locket==1.0.0 + # via partd nltk==3.8.1 -pandas==1.5.3 + # via -r requirements.in +numpy==1.26.4 + # via + # -r requirements.in + # dask + # pandas + # pyarrow +packaging==24.1 + # via dask +pandas==2.2.2 + # via + # -r requirements.in + # dask + # dask-expr + # swifter +partd==1.4.2 + # via dask pronouncing==0.2.0 -swifter==1.3.5 + # via -r requirements.in +psutil==6.0.0 + # via swifter +pyarrow==17.0.0 + # via dask-expr +python-dateutil==2.9.0.post0 + # via pandas +pytz==2024.1 + # via pandas +pyyaml==6.0.1 + # via dask +regex==2024.7.24 + # via nltk +six==1.16.0 + # via python-dateutil +swifter==1.4.0 + # via -r requirements.in +toolz==0.12.1 + # via + # dask + # partd +tqdm==4.66.5 + # via + # nltk + # swifter +tzdata==2024.1 + # via pandas +zipp==3.19.2 + # via importlib-metadata