dplyr 适用于 Python
Welcome to Dplython: Dplyr for Python.
Dplyr is a library for the language R designed to make data analysis fast and easy. The philosophy of Dplyr is to constrain data manipulation to a few simple functions that correspond to the most common tasks. This maps thinking closer to the process of writing code, helping you move closer to analyze data at the "speed of thought".
The goal of this project is to implement the functionality of the R package Dplyr on top of Python's pandas.
This is version 0.0.7. It's experimental and subject to change.
Here is a 20 minute video explaining dplython, given at PyGotham 2016. Click the awkward picture above to see the talk! Note that sound doesn't start until about 1 minute in due to microphone issues.
To install, use pip:
pip install dplythonTo get the latest development version, you can clone this repo or use the command:
pip install git+https://github.com/dodger487/dplython.gitWe welcome your feature requests, open issues, bug reports, and pull requests! Please use GitHub's interface. Also consider joining the dplython mailing list.
…(diamonds >>
sift((X.clarity == "I1") | (X.clarity == "IF")) >>
ggplot(aes(x="carat", y="price", color="color"), X._) +
geom_point() +
facet_wrap("clarity"))# Matplotlib works as well!
import pylab as pl
pl.scatter = DelayFunction(pl.scatter)
diamonds >> sample_frac(0.1) >> pl.scatter(X.carat, X.price)This is very new and I'm matching changes. Let me know if you'd like to see a feature or think there's a better way I can do something.
Development of dplython began before I knew pandas-ply existed. After I found it, I chose "X" as the manager to be consistent. Pandas-ply is a great approach and worth taking a look. The main contrasts between the two are that:
暂无开放 Issues,或尚未同步最近议题。