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
, andbfill
. - Perform merges and joins with intuitive nodes for
merge
,concatenate
, andjoin
.
-
Math & Statistical Operations:
- Perform descriptive statistics like
mean
,sum
,std
,var
, andcorr
. - Evaluate custom expressions directly on DataFrames using the
eval
node.
- Perform descriptive statistics like
-
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 withsum
,mean
,count
, etc. - Easily convert groups into lists of DataFrames.
- Group data using
-
Series Support:
- Nodes for converting Series to lists and dictionaries.
- Access individual elements using
iloc
andloc
. - 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.
- 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.
- 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.
- 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file funcnodes_pandas-0.2.10.tar.gz
.
File metadata
- Download URL: funcnodes_pandas-0.2.10.tar.gz
- Upload date:
- Size: 17.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b0c617d1bd102d09819573b2bb25589c624256f7c8e7833dcf30457415429bac |
|
MD5 | cd69801fc240613894a803250019b4ec |
|
BLAKE2b-256 | 181b0387a3973bd96d8ceff9324295da6e7cee5a57f9eb30a77bb979f80358b4 |
Provenance
The following attestation bundles were made for funcnodes_pandas-0.2.10.tar.gz
:
Publisher:
version_publish_main.yml
on Linkdlab/funcnodes_pandas
-
Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
funcnodes_pandas-0.2.10.tar.gz
- Subject digest:
b0c617d1bd102d09819573b2bb25589c624256f7c8e7833dcf30457415429bac
- Sigstore transparency entry: 148149498
- Sigstore integration time:
- Predicate type:
File details
Details for the file funcnodes_pandas-0.2.10-py3-none-any.whl
.
File metadata
- Download URL: funcnodes_pandas-0.2.10-py3-none-any.whl
- Upload date:
- Size: 22.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3235a0cf53ae261be44a2940fe3c55040a796f8dabafae432048bc8e9838c9ee |
|
MD5 | a5aaa2977f1210009bce28217555dd08 |
|
BLAKE2b-256 | d1c07beff4540eab4c980d771796f2c07550ec9604a1741986a8cc7af9f2bf9c |
Provenance
The following attestation bundles were made for funcnodes_pandas-0.2.10-py3-none-any.whl
:
Publisher:
version_publish_main.yml
on Linkdlab/funcnodes_pandas
-
Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
funcnodes_pandas-0.2.10-py3-none-any.whl
- Subject digest:
3235a0cf53ae261be44a2940fe3c55040a796f8dabafae432048bc8e9838c9ee
- Sigstore transparency entry: 148149499
- Sigstore integration time:
- Predicate type: