Skip to content

Commit 8bca395

Browse files
committed
fix: try to handle lists of lists in pandas loader
1 parent cb28842 commit 8bca395

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

PyExpUtils/results/pandas.py

+5
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,11 @@ def _flattenKeys(d: Dict[str, Any]):
252252
for sk, sv in _flattenKeys(v).items():
253253
out[f'{k}.{sk}'] = sv
254254

255+
# if we have a list of lists, add top-level list as key
256+
elif isinstance(v, list) and isinstance(v[0], list):
257+
for i, sv in enumerate(v):
258+
out[f'{k}.[{i}]'] = sv
259+
255260
# if we have a list of objects, keep digging
256261
elif isinstance(v, list) and isinstance(v[0], dict):
257262
for i, sv in enumerate(v):

0 commit comments

Comments
 (0)