Skip to content

Commit

Permalink
docs: commit gather, add developer section, sql translators
Browse files Browse the repository at this point in the history
  • Loading branch information
machow committed Aug 6, 2019
1 parent 6ab3c34 commit 44e46c9
Show file tree
Hide file tree
Showing 8 changed files with 435 additions and 5 deletions.
48 changes: 48 additions & 0 deletions docs/api_tidy/02_gather.Rmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
---
jupyter:
jupytext:
text_representation:
extension: .Rmd
format_name: rmarkdown
format_version: '1.1'
jupytext_version: 1.1.1
kernelspec:
display_name: Python 3
language: python
name: python3
---

```{python nbsphinx=hidden}
import pandas as pd
pd.set_option("display.max_rows", 20)
```

## Gather

```{python}
from siuba import _, nest, unnest, group_by, gather
from siuba.data import mtcars
```

```{python}
costs = pd.DataFrame({
'id': [1,2],
'price_x': [.1, .2],
'price_y': [.4, .5],
'price_z': [.7, .8]
})
costs
```

```{python}
costs >> gather('measure', 'value', _.price_x, _.price_y, _.price_z)
```

```{python}
costs >> gather('measure', 'value', _["price_x":"price_z"])
```

```{python}
costs >> gather('measure', 'value', -_.id)
```
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
]

# Exclude build directory and Jupyter backup files:
exclude_patterns = ['_build', '**.ipynb_checkpoints']
exclude_patterns = ['_build', '**.ipynb_checkpoints', '**.swp']

# Default language for syntax highlighting in reST and Markdown cells
highlight_language = 'none'
Expand Down
8 changes: 8 additions & 0 deletions docs/developer/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Developers
==========

.. toctree::
:maxdepth: 2

sql-translators.ipynb

Loading

0 comments on commit 44e46c9

Please sign in to comment.