From 2c1f79e63b67bf8bf145584ac3e1a1d567f0432d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Al=C3=A1n=20Mu=C3=B1oz?= <alan.munoz@ed.ac.uk> Date: Thu, 5 Jan 2023 23:27:39 +0000 Subject: [PATCH] fix(meta): update given df.to_dict returning list --- src/agora/io/metadata.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/agora/io/metadata.py b/src/agora/io/metadata.py index 02507502..713c6d16 100644 --- a/src/agora/io/metadata.py +++ b/src/agora/io/metadata.py @@ -69,7 +69,7 @@ def flatten_dict(nested_dict, separator="/"): """ df = pd.json_normalize(nested_dict, sep=separator) - flattened = df.to_dict(orient="records") or {} + flattened = df.to_dict(orient="records")[0] or {} return flattened -- GitLab