In [3]:
Copied!
from kloppy import statsperform
dataset = statsperform.load(
raw_data="../../kloppy/tests/files/statsperform_ma25_tracking.txt",
meta_data="../../kloppy/tests/files/statsperform_ma1_metadata.xml",
# Optional arguments
coordinates="statsperform"
)
dataset.to_df().head()
from kloppy import statsperform
dataset = statsperform.load(
raw_data="../../kloppy/tests/files/statsperform_ma25_tracking.txt",
meta_data="../../kloppy/tests/files/statsperform_ma1_metadata.xml",
# Optional arguments
coordinates="statsperform"
)
dataset.to_df().head()
Out[3]:
period_id | timestamp | frame_id | ball_state | ball_owning_team_id | ball_x | ball_y | ball_z | a2s2c6anax9wnlsw1s6vunl5h_x | a2s2c6anax9wnlsw1s6vunl5h_y | ... | 6wfwy94p5bm0zv3aku0urfq39_d | 6wfwy94p5bm0zv3aku0urfq39_s | 6ekdnbnk56xlxforb5owt3dn9_x | 6ekdnbnk56xlxforb5owt3dn9_y | 6ekdnbnk56xlxforb5owt3dn9_d | 6ekdnbnk56xlxforb5owt3dn9_s | ct32113pfx5q9avf2c0x208ru_x | ct32113pfx5q9avf2c0x208ru_y | ct32113pfx5q9avf2c0x208ru_d | ct32113pfx5q9avf2c0x208ru_s | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | 1 | 0.0 | 1598184000000 | alive | None | 52.350 | 33.250 | 0.0 | 52.803 | 23.617 | ... | None | None | 5.268 | 33.556 | None | None | NaN | NaN | None | None |
1 | 1 | 0.1 | 1598184000100 | alive | None | 50.615 | 35.325 | 0.0 | 52.558 | 23.752 | ... | None | None | 5.265 | 33.529 | None | None | NaN | NaN | None | None |
2 | 1 | 0.2 | 1598184000200 | alive | None | 49.630 | 36.140 | 0.0 | 52.310 | 23.901 | ... | None | None | 5.264 | 33.502 | None | None | NaN | NaN | None | None |
3 | 1 | 0.3 | 1598184000300 | alive | None | 48.725 | 36.625 | 0.0 | 52.059 | 24.071 | ... | None | None | 5.268 | 33.476 | None | None | NaN | NaN | None | None |
4 | 1 | 0.4 | 1598184000400 | alive | None | 47.890 | 37.130 | 0.0 | 51.804 | 24.260 | ... | None | None | 5.277 | 33.452 | None | None | NaN | NaN | None | None |
5 rows × 100 columns
In [ ]:
Copied!