Skip to content

Commit

Permalink
fixed use of iloc.
Browse files Browse the repository at this point in the history
  • Loading branch information
twobackfromtheend authored and Sciguymjm committed Nov 1, 2019
1 parent 54b5f17 commit 46def33
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions carball/analysis/events/hit_detection/hit_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,8 @@ def get_clear(data_frame: pd.DataFrame, saltie_hit: Hit, next_saltie_hit: Hit,
if next_saltie_hit is not None:

# check edge case where an own goal moves the ball to the middle
goals_at_hit = data_frame.game.iloc[saltie_hit.frame_number].goal_number
goals_at_next_hit = data_frame.game.iloc[next_saltie_hit.frame_number].goal_number
goals_at_hit = data_frame.game.loc[saltie_hit.frame_number].goal_number
goals_at_next_hit = data_frame.game.loc[next_saltie_hit.frame_number].goal_number
if goals_at_hit != goals_at_next_hit:
# lol they own-goaled
return
Expand Down

0 comments on commit 46def33

Please sign in to comment.