@@ -86,7 +86,7 @@ def _create_us_counties_df(st_to_state_name_dict, state_to_st_dict):
86
86
columns = ["State" , "ST" , "geometry" , "FIPS" , "STATEFP" , "NAME" ],
87
87
index = [max (gdf .index ) + 1 ],
88
88
)
89
- gdf = gdf .append (singlerow )
89
+ gdf = gdf .append (singlerow , sort = True )
90
90
91
91
f = 51515
92
92
singlerow = pd .DataFrame (
@@ -103,7 +103,7 @@ def _create_us_counties_df(st_to_state_name_dict, state_to_st_dict):
103
103
columns = ["State" , "ST" , "geometry" , "FIPS" , "STATEFP" , "NAME" ],
104
104
index = [max (gdf .index ) + 1 ],
105
105
)
106
- gdf = gdf .append (singlerow )
106
+ gdf = gdf .append (singlerow , sort = True )
107
107
108
108
f = 2270
109
109
singlerow = pd .DataFrame (
@@ -120,19 +120,19 @@ def _create_us_counties_df(st_to_state_name_dict, state_to_st_dict):
120
120
columns = ["State" , "ST" , "geometry" , "FIPS" , "STATEFP" , "NAME" ],
121
121
index = [max (gdf .index ) + 1 ],
122
122
)
123
- gdf = gdf .append (singlerow )
123
+ gdf = gdf .append (singlerow , sort = True )
124
124
125
125
row_2198 = gdf [gdf ["FIPS" ] == 2198 ]
126
126
row_2198 .index = [max (gdf .index ) + 1 ]
127
127
row_2198 .loc [row_2198 .index [0 ], "FIPS" ] = 2201
128
128
row_2198 .loc [row_2198 .index [0 ], "STATEFP" ] = "02"
129
- gdf = gdf .append (row_2198 )
129
+ gdf = gdf .append (row_2198 , sort = True )
130
130
131
131
row_2105 = gdf [gdf ["FIPS" ] == 2105 ]
132
132
row_2105 .index = [max (gdf .index ) + 1 ]
133
133
row_2105 .loc [row_2105 .index [0 ], "FIPS" ] = 2232
134
134
row_2105 .loc [row_2105 .index [0 ], "STATEFP" ] = "02"
135
- gdf = gdf .append (row_2105 )
135
+ gdf = gdf .append (row_2105 , sort = True )
136
136
gdf = gdf .rename (columns = {"NAME" : "COUNTY_NAME" })
137
137
138
138
gdf_reduced = gdf [["FIPS" , "STATEFP" , "COUNTY_NAME" , "geometry" ]]
0 commit comments