funcnodes-pandas


Namefuncnodes-pandas JSON
Version 0.2.11 PyPI version JSON
download
home_pageNone
Summarypandas nodes for funcnodes
upload_time2024-11-11 13:57:10
maintainerNone
docs_urlNone
authorJulian Kimmig
requires_python>=3.11
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # funcnodes-pandas

`funcnodes-pandas` is an extension for the [Funcnodes](https://github.com/linkdlab/funcnodes) framework that allows you to manipulate [Pandas](https://pandas.pydata.org/) DataFrames and Series using **FuncNodes**' visual node-based system. It provides a collection of nodes for performing typical operations on Pandas data structures, such as conversions, data manipulations, and calculations.

This library enables **no-code** and **low-code** workflows for **Pandas** by providing drag-and-drop functionality in a visual interface. It also supports Python-based scripting to handle more complex operations.

## Features

- **DataFrame Conversion**:
  - Convert DataFrames to dictionaries and vice versa.
  - Handle CSV and Excel files easily using DataFrame nodes.
- **Data Manipulation**:

  - Add, drop, and manipulate rows and columns of a DataFrame.
  - Handle missing data with nodes for `fillna`, `dropna`, `ffill`, and `bfill`.
  - Perform merges and joins with intuitive nodes for `merge`, `concatenate`, and `join`.

- **Math & Statistical Operations**:

  - Perform descriptive statistics like `mean`, `sum`, `std`, `var`, and `corr`.
  - Evaluate custom expressions directly on DataFrames using the `eval` node.

- **Masking & Filtering**:

  - Apply masks to filter DataFrame data.
  - Use conditions to filter rows and columns dynamically.

- **Grouping & Aggregation**:

  - Group data using `groupby` and aggregate it with `sum`, `mean`, `count`, etc.
  - Easily convert groups into lists of DataFrames.

- **Series Support**:
  - Nodes for converting Series to lists and dictionaries.
  - Access individual elements using `iloc` and `loc`.
  - Perform string operations on Series.

## Installation

Install the package with:

```bash
pip install funcnodes-pandas
```

Ensure that you have **Pandas** and **FuncNodes** installed.

## Getting Started

Here's an overview of the basic programmatically usage of **funcnodes-pandas**.

1. **Convert a DataFrame to a Dictionary**

```python
import pandas as pd
import funcnodes_pandas as fnpd

df = pd.DataFrame({"A": [1, 2, 3], "B": [4, 5, 6]})
node = fnpd.to_dict()
node.inputs['df'].value = df
await node
print(node.outputs['dict'].value)
```

This code converts a DataFrame to a dictionary using the `to_dict` node.

2. **Filling Missing Data**

```python
node = fnpd.fillna()
node.inputs["df"].value = df
node.inputs["value"].value = 0
await node
print(node.outputs["out"].value)
```

The `fillna` node fills missing data in a DataFrame.

3. **Group By Operations**

```python
node = fnpd.group_by()
node.inputs["df"].value = df
node.inputs["by"].value = "A"
await node
print(node.outputs["grouped"].value)
```

This groups data based on column `A` in the DataFrame.

## Testing

The repository contains a suite of tests to ensure that the various functionalities of `funcnodes-pandas` work as expected. The tests are based on **unittest** and **IsolatedAsyncioTestCase**. You can run the tests using:

```bash
python -m unittest discover
```

Test cases for operations such as `groupby`, `add_column`, `dropna`, etc., are included.

## Contribution

Feel free to contribute to this project by submitting pull requests. You can help by adding new nodes, fixing bugs, or enhancing documentation.

## License

This project is licensed under the MIT License.

## Contact

For any questions or issues, please open an issue on the GitHub repository.


            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "funcnodes-pandas",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.11",
    "maintainer_email": null,
    "keywords": null,
    "author": "Julian Kimmig",
    "author_email": "julian.kimmig@gmx.net",
    "download_url": "https://files.pythonhosted.org/packages/bf/40/79f22f06f97d5d19aecc681cde793bb8b9b6f106e384f8b2b1dc7fa417fd/funcnodes_pandas-0.2.11.tar.gz",
    "platform": null,
    "description": "# funcnodes-pandas\n\n`funcnodes-pandas` is an extension for the [Funcnodes](https://github.com/linkdlab/funcnodes) framework that allows you to manipulate [Pandas](https://pandas.pydata.org/) DataFrames and Series using **FuncNodes**' visual node-based system. It provides a collection of nodes for performing typical operations on Pandas data structures, such as conversions, data manipulations, and calculations.\n\nThis library enables **no-code** and **low-code** workflows for **Pandas** by providing drag-and-drop functionality in a visual interface. It also supports Python-based scripting to handle more complex operations.\n\n## Features\n\n- **DataFrame Conversion**:\n  - Convert DataFrames to dictionaries and vice versa.\n  - Handle CSV and Excel files easily using DataFrame nodes.\n- **Data Manipulation**:\n\n  - Add, drop, and manipulate rows and columns of a DataFrame.\n  - Handle missing data with nodes for `fillna`, `dropna`, `ffill`, and `bfill`.\n  - Perform merges and joins with intuitive nodes for `merge`, `concatenate`, and `join`.\n\n- **Math & Statistical Operations**:\n\n  - Perform descriptive statistics like `mean`, `sum`, `std`, `var`, and `corr`.\n  - Evaluate custom expressions directly on DataFrames using the `eval` node.\n\n- **Masking & Filtering**:\n\n  - Apply masks to filter DataFrame data.\n  - Use conditions to filter rows and columns dynamically.\n\n- **Grouping & Aggregation**:\n\n  - Group data using `groupby` and aggregate it with `sum`, `mean`, `count`, etc.\n  - Easily convert groups into lists of DataFrames.\n\n- **Series Support**:\n  - Nodes for converting Series to lists and dictionaries.\n  - Access individual elements using `iloc` and `loc`.\n  - Perform string operations on Series.\n\n## Installation\n\nInstall the package with:\n\n```bash\npip install funcnodes-pandas\n```\n\nEnsure that you have **Pandas** and **FuncNodes** installed.\n\n## Getting Started\n\nHere's an overview of the basic programmatically usage of **funcnodes-pandas**.\n\n1. **Convert a DataFrame to a Dictionary**\n\n```python\nimport pandas as pd\nimport funcnodes_pandas as fnpd\n\ndf = pd.DataFrame({\"A\": [1, 2, 3], \"B\": [4, 5, 6]})\nnode = fnpd.to_dict()\nnode.inputs['df'].value = df\nawait node\nprint(node.outputs['dict'].value)\n```\n\nThis code converts a DataFrame to a dictionary using the `to_dict` node.\n\n2. **Filling Missing Data**\n\n```python\nnode = fnpd.fillna()\nnode.inputs[\"df\"].value = df\nnode.inputs[\"value\"].value = 0\nawait node\nprint(node.outputs[\"out\"].value)\n```\n\nThe `fillna` node fills missing data in a DataFrame.\n\n3. **Group By Operations**\n\n```python\nnode = fnpd.group_by()\nnode.inputs[\"df\"].value = df\nnode.inputs[\"by\"].value = \"A\"\nawait node\nprint(node.outputs[\"grouped\"].value)\n```\n\nThis groups data based on column `A` in the DataFrame.\n\n## Testing\n\nThe repository contains a suite of tests to ensure that the various functionalities of `funcnodes-pandas` work as expected. The tests are based on **unittest** and **IsolatedAsyncioTestCase**. You can run the tests using:\n\n```bash\npython -m unittest discover\n```\n\nTest cases for operations such as `groupby`, `add_column`, `dropna`, etc., are included.\n\n## Contribution\n\nFeel free to contribute to this project by submitting pull requests. You can help by adding new nodes, fixing bugs, or enhancing documentation.\n\n## License\n\nThis project is licensed under the MIT License.\n\n## Contact\n\nFor any questions or issues, please open an issue on the GitHub repository.\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "pandas nodes for funcnodes",
    "version": "0.2.11",
    "project_urls": {
        "download": "https://pypi.org/project/funcnodes-pandas/#files",
        "homepage": "https://github.com/Linkdlab/funcnodes_pandas",
        "source": "https://github.com/Linkdlab/funcnodes_pandas",
        "tracker": "https://github.com/Linkdlab/funcnodes_pandas/issues"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f708f01a662c8be53938cd5f4e9abea4a89b2f6c6db849313f7b40ee6ae76004",
                "md5": "d1186347491c7ead737fa9eab4ec19be",
                "sha256": "3d90ff3857bc7e6148aacdb8e23401ab6e6096ae4c025d839adf1e0a57b14547"
            },
            "downloads": -1,
            "filename": "funcnodes_pandas-0.2.11-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "d1186347491c7ead737fa9eab4ec19be",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.11",
            "size": 22426,
            "upload_time": "2024-11-11T13:57:09",
            "upload_time_iso_8601": "2024-11-11T13:57:09.853508Z",
            "url": "https://files.pythonhosted.org/packages/f7/08/f01a662c8be53938cd5f4e9abea4a89b2f6c6db849313f7b40ee6ae76004/funcnodes_pandas-0.2.11-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "bf4079f22f06f97d5d19aecc681cde793bb8b9b6f106e384f8b2b1dc7fa417fd",
                "md5": "a4a0f360232e3cdb8a8bcc9dc459add1",
                "sha256": "0f4f005a11053c70f9761cd155c12ff113b61db4386f36199cb7e0782dbbc5f9"
            },
            "downloads": -1,
            "filename": "funcnodes_pandas-0.2.11.tar.gz",
            "has_sig": false,
            "md5_digest": "a4a0f360232e3cdb8a8bcc9dc459add1",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.11",
            "size": 17938,
            "upload_time": "2024-11-11T13:57:10",
            "upload_time_iso_8601": "2024-11-11T13:57:10.902986Z",
            "url": "https://files.pythonhosted.org/packages/bf/40/79f22f06f97d5d19aecc681cde793bb8b9b6f106e384f8b2b1dc7fa417fd/funcnodes_pandas-0.2.11.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-11-11 13:57:10",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Linkdlab",
    "github_project": "funcnodes_pandas",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "funcnodes-pandas"
}
        
Elapsed time: 0.33609s