From b649ce00f4deccf879bc09a6fda6467258cefe34 Mon Sep 17 00:00:00 2001 From: Jakob Wessel Date: Mon, 13 Nov 2023 16:33:45 +0000 Subject: [PATCH] Bugfix in the dataframe unpacking function which would not flatten all locations. --- ibicus/utils/_utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ibicus/utils/_utils.py b/ibicus/utils/_utils.py index 785e7ef..a0d2f64 100644 --- a/ibicus/utils/_utils.py +++ b/ibicus/utils/_utils.py @@ -461,9 +461,9 @@ def _unpack_df_of_numpy_arrays(df, numpy_column_name): new_expanded_rows = [] for _, row in df.iterrows(): expanded_row = {} - for index, value in row.iteritems(): + for index, value in row.items(): if index == numpy_column_name: - expanded_row[index] = value[0].flatten() + expanded_row[index] = value.flatten() else: expanded_row[index] = value new_expanded_rows.append(pd.DataFrame(data=expanded_row))