Skip to content

Commit

Permalink
use list comprehension instead of chain to handle missing values in s…
Browse files Browse the repository at this point in the history
…tring vars
  • Loading branch information
lolaBerkowitz committed Sep 28, 2024
1 parent c214eec commit c06a0cd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion neuro_py/io/loading.py
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,7 @@ def un_nest_df(df):
):
# check if nested within brackets
try:
df[dn] = list(chain(*data["cell_metrics"][dn][0][0][0]))
df[dn] = [value[0] if len(value)==1 else value for value in data["cell_metrics"][dn][0][0][0]]
except Exception:
df[dn] = data["cell_metrics"][dn][0][0][0]
except Exception:
Expand Down

0 comments on commit c06a0cd

Please sign in to comment.