Skip to content

Commit

Permalink
Fix warning about accessing DataFrame by index
Browse files Browse the repository at this point in the history
  • Loading branch information
dhadka committed Sep 5, 2024
1 parent 9f046e7 commit f15c5b6
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions rhodium/plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -815,14 +815,14 @@ def parallel_coordinates(model, data, c=None, cols=None, ax=None, colors=None,
format = "%.2f"

if target == "top":
value = df_min[i] if model.responses[df.columns.values[i]].dir == Response.MINIMIZE else df_max[i]
value = df_min.iloc[i] if model.responses[df.columns.values[i]].dir == Response.MINIMIZE else df_max.iloc[i]

if model.responses[df.columns.values[i]].dir != Response.INFO:
format = format + "*"
elif target == "bottom":
value = df_max[i] if model.responses[df.columns.values[i]].dir == Response.MINIMIZE else df_min[i]
value = df_max.iloc[i] if model.responses[df.columns.values[i]].dir == Response.MINIMIZE else df_min.iloc[i]
else:
value = df_max[i]
value = df_max.iloc[i]

if model.responses[df.columns.values[i]].dir == Response.MAXIMIZE:
format = format + "*"
Expand All @@ -831,14 +831,14 @@ def parallel_coordinates(model, data, c=None, cols=None, ax=None, colors=None,
format = "%.2f"

if target == "top":
value = df_max[i] if model.responses[df.columns.values[i]].dir == Response.MINIMIZE else df_min[i]
value = df_max.iloc[i] if model.responses[df.columns.values[i]].dir == Response.MINIMIZE else df_min.iloc[i]
elif target == "bottom":
value = df_min[i] if model.responses[df.columns.values[i]].dir == Response.MINIMIZE else df_max[i]
value = df_min.iloc[i] if model.responses[df.columns.values[i]].dir == Response.MINIMIZE else df_max.iloc[i]

if model.responses[df.columns.values[i]].dir != Response.INFO:
format = format + "*"
else:
value = df_min[i]
value = df_min.iloc[i]

if model.responses[df.columns.values[i]].dir == Response.MINIMIZE:
format = format + "*"
Expand Down

0 comments on commit f15c5b6

Please sign in to comment.