tidypandas


Nametidypandas JSON
Version 0.1.4 PyPI version JSON
download
home_pagehttps://talegari.github.io/tidypandas/
SummaryA grammar of data manipulation for pandas inspired by tidyverse
upload_time2022-05-14 18:00:17
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.
            [![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[lambda y: y['col_1'] > y['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).

## 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 tp 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/c9/50/d4bf70144559700b518f7af2d87ded6bb810f243603a5dfdf6cf190e747d/tidypandas-0.1.4.tar.gz",
    "platform": null,
    "description": "[![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[lambda y: y['col_1'] > y['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## 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 tp 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.1.4",
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "md5": "3328820f4074e9d85fd07900d6b87dad",
                "sha256": "96bc0fc4266b0291671f539ee973b89e15d07f665e904391170ae8c01da29e52"
            },
            "downloads": -1,
            "filename": "tidypandas-0.1.4-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "3328820f4074e9d85fd07900d6b87dad",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8,<4.0",
            "size": 47087,
            "upload_time": "2022-05-14T18:00:14",
            "upload_time_iso_8601": "2022-05-14T18:00:14.959467Z",
            "url": "https://files.pythonhosted.org/packages/1b/1e/f458840d01eb2530d1955df21e0cbc6042e7957cb41faacde2827eb4450a/tidypandas-0.1.4-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "md5": "bbc82e72f4816b6fadd4856083d08bd1",
                "sha256": "4691f9d91d11ecedd2623408654e7e9cc89441bceedf8145f21e0d34d490bfa8"
            },
            "downloads": -1,
            "filename": "tidypandas-0.1.4.tar.gz",
            "has_sig": false,
            "md5_digest": "bbc82e72f4816b6fadd4856083d08bd1",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8,<4.0",
            "size": 45830,
            "upload_time": "2022-05-14T18:00:17",
            "upload_time_iso_8601": "2022-05-14T18:00:17.260243Z",
            "url": "https://files.pythonhosted.org/packages/c9/50/d4bf70144559700b518f7af2d87ded6bb810f243603a5dfdf6cf190e747d/tidypandas-0.1.4.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2022-05-14 18:00:17",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "lcname": "tidypandas"
}
        
Elapsed time: 0.38649s