Pytennis
================

<!-- WARNING: THIS FILE WAS AUTOGENERATED! DO NOT EDIT! -->

## Install

`pip install pytennis`

## How to use

### Data

``` python
path = untar_data(URLs.ATP_2019_AUSTRALIAN_OPEN_SINGLES_FINAL)
path
```

    Path('/Users/robertseidl/.pytennis/data/ATP_2019_AustralianOpen_Singles_Final')

``` python
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')]

``` python
pd.read_csv(path/'rallies.csv', index_col=0).head()
```

<div>
<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>
<table border="1" class="dataframe">
  <thead>
    <tr style="text-align: right;">
      <th></th>
      <th>rallyid</th>
      <th>server</th>
      <th>returner</th>
      <th>winner</th>
      <th>reason</th>
      <th>serve</th>
      <th>strokes</th>
      <th>totaltime</th>
      <th>x</th>
      <th>y</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <th>0</th>
      <td>1</td>
      <td>Djokovic</td>
      <td>Nadal</td>
      <td>Djokovic</td>
      <td>winner</td>
      <td>first</td>
      <td>3</td>
      <td>0.92</td>
      <td>1.92</td>
      <td>21.96</td>
    </tr>
    <tr>
      <th>1</th>
      <td>2</td>
      <td>Djokovic</td>
      <td>Nadal</td>
      <td>__undefined__</td>
      <td>second_serve</td>
      <td>first</td>
      <td>1</td>
      <td>0.00</td>
      <td>7.42</td>
      <td>12.10</td>
    </tr>
    <tr>
      <th>2</th>
      <td>3</td>
      <td>Djokovic</td>
      <td>Nadal</td>
      <td>Djokovic</td>
      <td>out</td>
      <td>second</td>
      <td>4</td>
      <td>4.16</td>
      <td>3.33</td>
      <td>-0.39</td>
    </tr>
    <tr>
      <th>3</th>
      <td>4</td>
      <td>Djokovic</td>
      <td>Nadal</td>
      <td>__undefined__</td>
      <td>second_serve</td>
      <td>first</td>
      <td>1</td>
      <td>0.00</td>
      <td>4.64</td>
      <td>17.69</td>
    </tr>
    <tr>
      <th>4</th>
      <td>5</td>
      <td>Djokovic</td>
      <td>Nadal</td>
      <td>Djokovic</td>
      <td>ace</td>
      <td>second</td>
      <td>2</td>
      <td>0.40</td>
      <td>1.62</td>
      <td>17.18</td>
    </tr>
  </tbody>
</table>
</div>
