From f8d2f26ddfc93e72293bde35603b086085f2f21e Mon Sep 17 00:00:00 2001 From: Eivind Jahren Date: Mon, 14 Oct 2024 08:39:38 +0200 Subject: [PATCH] Aggregate duplicate indices by mean in dark storage --- src/ert/dark_storage/common.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/ert/dark_storage/common.py b/src/ert/dark_storage/common.py index 678b0f41a1e..4dac30ba4cd 100644 --- a/src/ert/dark_storage/common.py +++ b/src/ert/dark_storage/common.py @@ -121,6 +121,9 @@ def data_for_key( .to_pandas() ) df = df.set_index(["Date", "Realization"]) + # This performs the same aggragation by mean of duplicate values + # as in ert/analysis/_es_update.py + df = df.groupby(["Date", "Realization"]).mean() data = df.unstack(level="Date") data.columns = data.columns.droplevel(0) try: