Skip to content

Commit

Permalink
Pandas 2 compability for ParameterResponseCorrelation
Browse files Browse the repository at this point in the history
  • Loading branch information
HansKallekleiv committed Dec 19, 2024
1 parent 2af9699 commit a3c8ef1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion webviz_subsurface/_utils/parameter_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@ def filter_and_sum_responses(
if aggregation == "sum":
return df.groupby("REAL").sum().reset_index()[["REAL", response]]
if aggregation == "mean":
return df.groupby("REAL").mean().reset_index()[["REAL", response]]
return (
df.groupby("REAL").mean(numeric_only=True).reset_index()[["REAL", response]]
)
raise ValueError(f"Unknown aggregation '{aggregation}'.")


Expand Down

0 comments on commit a3c8ef1

Please sign in to comment.