Skip to content

Commit 39c8eb1

Browse files
chahankChahan Kropf
andauthored
Remove pandas append to concat (#777)
Co-authored-by: Chahan Kropf <[email protected]>
1 parent 402fa24 commit 39c8eb1

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

climada/util/test/test_lines_polys_handler.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424

2525
import numpy as np
2626
import geopandas as gpd
27+
import pandas as pd
2728
import copy
2829

2930
from shapely.geometry import Point
@@ -366,7 +367,7 @@ def test_calc_geom_impact_points(self):
366367
def test_calc_geom_impact_mixed(self):
367368
""" test calc_geom_impact() with a mixed exp (points, lines and polygons) """
368369
# mixed exposures
369-
gdf_mix = GDF_LINE.append(GDF_POLY).append(GDF_POINT).reset_index(drop=True)
370+
gdf_mix = pd.concat([GDF_LINE, GDF_POLY, GDF_POINT]).reset_index(drop=True)
370371
exp_mix = Exposures(gdf_mix)
371372

372373
imp1 = u_lp.calc_geom_impact(
@@ -444,7 +445,7 @@ def test_calc_geom_impact_mixed(self):
444445

445446
def test_impact_pnt_agg(self):
446447
"""Test impact agreggation method"""
447-
gdf_mix = GDF_LINE.append(GDF_POLY).append(GDF_POINT).reset_index(drop=True)
448+
gdf_mix = pd.concat([GDF_LINE, GDF_POLY, GDF_POINT]).reset_index(drop=True)
448449
exp_mix = Exposures(gdf_mix)
449450

450451
exp_pnt = u_lp.exp_geom_to_pnt(

0 commit comments

Comments
 (0)