Skip to content

Commit

Permalink
Bugfix in the dataframe unpacking function which would not flatten al…
Browse files Browse the repository at this point in the history
…l locations.
  • Loading branch information
jakobwes committed Nov 13, 2023
1 parent c56e88e commit b649ce0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ibicus/utils/_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit b649ce0

Please sign in to comment.