From a4daf22e23c37b12e103fd630442143df7fa15f3 Mon Sep 17 00:00:00 2001 From: Chahan Kropf Date: Tue, 29 Aug 2023 10:17:14 +0200 Subject: [PATCH] Remove pandas append to concat --- climada/util/test/test_lines_polys_handler.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/climada/util/test/test_lines_polys_handler.py b/climada/util/test/test_lines_polys_handler.py index 3eb55855de..070da95e3f 100644 --- a/climada/util/test/test_lines_polys_handler.py +++ b/climada/util/test/test_lines_polys_handler.py @@ -24,6 +24,7 @@ import numpy as np import geopandas as gpd +import pandas as pd import copy from shapely.geometry import Point @@ -366,7 +367,7 @@ def test_calc_geom_impact_points(self): def test_calc_geom_impact_mixed(self): """ test calc_geom_impact() with a mixed exp (points, lines and polygons) """ # mixed exposures - gdf_mix = GDF_LINE.append(GDF_POLY).append(GDF_POINT).reset_index(drop=True) + gdf_mix = pd.concat([GDF_LINE, GDF_POLY, GDF_POINT]).reset_index(drop=True) exp_mix = Exposures(gdf_mix) imp1 = u_lp.calc_geom_impact( @@ -444,7 +445,7 @@ def test_calc_geom_impact_mixed(self): def test_impact_pnt_agg(self): """Test impact agreggation method""" - gdf_mix = GDF_LINE.append(GDF_POLY).append(GDF_POINT).reset_index(drop=True) + gdf_mix = pd.concat([GDF_LINE, GDF_POLY, GDF_POINT]).reset_index(drop=True) exp_mix = Exposures(gdf_mix) exp_pnt = u_lp.exp_geom_to_pnt(