Skip to content

Commit

Permalink
fixed parking code/violation rules
Browse files Browse the repository at this point in the history
  • Loading branch information
gregpawin committed May 16, 2022
1 parent ceb9a18 commit af016a1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ Sphinx
coverage
awscli
flake8
python-dotenv>=0.5.1
pylint
geopandas
matplotlib
Expand Down
4 changes: 2 additions & 2 deletions src/data/make_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,8 +191,8 @@ def clean(target_file: Union[Path, str], output_filedir: str, geojson=False):
vio_regex = pd.read_csv(PROJECT_DIR / "references/vio_regex.csv", delimiter=",")

# Iterate over makes and replace aliases
for row in vio_regex.itertuples():
df = df.replace(row[2], row[1])
for key in vio_regex.itertuples():
df.loc[df["violation_code"] == row[1], "violation_description"] = row[2]

# Enumerate list of car makes and replace with keys
make_dict = {make: ind for ind, make in enumerate(make_list)}
Expand Down

0 comments on commit af016a1

Please sign in to comment.