From 0ec3a442d8487333ec3bc3a947347a61f50afd88 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dav=C3=ADd=20Brakenhoff?= Date: Thu, 26 Oct 2023 17:55:34 +0200 Subject: [PATCH] apply should return dict, not DataFrame - e.g. when getting contributions from models --- pastastore/store.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pastastore/store.py b/pastastore/store.py index 8de7bd8..96f8d6a 100644 --- a/pastastore/store.py +++ b/pastastore/store.py @@ -1111,7 +1111,7 @@ def apply(self, libname, func, names=None, progressbar=True): Returns ------- dict - dict of results of func, with names as keys and result as values + dict of results of func, with names as keys and results as values """ names = self.conn._parse_names(names, libname) result = {} @@ -1122,4 +1122,4 @@ def apply(self, libname, func, names=None, progressbar=True): getter = getattr(self.conn, f"get_{libname}") for n in tqdm(names) if progressbar else names: result[n] = func(getter(n)) - return pd.DataFrame.from_dict(result, orient="index") + return result