socceraction.spadl.play_left_to_right#

socceraction.spadl.play_left_to_right(actions, home_team_id)#

Perform all action in the same playing direction.

This changes the start and end location of each action, such that all actions are performed as if the team plays from left to right.

Parameters
  • actions (pd.DataFrame) – The SPADL actins of a game.

  • home_team_id (int) – The ID of the home team.

Returns

All actions performed left to right.

Return type

list(pd.DataFrame)