Skip to content

Commit fa3b0db

Browse files
committed
actually handle dictionaries correctly
Signed-off-by: John Seekins <[email protected]>
1 parent b7717f6 commit fa3b0db

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ def _flatdict(d: dict, parent_key: str = "", sep: str = ".") -> dict:
7878

7979
def convert_to_dataframe(d: dict) -> polars.DataFrame:
8080
"""facilities internal dict to dataframe"""
81-
flatdata = [_flatdict(f) for _, f in d]
81+
flatdata = [_flatdict(f) for f in d.values()]
8282
fieldnames = [k for k in flatdata[0].keys() if k not in flatdata_filtered_keys]
8383
# https://docs.pola.rs/api/python/stable/reference/api/polars.from_dicts.html
8484
df = polars.from_dicts(flatdata, schema=fieldnames)

0 commit comments

Comments
 (0)