Skip to content

Commit

Permalink
scave/python: Avoid another FutureWarning in utils.py when calling pi…
Browse files Browse the repository at this point in the history
…vot_table
  • Loading branch information
torokati44 committed Oct 18, 2023
1 parent 55d6405 commit eaa7c7e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions python/omnetpp/scave/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1624,7 +1624,7 @@ def aggfunc(values):
def conf_intv(values):
return confidence_interval(confidence_level, values)

pivoted = pd.pivot_table(df, index=series, columns=groups, values="value", aggfunc=[np.mean, conf_intv], dropna=False, sort=sort)
pivoted = pd.pivot_table(df, index=series, columns=groups, values="value", aggfunc=["mean", conf_intv], dropna=False, sort=sort)
valuedf = pivoted["mean"]
errorsdf = pivoted["conf_intv"]
if errorsdf.isna().values.all():
Expand Down Expand Up @@ -1666,7 +1666,7 @@ def pivot_for_scatterchart(df, xaxis_itervar, group_by, confidence_level=None):
else:
def conf_intv(values):
return confidence_interval(confidence_level, values)
pivoted = pd.pivot_table(df, values="value", columns=group_by, index=xaxis_itervar if xaxis_itervar else "name", aggfunc=[np.mean, conf_intv], dropna=False)
pivoted = pd.pivot_table(df, values="value", columns=group_by, index=xaxis_itervar if xaxis_itervar else "name", aggfunc=["mean", conf_intv], dropna=False)

df = pivoted["mean"]
errors_df = pivoted["conf_intv"]
Expand Down

0 comments on commit eaa7c7e

Please sign in to comment.