百科.dev
全部条目AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
D

dplython

> 编程语言
开源

dplyr 适用于 Python

761 stars0 点赞0 次浏览
访问官网GitHub

工具介绍

dplyr 适用于 Python

Dplython: Dplyr for 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.

  • Dplyr: Click here
  • Pandas: Click here

This is version 0.0.7. It's experimental and subject to change.

Introductory Video

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.

Installation

To install, use pip:

bash
pip install dplython

To get the latest development version, you can clone this repo or use the command:

bash
pip install git+https://github.com/dodger487/dplython.git

Contributing

We welcome your feature requests, open issues, bug reports, and pull requests! Please use GitHub's interface. Also consider joining the dplython mailing list.

Example usage

…
python
(diamonds >>
  sift((X.clarity == "I1") | (X.clarity == "IF")) >> 
  ggplot(aes(x="carat", y="price", color="color"), X._) + 
    geom_point() + 
    facet_wrap("clarity"))
python
# 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.

Other approaches

  • pandas-ply

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:

  • dplython uses dplyr-style groups, as opposed to the SQL-style groups of pandas and pandas-ply
  • dplython maps a little more directly onto dplyr, for example having mutate instead of an expanded select.
  • Use of operators to connect operations instead of method-chaining

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Python

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言