tidypandas


Nametidypandas JSON
Version 0.3.0 PyPI version JSON
download
home_pagehttps://talegari.github.io/tidypandas/
SummaryA grammar of data manipulation for pandas inspired by tidyverse
upload_time2023-08-16 12:38:45
maintainerSrikanth Komala Sheshachala
docs_urlNone
authorSrikanth Komala Sheshachala
requires_python>=3.8,<4.0
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ![](docs/logo.png)

[![PyPI
version](https://badge.fury.io/py/tidypandas.svg)](https://badge.fury.io/py/tidypandas)

# `tidypandas`

> A **grammar of data manipulation** for
> [pandas](https://pandas.pydata.org/docs/index.html) inspired by
> [tidyverse](https://tidyverse.tidyverse.org/)

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

-   `tidyframe` class (wrapper over pandas dataframe) provides a
    dataframe with simplified index structure (no more resetting indexes
    and multi indexes)
-   Consistent ‘verbs’ (`select`, `arrange`, `distinct`, …) as methods
    to `tidyframe` class which mostly return a `tidyframe`
-   Unified interface for summarizing (aggregation) and mutate (assign)
    operations across groups
-   Utilites for pandas dataframes and series
-   Uses simple python data structures, No esoteric classes, No pipes,
    No Non-standard evaluation
-   No copy data conversion between `tidyframe` and pandas dataframes
-   An accessor to apply `tidyframe` verbs to simple pandas datarames
-   …

## Example

-   `tidypandas` code:

<!-- -->

    df.filter(lambda x: x['col_1'] > x['col_1'].mean(), by = 'col_2')

-   equivalent pandas code:

<!-- -->

    (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:

-   you *frequently* write data manipulation code using pandas
-   you prefer to have stay in pandas ecosystem (see accessor)
-   you *prefer* to remember a [limited set of
    methods](https://medium.com/dunder-data/minimally-sufficient-pandas-a8e67f2a2428)
-   you do not want to write (or be surprised by)
    [`reset_index`](https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.reset_index.html),
    [`rename_axis`](https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.rename_axis.html)
    often
-   you prefer writing free flowing, expressive code in
    [dplyr](https://dplyr.tidyverse.org/) style

> `tidypandas` relies on the amazing `pandas` library and offers a
> consistent API with a different
> [philosophy](https://tidyverse.tidyverse.org/articles/manifesto.html).

## Presentation

Learn more about tidypandas
([presentation](https://github.com/talegari/tidypandas/blob/master/docs/tp_pres.html))

## Installation

1.  Install release version from Pypi using pip:

        pip install tidypandas

2.  For offline installation, use whl/tar file from the [releases
    page](https://github.com/talegari/tidypandas/releases) on github.

## Contribution/bug fixes/Issues:

1.  Open an issue/suggestion/bugfix on the github
    [issues](https://github.com/talegari/tidypandas/issues) page.

2.  Use the master branch from
    [github](https://github.com/talegari/tidypandas) repo to submit your
    PR.

------------------------------------------------------------------------

            

Raw data

            {
    "_id": null,
    "home_page": "https://talegari.github.io/tidypandas/",
    "name": "tidypandas",
    "maintainer": "Srikanth Komala Sheshachala",
    "docs_url": null,
    "requires_python": ">=3.8,<4.0",
    "maintainer_email": "sri.teach@gmail.com",
    "keywords": "",
    "author": "Srikanth Komala Sheshachala",
    "author_email": "sri.teach@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/bf/99/bab5ba35023f056fae45af3e7f37cb9289224db36e0d35b3b848ab4975f4/tidypandas-0.3.0.tar.gz",
    "platform": null,
    "description": "![](docs/logo.png)\n\n[![PyPI\nversion](https://badge.fury.io/py/tidypandas.svg)](https://badge.fury.io/py/tidypandas)\n\n# `tidypandas`\n\n> A **grammar of data manipulation** for\n> [pandas](https://pandas.pydata.org/docs/index.html) inspired by\n> [tidyverse](https://tidyverse.tidyverse.org/)\n\n`tidypandas` python package provides *minimal, pythonic* API for common\ndata manipulation tasks:\n\n-   `tidyframe` class (wrapper over pandas dataframe) provides a\n    dataframe with simplified index structure (no more resetting indexes\n    and multi indexes)\n-   Consistent \u2018verbs\u2019 (`select`, `arrange`, `distinct`, \u2026) as methods\n    to `tidyframe` class which mostly return a `tidyframe`\n-   Unified interface for summarizing (aggregation) and mutate (assign)\n    operations across groups\n-   Utilites for pandas dataframes and series\n-   Uses simple python data structures, No esoteric classes, No pipes,\n    No Non-standard evaluation\n-   No copy data conversion between `tidyframe` and pandas dataframes\n-   An accessor to apply `tidyframe` verbs to simple pandas datarames\n-   \u2026\n\n## Example\n\n-   `tidypandas` code:\n\n<!-- -->\n\n    df.filter(lambda x: x['col_1'] > x['col_1'].mean(), by = 'col_2')\n\n-   equivalent pandas code:\n\n<!-- -->\n\n    (df.groupby('col2')\n       .apply(lambda x: x.loc[x['col_1'] > x['col_1'].mean(), :])\n       .reset_index(drop = True)\n       )\n\n## Why use `tidypandas`\n\n`tidypandas` is for you if:\n\n-   you *frequently* write data manipulation code using pandas\n-   you prefer to have stay in pandas ecosystem (see accessor)\n-   you *prefer* to remember a [limited set of\n    methods](https://medium.com/dunder-data/minimally-sufficient-pandas-a8e67f2a2428)\n-   you do not want to write (or be surprised by)\n    [`reset_index`](https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.reset_index.html),\n    [`rename_axis`](https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.rename_axis.html)\n    often\n-   you prefer writing free flowing, expressive code in\n    [dplyr](https://dplyr.tidyverse.org/) style\n\n> `tidypandas` relies on the amazing `pandas` library and offers a\n> consistent API with a different\n> [philosophy](https://tidyverse.tidyverse.org/articles/manifesto.html).\n\n## Presentation\n\nLearn more about tidypandas\n([presentation](https://github.com/talegari/tidypandas/blob/master/docs/tp_pres.html))\n\n## Installation\n\n1.  Install release version from Pypi using pip:\n\n        pip install tidypandas\n\n2.  For offline installation, use whl/tar file from the [releases\n    page](https://github.com/talegari/tidypandas/releases) on github.\n\n## Contribution/bug fixes/Issues:\n\n1.  Open an issue/suggestion/bugfix on the github\n    [issues](https://github.com/talegari/tidypandas/issues) page.\n\n2.  Use the master branch from\n    [github](https://github.com/talegari/tidypandas) repo to submit your\n    PR.\n\n------------------------------------------------------------------------\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A grammar of data manipulation for pandas inspired by tidyverse",
    "version": "0.3.0",
    "project_urls": {
        "Documentation": "https://talegari.github.io/tidypandas/_build/html/autoapi/index.html",
        "Homepage": "https://talegari.github.io/tidypandas/",
        "Repository": "https://github.com/talegari/tidypandas"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0c6ac2b678af80a683f63331a3bfb3a1924e9829ec8d992dd5d70367f0a25706",
                "md5": "c062e6206916f8b01e5a03c29380bdad",
                "sha256": "7c3b85e3068ffdcbac623d01c9c7352066c88f5d6b5be5f8a95ae0b429a40c6b"
            },
            "downloads": -1,
            "filename": "tidypandas-0.3.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "c062e6206916f8b01e5a03c29380bdad",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8,<4.0",
            "size": 52910,
            "upload_time": "2023-08-16T12:38:43",
            "upload_time_iso_8601": "2023-08-16T12:38:43.412680Z",
            "url": "https://files.pythonhosted.org/packages/0c/6a/c2b678af80a683f63331a3bfb3a1924e9829ec8d992dd5d70367f0a25706/tidypandas-0.3.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "bf99bab5ba35023f056fae45af3e7f37cb9289224db36e0d35b3b848ab4975f4",
                "md5": "a150f699aad3f1d6bb905258fedfc7d2",
                "sha256": "4e3e14bf3d4a1ffa88508cd1db192ae989a4f467b34a61c5497242c6087db8af"
            },
            "downloads": -1,
            "filename": "tidypandas-0.3.0.tar.gz",
            "has_sig": false,
            "md5_digest": "a150f699aad3f1d6bb905258fedfc7d2",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8,<4.0",
            "size": 51542,
            "upload_time": "2023-08-16T12:38:45",
            "upload_time_iso_8601": "2023-08-16T12:38:45.824755Z",
            "url": "https://files.pythonhosted.org/packages/bf/99/bab5ba35023f056fae45af3e7f37cb9289224db36e0d35b3b848ab4975f4/tidypandas-0.3.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-08-16 12:38:45",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "talegari",
    "github_project": "tidypandas",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "tidypandas"
}
        
Elapsed time: 0.38542s