@@ -86,9 +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_old = gdf .append (singlerow , sort = True )
90
89
gdf = pd .concat ([gdf , singlerow ], sort = True )
91
- assert gdf .equals (gdf_old )
92
90
93
91
f = 51515
94
92
singlerow = pd .DataFrame (
@@ -105,9 +103,7 @@ def _create_us_counties_df(st_to_state_name_dict, state_to_st_dict):
105
103
columns = ["State" , "ST" , "geometry" , "FIPS" , "STATEFP" , "NAME" ],
106
104
index = [max (gdf .index ) + 1 ],
107
105
)
108
- gdf_old = gdf .append (singlerow , sort = True )
109
106
gdf = pd .concat ([gdf , singlerow ], sort = True )
110
- assert gdf .equals (gdf_old )
111
107
112
108
f = 2270
113
109
singlerow = pd .DataFrame (
@@ -124,25 +120,19 @@ def _create_us_counties_df(st_to_state_name_dict, state_to_st_dict):
124
120
columns = ["State" , "ST" , "geometry" , "FIPS" , "STATEFP" , "NAME" ],
125
121
index = [max (gdf .index ) + 1 ],
126
122
)
127
- gdf_old = gdf .append (singlerow , sort = True )
128
123
gdf = pd .concat ([gdf , singlerow ], sort = True )
129
- assert gdf .equals (gdf_old )
130
124
131
125
row_2198 = gdf [gdf ["FIPS" ] == 2198 ]
132
126
row_2198 .index = [max (gdf .index ) + 1 ]
133
127
row_2198 .loc [row_2198 .index [0 ], "FIPS" ] = 2201
134
128
row_2198 .loc [row_2198 .index [0 ], "STATEFP" ] = "02"
135
- gdf_old = gdf .append (row_2198 , sort = True )
136
129
gdf = pd .concat ([gdf , row_2198 ], sort = True )
137
- assert gdf .equals (gdf_old )
138
130
139
131
row_2105 = gdf [gdf ["FIPS" ] == 2105 ]
140
132
row_2105 .index = [max (gdf .index ) + 1 ]
141
133
row_2105 .loc [row_2105 .index [0 ], "FIPS" ] = 2232
142
134
row_2105 .loc [row_2105 .index [0 ], "STATEFP" ] = "02"
143
- gdf_old = gdf .append (row_2105 , sort = True )
144
135
gdf = pd .concat ([gdf , row_2105 ], sort = True )
145
- assert gdf .equals (gdf_old )
146
136
gdf = gdf .rename (columns = {"NAME" : "COUNTY_NAME" })
147
137
148
138
gdf_reduced = gdf [["FIPS" , "STATEFP" , "COUNTY_NAME" , "geometry" ]]
0 commit comments