tidypyverse / tidypandas

A grammar of data manipulation for pandas inspired by tidyverse
https://tidypyverse.github.io/tidypandas/
MIT License
91 stars 7 forks source link
data-analysis data-science dataframe dataframe-library dplyr pandas python tidyverse

PyPI
version

tidypandas

A grammar of data manipulation for pandas inspired by tidyverse

tidypandas python package provides minimal, pythonic API for common data manipulation tasks:

Example

df.filter(lambda x: x['col_1'] > x['col_1'].mean(), by = 'col_2')
(df.groupby('col2')
   .apply(lambda x: x.loc[x['col_1'] > x['col_1'].mean(), :])
   .reset_index(drop = True)
   )

Why use tidypandas

tidypandas is for you if:

tidypandas relies on the amazing pandas library and offers a consistent API with a different philosophy.

Presentation

Learn more about tidypandas (presentation)

Installation

  1. Install release version from Pypi using pip:

    pip install tidypandas
  2. For offline installation, use whl/tar file from the releases page on github.

Contribution/bug fixes/Issues:

  1. Open an issue/suggestion/bugfix on the github issues page.

  2. Use the master branch from github repo to submit your PR.