Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update API to use Pandas Accessor Extensions #50

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

HHammond
Copy link
Owner

After looking over https://pandas.pydata.org/pandas-docs/stable/extending.html I've extended the PrettyPandas API to use pandas accessors.

With this update you can now write code like this:

(
    df
    .summarize
    .average()
    .total(axis=1)
    .as_percent(subset=['a', 'Total'])
    .as_currency('EUR', subset=['b'])
)

This PR also has a few bug fixes and expanded support for pandas Series objects.

@Zsailer
Copy link

Zsailer commented Oct 16, 2019

@HHammond great stuff here.

I thought I'd point you to pandas-flavor. It backports the Pandas extensions API to older versions of Pandas. It also includes method registration, enabling you to register methods directly to DataFrame and Series APIs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants