Commit 12bbdad9 authored by Cecilia Nievas's avatar Cecilia Nievas
Browse files

Replaced use of pandas.append (Pandas deprecation)

parent 9bb33403
Pipeline #39334 passed with stage
in 1 minute and 57 seconds
......@@ -1000,11 +1000,6 @@ class ExposureModelESRM20(AggregatedExposureModel):
pass
# Create output GeoDataFrame
filler_data_unit_geometry_table = geopandas.GeoDataFrame(
columns=["ID_FILLER", "geometry"]
)
filler_data_unit_geometry_table.crs = pyproj.CRS("epsg:4326")
if new_data_unit_geometry is not None:
logger.info(
"A data unit has been created for Exposure Entity '%s', "
......@@ -1017,11 +1012,17 @@ class ExposureModelESRM20(AggregatedExposureModel):
filler_data_unit_id = "%s_FILLER" % (occupancy_case)
filler_data_unit_geometry_table = filler_data_unit_geometry_table.append(
{"ID_FILLER": filler_data_unit_id, "geometry": new_data_unit_geometry},
ignore_index=True,
filler_data_unit_geometry_table = geopandas.GeoDataFrame(
{"ID_FILLER": [filler_data_unit_id], "geometry": [new_data_unit_geometry]}
)
else: # Create empty GeoDataFrame
filler_data_unit_geometry_table = geopandas.GeoDataFrame(
columns=["ID_FILLER", "geometry"]
)
filler_data_unit_geometry_table.crs = pyproj.CRS("epsg:4326")
return filler_data_unit_geometry_table
def _map_data_units_types(self, original_description):
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment