Skip to content

Commit

Permalink
Aggregate duplicate indices by mean in dark storage
Browse files Browse the repository at this point in the history
  • Loading branch information
eivindjahren committed Oct 14, 2024
1 parent 12d2b53 commit f8d2f26
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/ert/dark_storage/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit f8d2f26

Please sign in to comment.