Skip to content

Commit

Permalink
0.0.3
Browse files Browse the repository at this point in the history
  • Loading branch information
pwwang committed Apr 30, 2021
1 parent c8b4b0f commit 5c241c6
Show file tree
Hide file tree
Showing 8 changed files with 42 additions and 52 deletions.
1 change: 1 addition & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ repos:
rev: 5df1a4bf6f04a1ed3a643167b38d502575e29aef
hooks:
- id: trailing-whitespace
exclude: 'docs/'
- id: end-of-file-fixer
- id: check-yaml
- repo: local
Expand Down
16 changes: 7 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,15 @@ df >> mutate(z=if_else(f.x>1, 1, 0))
df >> filter(f.x>1)
"""# output:
x y
2 2 two
3 3 three
0 2 two
1 3 three
"""

df >> mutate(z=if_else(f.x>1, 1, 0)) >> filter(f.z==1)
"""# output:
x y z
2 2 two 1
3 3 three 1
0 2 two 1
1 3 three 1
"""
```

Expand All @@ -65,10 +65,9 @@ from datar.base import sin, pi
from plotnine import ggplot, aes, geom_line, theme_classic

df = tibble(x=numpy.linspace(0, 2*pi, 500))
(
df >>
mutate(y=sin(f.x), sign=if_else(f.y>=0, "positive", "negative")) >>
ggplot(aes(x='x', y='y')) + theme_classic()
(df >>
mutate(y=sin(f.x), sign=if_else(f.y>=0, "positive", "negative")) >>
ggplot(aes(x='x', y='y')) + theme_classic()
) + geom_line(aes(color='sign'), size=1.2)
```

Expand All @@ -79,7 +78,6 @@ df = tibble(x=numpy.linspace(0, 2*pi, 500))
# for example: klib
import klib
from pipda import register_verb
from datar.core.contexts import Context
from datar.datasets import iris
from datar.dplyr import pull

Expand Down
2 changes: 1 addition & 1 deletion datar/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
from .core import operator as _datar_operator
from .core.defaults import f

__version__ = '0.0.2'
__version__ = '0.0.3'
4 changes: 4 additions & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
## 0.0.3
- Add stats.weighted_mean
- Allow function to prefer recycling input or output for summarise

## 0.0.2
- Port verbs and functions from tidyverse/dplyr and test them with original cases
2 changes: 2 additions & 0 deletions docs/TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@
- Add tests for tidyr from original tidyverse/tidyr cases
- Add more tests for base/core
- Port more functions from `r-base`, `r-stats`, etc
- Port more datasets from `r-datasets` namespace
- Add more detailed documentations
61 changes: 23 additions & 38 deletions docs/notebooks/readme.ipynb

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[tool.poetry]
name = "datar"
version = "0.0.2"
description = "Probably the closest port of tidyr, dplyr and tibble in python"
version = "0.0.3"
description = "Port of R data packages tidyr, dplyr, tibble and so on in python"
authors = ["pwwang <[email protected]>"]
license = "MIT"

Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
setup(
long_description=readme,
name='datar',
version='0.0.2',
description='Probably the closest port of tidyr, dplyr and tibble in python',
version='0.0.3',
description='Port of R data packages tidyr, dplyr, tibble and so on in python',
python_requires='==3.*,>=3.7.1',
author='pwwang',
author_email='[email protected]',
Expand Down

0 comments on commit 5c241c6

Please sign in to comment.