Skip to content

Commit

Permalink
chore(fuzzywuzzy): use thefuzz, fix levenshtein (#747)
Browse files Browse the repository at this point in the history
* chore

* clean

* fix type check after updating pyright

* Update pyproject.toml

Co-authored-by: Marigold <[email protected]>
  • Loading branch information
lucasrodes and Marigold authored Jan 9, 2023
1 parent aa735a3 commit 1f1b887
Show file tree
Hide file tree
Showing 5 changed files with 600 additions and 731 deletions.
2 changes: 1 addition & 1 deletion etl/match_variables.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

import click
import pandas as pd
from fuzzywuzzy import fuzz
from thefuzz import fuzz

from etl import db

Expand Down
3 changes: 2 additions & 1 deletion etl/scripts/countries-regions/init.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import os

import pandas as pd # noqa
from IPython import get_ipython
from IPython import get_ipython # type: ignore
from sqlalchemy import create_engine

engine = create_engine(os.environ["MYSQL_URL"])

ipython = get_ipython()
assert ipython
ipython.magic("load_ext rich")
ipython.magic("load_ext autoreload")
ipython.magic("autoreload 2")
Expand Down
2 changes: 1 addition & 1 deletion etl/steps/data/garden/emdat/2022-11-24/shared.py
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,7 @@ def add_region_aggregates(
.reset_index()
.assign(**{country_column: region})
)
data = pd.concat([data, region_df], ignore_index=True)
data = pd.concat([data, region_df], ignore_index=True) # type: ignore

return data

Expand Down
Loading

0 comments on commit 1f1b887

Please sign in to comment.