Skip to main content

A Python library for tennis data analysis.

Project description

Pytennis

Install

pip install pytennis

How to use

Data

path = untar_data(URLs.ATP_2019_AUSTRALIAN_OPEN_SINGLES_FINAL)
path
Path('/Users/robertseidl/.pytennis/data/ATP_2019_AustralianOpen_Singles_Final')
path.ls()
(#4) [Path('/Users/robertseidl/.pytennis/data/ATP_2019_AustralianOpen_Singles_Final/rallies.csv'),Path('/Users/robertseidl/.pytennis/data/ATP_2019_AustralianOpen_Singles_Final/points.csv'),Path('/Users/robertseidl/.pytennis/data/ATP_2019_AustralianOpen_Singles_Final/events.csv'),Path('/Users/robertseidl/.pytennis/data/ATP_2019_AustralianOpen_Singles_Final/serves.csv')]
pd.read_csv(path/'rallies.csv', index_col=0).head()
<style scoped> .dataframe tbody tr th:only-of-type { vertical-align: middle; }
.dataframe tbody tr th {
    vertical-align: top;
}

.dataframe thead th {
    text-align: right;
}
</style>
rallyid server returner winner reason serve strokes totaltime x y
0 1 Djokovic Nadal Djokovic winner first 3 0.92 1.92 21.96
1 2 Djokovic Nadal __undefined__ second_serve first 1 0.00 7.42 12.10
2 3 Djokovic Nadal Djokovic out second 4 4.16 3.33 -0.39
3 4 Djokovic Nadal __undefined__ second_serve first 1 0.00 4.64 17.69
4 5 Djokovic Nadal Djokovic ace second 2 0.40 1.62 17.18

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pytennis-0.0.2.tar.gz (16.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pytennis-0.0.2-py3-none-any.whl (14.0 kB view details)

Uploaded Python 3

File details

Details for the file pytennis-0.0.2.tar.gz.

File metadata

  • Download URL: pytennis-0.0.2.tar.gz
  • Upload date:
  • Size: 16.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.3 readme-renderer/37.0 requests/2.28.1 requests-toolbelt/0.9.1 urllib3/1.26.12 tqdm/4.64.0 importlib-metadata/4.12.0 keyring/23.8.2 rfc3986/2.0.0 colorama/0.4.5 CPython/3.8.13

File hashes

Hashes for pytennis-0.0.2.tar.gz
Algorithm Hash digest
SHA256 7f8edd9ed707029ba75cd157c1718f0c4559afd6d2ffa1baf9fe901a7971cab5
MD5 10c4e0102b0d7860044144d0ca59c69e
BLAKE2b-256 c60755214c6b5e91c18dba941415755f5328c729c30fae1a5e84ba03a6a06dec

See more details on using hashes here.

File details

Details for the file pytennis-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: pytennis-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 14.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.3 readme-renderer/37.0 requests/2.28.1 requests-toolbelt/0.9.1 urllib3/1.26.12 tqdm/4.64.0 importlib-metadata/4.12.0 keyring/23.8.2 rfc3986/2.0.0 colorama/0.4.5 CPython/3.8.13

File hashes

Hashes for pytennis-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 b7fb604fb6998cc5a38092a8d2b3dd06861cd461f8428737ecf8832ebd813600
MD5 10746652164fe6fc59b03f71cd21f7ec
BLAKE2b-256 9ebe2e540057c15c532bbff3d3a701c0b9934215c280d2be56dc78a0f3ebd774

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page