Skip to content

Commit

Permalink
Minor
Browse files Browse the repository at this point in the history
  • Loading branch information
koenvossen committed May 15, 2020
1 parent d462b12 commit 2a17efd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ v0.2.1, 2020-05-12 -- Add some helpers functions to directly load a dataset by f
v0.3.0, 2020-05-15 -- Add FIFA EPTS Tracking data loader
Add some examples
Add datasets loader to directly load dataset from your python code
Add limit argument to all loaders
8 changes: 5 additions & 3 deletions examples/datasets/metrica.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from kloppy import datasets
from kloppy import datasets, to_pandas


def main():
Expand All @@ -12,8 +12,10 @@ def main():
print(len(data_set.frames))

# We can pass additional keyword arguments to the loaders to specify a different dataset
data_set = datasets.load("metrica_tracking", options={'sample_rate': 1, 'limit': 10}, game='game2')
print(len(data_set.frames))
data_set = datasets.load("metrica_tracking", options={'limit': 1000}, game='game2')

data_frame = to_pandas(data_set)
print(data_frame)


if __name__ == "__main__":
Expand Down

0 comments on commit 2a17efd

Please sign in to comment.