From 956028ddeb4e09f36cdbad28409e0cd80492a49d Mon Sep 17 00:00:00 2001 From: Joseph Lemaitre Date: Tue, 3 Dec 2024 00:34:37 -0500 Subject: [PATCH] fix the dataframe code --- .../src/gempyor/inference_parameter.py | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/flepimop/gempyor_pkg/src/gempyor/inference_parameter.py b/flepimop/gempyor_pkg/src/gempyor/inference_parameter.py index c0a83efd9..c27f50380 100644 --- a/flepimop/gempyor_pkg/src/gempyor/inference_parameter.py +++ b/flepimop/gempyor_pkg/src/gempyor/inference_parameter.py @@ -175,17 +175,13 @@ def __len__(self): return len(self.pnames) def get_parameter_df(self): - all_params = [] - - for i in zip(self.ptypes, self.subpops,self.pnames): - data = { - "ptypes": self.ptypes, - "subpops": self.subpops, - "pnames": self.pnames - } - all_params.append(pd.DataFrame(data)) - - return pd.concat(all_params) + data = { + "ptypes": self.ptypes, + "subpops": self.subpops, + "pnames": self.pnames + } + df = pd.DataFrame(data) + return df def draw_initial(self, n_draw=1): """