datar
siuba
datar | siuba | |
---|---|---|
4 | 25 | |
255 | 1,100 | |
- | - | |
7.4 | 7.5 | |
about 2 months ago | 8 months ago | |
Python | Python | |
MIT License | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
datar
- Difficulty transitioning between R and Python?
- What would it take to recreate dplyr in Python?
-
datar: the dplyr in python
datar does not only mimic the piping syntax, but follows the API design from dplyr as much as possible, and is tested with its test cases.
df = tibble( x=range(4), y=['zero', 'one', 'two', 'three'] ) df >> mutate(z=f.x) """# output x y z 0 0 zero 0 1 1 one 1 2 2 two 2 3 3 three 3 """ df >> mutate(z=if_else(f.x>1, 1, 0)) """# output: x y z 0 0 zero 0 1 1 one 0 2 2 two 1 3 3 three 1 """ df >> filter(f.x>1) """# output: x y 0 2 two 1 3 three """ df >> mutate(z=if_else(f.x>1, 1, 0)) >> filter(f.z==1) """# output: x y z 0 2 two 1 1 3 three 1 """ ``` Works with plotnine ```python example grabbed from https://github.com/has2k1/plydata import numpy 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() + geom_line(aes(color='sign'), size=1.2)) ``` ![plotnine](https://github.com/pwwang/datar/raw/master/example.png) Easy to integrate with other libraries ```python import klib from pipda import register_verb from datar.datasets import iris from datar.dplyr import pull dist_plot = register_verb(func=klib.dist_plot) iris >> pull(f.Sepal_Length) >> dist_plot() ``` ![klib](https://github.com/pwwang/datar/raw/master/example2.png) For more detailed and advanced usage, see https://pwwang.github.io/datar/
siuba
- The Design Philosophy of Great Tables (Software Package)
-
Best alternative to Pandas 2023?
I don't know what's best for you, but I can recommend Siuba, a tidy interface for Python to send queries to pandas and SQL-db.
- Method Chaining in Pandas: Bad Form or a Recipe for Success?
-
Happy Halloween, Pandas! 🎃🤓
You mean siuba?
-
Explorer (Elixir and Polars)
For further inspiration, this is a pretty good-looking "dplyr for Python": https://github.com/machow/siuba
- Unpopular opinion: Matplotlib is a bad library
- A trick to have arbitrary infix operators in Python
-
Going from R to Pandas: dplython vs dfply vs plydata
You should follow /u/the75th's advice. However, if you decide to buck that take, I'd look into siuba. I've never heard of those packages you've listed, and have doubts they'd be maintained.
- Tidyverse equivalent in Python?
-
R / Tidyverse User -> Python | How to Make it Hurt Less
Check out siuba
What are some alternatives?
pipda - A framework for data piping in python
Pandas - Flexible and powerful data analysis / manipulation library for Python, providing labeled data structures similar to R data.frame objects, statistical functions, and much more
plydata - A grammar for data manipulation in Python
dtale - Visualizer for pandas data structures
Altair - Declarative statistical visualization library for Python
q - q - Run SQL directly on delimited files and multi-file sqlite databases
vinum - Vinum is a SQL processor for Python, designed for data analysis workflows and in-memory analytics.
DataFramesMeta.jl - Metaprogramming tools for DataFrames
data.table - R's data.table package extends data.frame:
sspipe - Simple Smart Pipe: python productivity-tool for rapid data manipulation
K3D-jupyter - K3D lets you create 3D plots backed by WebGL with high-level API (surfaces, isosurfaces, voxels, mesh, cloud points, vtk objects, volume renderer, colormaps, etc). The primary aim of K3D-jupyter is to be easy for use as stand alone package like matplotlib, but also to allow interoperation with existing libraries as VTK.
swifter - A package which efficiently applies any function to a pandas dataframe or series in the fastest available manner