diff --git a/_delphi_utils_python/setup.py b/_delphi_utils_python/setup.py index 8d98e8140..db0197961 100644 --- a/_delphi_utils_python/setup.py +++ b/_delphi_utils_python/setup.py @@ -14,7 +14,7 @@ "mock", "moto", "numpy", - "pandas>=1.1.0", + "pandas>=1.1.0,<2", "pydocstyle", "pylint==2.8.3", "pytest", diff --git a/_delphi_utils_python/tests/test_geomap.py b/_delphi_utils_python/tests/test_geomap.py index fb582e7d5..d10b4d493 100644 --- a/_delphi_utils_python/tests/test_geomap.py +++ b/_delphi_utils_python/tests/test_geomap.py @@ -275,6 +275,10 @@ def test_add_geocode(self, geomapper): new_data = geomapper.add_geocode(self.zip_data, "zip", "state_code") new_data2 = geomapper.add_geocode(new_data, "state_code", "nation") assert new_data2["nation"].unique()[0] == "us" + new_data = geomapper.replace_geocode(self.zip_data, "zip", "state_code") + new_data2 = geomapper.add_geocode(new_data, "state_code", "state_id", new_col="state") + new_data3 = geomapper.replace_geocode(new_data2, "state_code", "nation", new_col="geo_id") + assert "state" not in new_data3.columns # state_code -> hhs new_data = geomapper.add_geocode(self.zip_data, "zip", "state_code")