From 959a49e56c5908977dbeda86cfed9d163a5e2e16 Mon Sep 17 00:00:00 2001 From: Adam Tyson Date: Tue, 31 Oct 2023 17:25:03 +0000 Subject: [PATCH] Fix pandas FutureWarning --- brainreg_segment/regions/analysis.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/brainreg_segment/regions/analysis.py b/brainreg_segment/regions/analysis.py index a99ece4..35a098d 100644 --- a/brainreg_segment/regions/analysis.py +++ b/brainreg_segment/regions/analysis.py @@ -1,7 +1,7 @@ import numpy as np import pandas as pd from brainglobe_utils.general.list import unique_elements_lists -from brainglobe_utils.pandas.misc import initialise_df +from brainglobe_utils.pandas.misc import initialise_df, safe_pandas_concat from napari.qt.threading import thread_worker from skimage.measure import regionprops_table @@ -248,7 +248,7 @@ def add_structure_volume_to_df( } df_to_append = pd.DataFrame(data_to_append) - df = pd.concat([df, df_to_append], ignore_index=True) + df = safe_pandas_concat(df, df_to_append) return df