PLMBR
create data processing pipelines
Installation
Installing plmbr, which is available as a Python package, can be done with pip, preferably in a virtual environment. Launch a terminal and use the following command to install plmbr.
pip install plmbr
Introduction
It is a Python library for building predictable and reproducible data pipelines with ease. It wraps pandas with a clean, modular API inspired by TensorFlow’s Keras. plmbr simplifies complex data workflows into composable steps. This works with Jupyter notebooks as well.
Creating Pipes
Pipe objects are simple python classes that implements flow method which takes a pandas DataFrame as input and returns a pandas DataFrame as output. Pipe objects are mean to perform a specific operation on the data. Following is an example of a Pipe object that doubles the values in a column.
from pandas import DataFrame
from plmbr import Pipe, Pipeline
class DoubleIt(Pipe):
def __init__(self, col: str):
self.col = col
def flow(self, data: DataFrame) -> DataFrame:
data[self.col] = data[self.col] * 2
return data
Building Pipeline
Pipeline is similar to Sequential in Keras. It takes a list of Pipe objects as input and builds a pipeline of operations. Each Pipe object is called in sequence to process the data.
pipeline = Pipeline([
DoubleIt(col="A"),
])
Processing Data
df = DataFrame({ "A": [1, 2, 3] }, columns=["A"])
doubled_df = pipeline(df) # or pipeline.flow(df)
doubled_df
| A | |
|---|---|
| 0 | 2 |
| 1 | 4 |
| 2 | 6 |
Contribute
Data transformation is a complex task, and plmbr is designed to be extensible and flexible to accommodate a wide range of use cases. If you have ideas for new features, find bugs or usability issues, or want to submit a pull request, your input is appreciated. Contributions of all kinds code, documentation, or feedback help improve the library and shape its future.
Metadata
Release files for plmbr 0.5.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| plmbr-0.5.0.tar.gz | 2.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| plmbr-0.5.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 4.8 kB
Release files / plmbr-0.5.0.tar.gz
| Download URL | plmbr-0.5.0.tar.gz |
|---|---|
| Size | 2.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0915c94d3ef688c1c558a2238b8f17d73f50491d3e719ea16f2bbb44e1e7f66e
|
|
BLAKE2b-256 checksum How to use checksums |
f43dd8d317868d703af09ab06e0b602561e5473242c1e07bc4666855b3d16c05
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.9 {"installer":{"name":"uv","version":"0.9.9"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Fedora Linux","version":"43","id":"","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / plmbr-0.5.0-py3-none-any.whl
| Download URL | plmbr-0.5.0-py3-none-any.whl |
|---|---|
| Size | 2.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3fb394bc3471d44444f133062f09c0ed977e335025a1a3cf1fc8bf1c9d2386ef
|
|
BLAKE2b-256 checksum How to use checksums |
df2d2d46e461482a7f9bc0c427784b1881af285d2a70abe516eddb99bb4b1b1c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.9 {"installer":{"name":"uv","version":"0.9.9"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Fedora Linux","version":"43","id":"","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|