Skip to content

Commit

Permalink
fix: updated pandas to allow for v2+
Browse files Browse the repository at this point in the history
  • Loading branch information
KennethEnevoldsen committed Oct 10, 2023
1 parent 5f092d6 commit 0b069e3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,7 @@ commands =
pytest -n auto {posargs:test}
[testenv:type]
allowlist_externals = pyright
description: run type checks
extras = tests, dev
basepython = py39 # Setting these explicitly avoid recreating env if your shell is set to a different version
Expand Down
1 change: 1 addition & 0 deletions src/dacy/datasets/names.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ def load_names(
names = names.groupby(["name", "gender", "first_name"]).agg({"count": "sum"})
# Change: groupby state_office and divide by sum
names = names.groupby(level=0).apply(lambda x: x / float(x.sum().iloc[0]))
names = names.reset_index(level=0, drop=True)
names = names.reset_index()
names = names.loc[
(names["gender"] == gender) & (names["count"] >= min_prop_gender)
Expand Down

0 comments on commit 0b069e3

Please sign in to comment.