@@ -86,7 +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 = gdf . append ( singlerow , sort = True )
89+ gdf = pd . concat ([ gdf , singlerow ] , sort = True )
9090
9191 f = 51515
9292 singlerow = pd .DataFrame (
@@ -103,7 +103,7 @@ def _create_us_counties_df(st_to_state_name_dict, state_to_st_dict):
103103 columns = ["State" , "ST" , "geometry" , "FIPS" , "STATEFP" , "NAME" ],
104104 index = [max (gdf .index ) + 1 ],
105105 )
106- gdf = gdf . append ( singlerow , sort = True )
106+ gdf = pd . concat ([ gdf , singlerow ] , sort = True )
107107
108108 f = 2270
109109 singlerow = pd .DataFrame (
@@ -120,19 +120,19 @@ def _create_us_counties_df(st_to_state_name_dict, state_to_st_dict):
120120 columns = ["State" , "ST" , "geometry" , "FIPS" , "STATEFP" , "NAME" ],
121121 index = [max (gdf .index ) + 1 ],
122122 )
123- gdf = gdf . append ( singlerow , sort = True )
123+ gdf = pd . concat ([ gdf , singlerow ] , sort = True )
124124
125125 row_2198 = gdf [gdf ["FIPS" ] == 2198 ]
126126 row_2198 .index = [max (gdf .index ) + 1 ]
127127 row_2198 .loc [row_2198 .index [0 ], "FIPS" ] = 2201
128128 row_2198 .loc [row_2198 .index [0 ], "STATEFP" ] = "02"
129- gdf = gdf . append ( row_2198 , sort = True )
129+ gdf = pd . concat ([ gdf , row_2198 ] , sort = True )
130130
131131 row_2105 = gdf [gdf ["FIPS" ] == 2105 ]
132132 row_2105 .index = [max (gdf .index ) + 1 ]
133133 row_2105 .loc [row_2105 .index [0 ], "FIPS" ] = 2232
134134 row_2105 .loc [row_2105 .index [0 ], "STATEFP" ] = "02"
135- gdf = gdf . append ( row_2105 , sort = True )
135+ gdf = pd . concat ([ gdf , row_2105 ] , sort = True )
136136 gdf = gdf .rename (columns = {"NAME" : "COUNTY_NAME" })
137137
138138 gdf_reduced = gdf [["FIPS" , "STATEFP" , "COUNTY_NAME" , "geometry" ]]
0 commit comments