@@ -86,9 +86,7 @@ def _create_us_counties_df(st_to_state_name_dict, state_to_st_dict):
8686 columns = ["State" , "ST" , "geometry" , "FIPS" , "STATEFP" , "NAME" ],
8787 index = [max (gdf .index ) + 1 ],
8888 )
89- gdf_old = gdf .append (singlerow , sort = True )
9089 gdf = pd .concat ([gdf , singlerow ], sort = True )
91- assert gdf .equals (gdf_old )
9290
9391 f = 51515
9492 singlerow = pd .DataFrame (
@@ -105,9 +103,7 @@ def _create_us_counties_df(st_to_state_name_dict, state_to_st_dict):
105103 columns = ["State" , "ST" , "geometry" , "FIPS" , "STATEFP" , "NAME" ],
106104 index = [max (gdf .index ) + 1 ],
107105 )
108- gdf_old = gdf .append (singlerow , sort = True )
109106 gdf = pd .concat ([gdf , singlerow ], sort = True )
110- assert gdf .equals (gdf_old )
111107
112108 f = 2270
113109 singlerow = pd .DataFrame (
@@ -124,25 +120,19 @@ def _create_us_counties_df(st_to_state_name_dict, state_to_st_dict):
124120 columns = ["State" , "ST" , "geometry" , "FIPS" , "STATEFP" , "NAME" ],
125121 index = [max (gdf .index ) + 1 ],
126122 )
127- gdf_old = gdf .append (singlerow , sort = True )
128123 gdf = pd .concat ([gdf , singlerow ], sort = True )
129- assert gdf .equals (gdf_old )
130124
131125 row_2198 = gdf [gdf ["FIPS" ] == 2198 ]
132126 row_2198 .index = [max (gdf .index ) + 1 ]
133127 row_2198 .loc [row_2198 .index [0 ], "FIPS" ] = 2201
134128 row_2198 .loc [row_2198 .index [0 ], "STATEFP" ] = "02"
135- gdf_old = gdf .append (row_2198 , sort = True )
136129 gdf = pd .concat ([gdf , row_2198 ], sort = True )
137- assert gdf .equals (gdf_old )
138130
139131 row_2105 = gdf [gdf ["FIPS" ] == 2105 ]
140132 row_2105 .index = [max (gdf .index ) + 1 ]
141133 row_2105 .loc [row_2105 .index [0 ], "FIPS" ] = 2232
142134 row_2105 .loc [row_2105 .index [0 ], "STATEFP" ] = "02"
143- gdf_old = gdf .append (row_2105 , sort = True )
144135 gdf = pd .concat ([gdf , row_2105 ], sort = True )
145- assert gdf .equals (gdf_old )
146136 gdf = gdf .rename (columns = {"NAME" : "COUNTY_NAME" })
147137
148138 gdf_reduced = gdf [["FIPS" , "STATEFP" , "COUNTY_NAME" , "geometry" ]]
0 commit comments