Skip to content

Commit 64c9114

Browse files
committed
Pin pandas below v2 and add test which fails if we upgrade badly
1 parent 479f8f4 commit 64c9114

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

_delphi_utils_python/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"mock",
1515
"moto",
1616
"numpy",
17-
"pandas>=1.1.0",
17+
"pandas>=1.1.0,<2",
1818
"pydocstyle",
1919
"pylint==2.8.3",
2020
"pytest",

_delphi_utils_python/tests/test_geomap.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,10 @@ def test_add_geocode(self, geomapper):
275275
new_data = geomapper.add_geocode(self.zip_data, "zip", "state_code")
276276
new_data2 = geomapper.add_geocode(new_data, "state_code", "nation")
277277
assert new_data2["nation"].unique()[0] == "us"
278+
new_data = geomapper.replace_geocode(self.zip_data, "zip", "state_code")
279+
new_data2 = geomapper.add_geocode(new_data, "state_code", "state_id", new_col="state")
280+
new_data3 = geomapper.replace_geocode(new_data2, "state_code", "nation", new_col="geo_id")
281+
assert "state" not in new_data3.columns
278282

279283
# state_code -> hhs
280284
new_data = geomapper.add_geocode(self.zip_data, "zip", "state_code")

0 commit comments

Comments
 (0)