In [2]:
Copied!
from kloppy import sportec
dataset = sportec.load(
event_data="../../kloppy/tests/files/sportec_events.xml",
meta_data="../../kloppy/tests/files/sportec_meta.xml",
# Optional arguments
coordinates="sportec",
event_types=["pass", "shot"]
)
dataset.to_pandas().head()
from kloppy import sportec
dataset = sportec.load(
event_data="../../kloppy/tests/files/sportec_events.xml",
meta_data="../../kloppy/tests/files/sportec_meta.xml",
# Optional arguments
coordinates="sportec",
event_types=["pass", "shot"]
)
dataset.to_pandas().head()
Out[2]:
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 | body_part_type | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | 17364900000006 | PASS | COMPLETE | True | 1 | 0.000 | None | alive | None | DFL-CLU-000004 | DFL-OBJ-0000SP | 56.41 | 68.00 | 77.75 | 38.71 | DFL-OBJ-0000ZS | KICK_OFF | NaN |
1 | 17364900000007 | PASS | COMPLETE | True | 1 | 3.123 | None | alive | None | DFL-CLU-000004 | DFL-OBJ-0000ZS | 73.94 | 37.21 | NaN | NaN | DFL-OBJ-002G3I | NaN | NaN |
2 | 17364900000014 | PASS | COMPLETE | True | 1 | 31.797 | None | alive | None | DFL-CLU-00000A | DFL-OBJ-00017V | 35.57 | 68.00 | 21.24 | 28.58 | DFL-OBJ-0027B9 | THROW_IN | NaN |
3 | 17364900000031 | SHOT | BLOCKED | False | 1 | 79.480 | None | alive | None | DFL-CLU-000004 | DFL-OBJ-002706 | 21.24 | 28.58 | NaN | NaN | NaN | NaN | RIGHT_FOOT |
4 | 17364900000036 | PASS | INCOMPLETE | False | 1 | 95.173 | None | alive | None | DFL-CLU-000004 | DFL-OBJ-002G3I | 8.72 | 4.21 | NaN | NaN | NaN | NaN | NaN |