From ad37d7e3a52c78a7aff94c4a04940e53f6307315 Mon Sep 17 00:00:00 2001 From: Roy Thomson Date: Tue, 28 Nov 2023 11:20:14 +1100 Subject: [PATCH] bug: #113 Fix case when some object ids in geology file are non-int, non-float --- map2loop/m2l_map_checker.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/map2loop/m2l_map_checker.py b/map2loop/m2l_map_checker.py index af7a51a..0c8138a 100644 --- a/map2loop/m2l_map_checker.py +++ b/map2loop/m2l_map_checker.py @@ -449,9 +449,9 @@ def check_geology_map( geology[c_l["o"]] = geology.index # Check if some id values are blank and set appropriately elif len(geology[~geology[c_l["o"]].isnull()]) != len(geology): - vals = geology[geology[c_l["o"]].astype(str).str.isnumeric()][ - c_l["o"] - ].astype(int) + vals = geology[ + geology[c_l["o"]].astype(str).str.replace(".", "", 1).str.isdigit() + ][c_l["o"]].astype(int) next_index = int(np.nanmax(vals)) + 1 for ind, layer in geology.iterrows(): if pd.isna(layer[c_l["o"]]):