Skip to main content

pandas nodes for funcnodes

Project description

funcnodes-pandas

funcnodes-pandas is an extension for the Funcnodes framework that allows you to manipulate Pandas 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:

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
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.

  1. Filling Missing Data
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.

  1. Group By Operations
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:

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

funcnodes_pandas-0.4.0.tar.gz (38.4 kB view details)

Uploaded Source

Built Distribution

funcnodes_pandas-0.4.0-py3-none-any.whl (34.7 kB view details)

Uploaded Python 3

File details

Details for the file funcnodes_pandas-0.4.0.tar.gz.

File metadata

  • Download URL: funcnodes_pandas-0.4.0.tar.gz
  • Upload date:
  • Size: 38.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for funcnodes_pandas-0.4.0.tar.gz
Algorithm Hash digest
SHA256 593f6b90b717b61cd0df5963fd3d22819be2fa5fd2cb963e6def1f1bda35e53f
MD5 e3b853329602e5c7ae382f3f8d69b7e5
BLAKE2b-256 b2e3d1b9caf0c539cc93aa4a31f659d8638e10eca9eb9285aaddcf7010a05cd6

See more details on using hashes here.

Provenance

The following attestation bundles were made for funcnodes_pandas-0.4.0.tar.gz:

Publisher: version_publish_main.yml on Linkdlab/funcnodes_pandas

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file funcnodes_pandas-0.4.0-py3-none-any.whl.

File metadata

File hashes

Hashes for funcnodes_pandas-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 30ce063d7afc9cc95d18fe9c4a92ec8ec7e43cfe6df73f2fadf6d8c51373dbc2
MD5 3562ce4507c6a76f5ef0869143edf227
BLAKE2b-256 6b3bf3a6784aad75e5a21b3e58de0233c0afd73b917b78287b09b091307ffe97

See more details on using hashes here.

Provenance

The following attestation bundles were made for funcnodes_pandas-0.4.0-py3-none-any.whl:

Publisher: version_publish_main.yml on Linkdlab/funcnodes_pandas

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page