pypdtools


Namepypdtools JSON
Version 0.0.5 PyPI version JSON
download
home_page
SummaryPackage with tools for pandas
upload_time2023-07-14 18:51:03
maintainer
docs_urlNone
author
requires_python>=3.7
license
keywords pandas tools asyncio
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Pypdtools

Pypdtools is a Python package that extends the functionality of Pandas DataFrames by introducing the `PtDataFrame` class. `PtDataFrame` provides additional features and enhancements to work with DataFrames in a more convenient and flexible way.

## Features

- Asynchronous iteration support: `PtDataFrame` implements both synchronous and asynchronous iterators, allowing for efficient and convenient data processing in asynchronous contexts.
- Context manager support: `PtDataFrame` can be used as a context manager to easily access the encapsulated Pandas DataFrame.
- Concatenation and reduction: `PtDataFrame` supports concatenation of multiple instances and reduction of a list of `PtDataFrame` objects into a single instance.
- Column extraction: Easily extract a column as a list from a `PtDataFrame`.

**Docs:** <a href="https://msbar.github.io/pypdtools" target="_blank">https://msbar.github.io/pypdtools</a>

**Source code:** <a href="https://github.com/msbar/pypdtools" target="_blank">https://github.com/msbar/pypdtools</a>

## Installation

You can install pypdtools using pip:
```
pip install pypdtools
```

## Usage

Here's an example of how to use the `PtDataFrame` class:

```python
import pandas as pd
from pypdtools.core.dataframe import PtDataFrame

# Create a Pandas DataFrame
data = {
    "a": [1, 2, 3],
    "b": [4, 5, 6],
    "c": [7, 8, 9]
}
df = pd.DataFrame(data)

# Create a PtDataFrame from the Pandas DataFrame
pt_df = PtDataFrame(df)

# Async Iterate over rows
async for row in pt_df:
    print(row)

# Concatenate PtDataFrames
pt_df2 = PtDataFrame(df)
concatenated = pt_df + pt_df2

# Reduce a list of PtDataFrames
pt_df3 = PtDataFrame.reduce([pt_df, pt_df2])

# Extract a column as a list
col_values = pt_df.col_to_list("a")
print(col_values)
```

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "pypdtools",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": "",
    "keywords": "pandas,tools,asyncio",
    "author": "",
    "author_email": "Marciel Barcellos <marciel.barcellos@tcmrio.tc.br>",
    "download_url": "https://files.pythonhosted.org/packages/da/25/2fe3c07cc75ebf69aa0618c4a6fce3685626e733ab35e3a9eb8c8a8fd12e/pypdtools-0.0.5.tar.gz",
    "platform": null,
    "description": "# Pypdtools\r\n\r\nPypdtools is a Python package that extends the functionality of Pandas DataFrames by introducing the `PtDataFrame` class. `PtDataFrame` provides additional features and enhancements to work with DataFrames in a more convenient and flexible way.\r\n\r\n## Features\r\n\r\n- Asynchronous iteration support: `PtDataFrame` implements both synchronous and asynchronous iterators, allowing for efficient and convenient data processing in asynchronous contexts.\r\n- Context manager support: `PtDataFrame` can be used as a context manager to easily access the encapsulated Pandas DataFrame.\r\n- Concatenation and reduction: `PtDataFrame` supports concatenation of multiple instances and reduction of a list of `PtDataFrame` objects into a single instance.\r\n- Column extraction: Easily extract a column as a list from a `PtDataFrame`.\r\n\r\n**Docs:** <a href=\"https://msbar.github.io/pypdtools\" target=\"_blank\">https://msbar.github.io/pypdtools</a>\r\n\r\n**Source code:** <a href=\"https://github.com/msbar/pypdtools\" target=\"_blank\">https://github.com/msbar/pypdtools</a>\r\n\r\n## Installation\r\n\r\nYou can install pypdtools using pip:\r\n```\r\npip install pypdtools\r\n```\r\n\r\n## Usage\r\n\r\nHere's an example of how to use the `PtDataFrame` class:\r\n\r\n```python\r\nimport pandas as pd\r\nfrom pypdtools.core.dataframe import PtDataFrame\r\n\r\n# Create a Pandas DataFrame\r\ndata = {\r\n    \"a\": [1, 2, 3],\r\n    \"b\": [4, 5, 6],\r\n    \"c\": [7, 8, 9]\r\n}\r\ndf = pd.DataFrame(data)\r\n\r\n# Create a PtDataFrame from the Pandas DataFrame\r\npt_df = PtDataFrame(df)\r\n\r\n# Async Iterate over rows\r\nasync for row in pt_df:\r\n    print(row)\r\n\r\n# Concatenate PtDataFrames\r\npt_df2 = PtDataFrame(df)\r\nconcatenated = pt_df + pt_df2\r\n\r\n# Reduce a list of PtDataFrames\r\npt_df3 = PtDataFrame.reduce([pt_df, pt_df2])\r\n\r\n# Extract a column as a list\r\ncol_values = pt_df.col_to_list(\"a\")\r\nprint(col_values)\r\n```\r\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "Package with tools for pandas",
    "version": "0.0.5",
    "project_urls": {
        "Bug Tracker": "https://github.com/msbar/pypdtools/issues",
        "Documentation": "https://msbar.github.io/pypdtools/",
        "source": "https://github.com/msbar/pypdtools"
    },
    "split_keywords": [
        "pandas",
        "tools",
        "asyncio"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0c61b303f5a98f97459eae385874ec9c4351260c1b99367bb4e629f9df2f1572",
                "md5": "c32aa0fc3a668e07f22b3978dbbcf56f",
                "sha256": "247bbb8cbf528ed84020e1d756a72cd014c40e37be94cc6e7ebfb67b8caba629"
            },
            "downloads": -1,
            "filename": "pypdtools-0.0.5-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "c32aa0fc3a668e07f22b3978dbbcf56f",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 9192,
            "upload_time": "2023-07-14T18:51:01",
            "upload_time_iso_8601": "2023-07-14T18:51:01.698083Z",
            "url": "https://files.pythonhosted.org/packages/0c/61/b303f5a98f97459eae385874ec9c4351260c1b99367bb4e629f9df2f1572/pypdtools-0.0.5-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "da252fe3c07cc75ebf69aa0618c4a6fce3685626e733ab35e3a9eb8c8a8fd12e",
                "md5": "49d7089316d499f09e6667b91f91513a",
                "sha256": "8d813b3af14f620713bfbcf05cf64297b06042944d2d2ce73f7e1152dfdcd08c"
            },
            "downloads": -1,
            "filename": "pypdtools-0.0.5.tar.gz",
            "has_sig": false,
            "md5_digest": "49d7089316d499f09e6667b91f91513a",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 8164,
            "upload_time": "2023-07-14T18:51:03",
            "upload_time_iso_8601": "2023-07-14T18:51:03.227370Z",
            "url": "https://files.pythonhosted.org/packages/da/25/2fe3c07cc75ebf69aa0618c4a6fce3685626e733ab35e3a9eb8c8a8fd12e/pypdtools-0.0.5.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-07-14 18:51:03",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "msbar",
    "github_project": "pypdtools",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "pypdtools"
}
        
Elapsed time: 0.08827s