In [1]:
Copied!
from kloppy import opta
dataset = opta.load(
f7_data="../../kloppy/tests/files/opta_f7.xml",
f24_data="../../kloppy/tests/files/opta_f24.xml",
# Optional arguments
coordinates="opta",
event_types=["pass", "shot"]
)
dataset.to_df().head()
from kloppy import opta
dataset = opta.load(
f7_data="../../kloppy/tests/files/opta_f7.xml",
f24_data="../../kloppy/tests/files/opta_f24.xml",
# Optional arguments
coordinates="opta",
event_types=["pass", "shot"]
)
dataset.to_df().head()
Out[1]:
event_id | event_type | result | success | period_id | timestamp | end_timestamp | ball_state | ball_owning_team | team_id | player_id | coordinates_x | coordinates_y | end_coordinates_x | end_coordinates_y | receiver_player_id | set_piece_type | pass_type | body_part_type | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | 1510681159 | PASS | COMPLETE | True | 1 | 0.782 | None | alive | 569 | 569 | 48337 | 50.1 | 49.4 | 36.4 | 45.1 | NaN | KICK_OFF | NaN | NaN |
1 | 1646695660 | PASS | COMPLETE | True | 1 | 3.692 | None | alive | 569 | 569 | 76001 | 36.4 | 45.1 | 28.0 | 39.8 | NaN | NaN | NaN | NaN |
2 | 1782829017 | PASS | COMPLETE | True | 1 | 5.299 | None | alive | 569 | 569 | 164266 | 27.9 | 39.8 | 29.1 | 62.0 | NaN | NaN | NaN | NaN |
3 | 1909884550 | PASS | COMPLETE | True | 1 | 6.995 | None | alive | 569 | 569 | 77384 | 29.3 | 62.6 | 26.3 | 37.6 | NaN | NaN | NaN | NaN |
4 | 1515097980 | PASS | COMPLETE | True | 1 | 8.971 | None | alive | 569 | 569 | 164266 | 26.3 | 34.3 | 29.1 | 7.4 | NaN | NaN | NaN | NaN |