data-spliter
A small, well-tested Python package that provides two conveniences on top of scikit-learn:
x_y_data-spliter– split a DataFrame into feature matrix X and target vector y by column name or index.train_test_data-spliter– thin validated wrapper aroundsklearn.model_selection.train_test_split.train_dev_test_data-spliter– split data into three sets (train / dev / test) with sizes expressed as fractions of the full dataset.
Installation
pip install data-spliter
Or from source:
git clone https://github.com/Fares-Ayman-1/data-spliter.git
cd data-spliter
pip install -e ".[dev]"
Quick start
import pandas as pd
from data-spliter import x_y_data-spliter, train_test_data-spliter, train_dev_test_data-spliter
df = pd.read_csv("my_data.csv")
# Split features from target (by name or by position)
X, y = x_y_data-spliter(df, column_name="price")
X, y = x_y_data-spliter(df, column_index=-1)
# Train / test split
x_train, x_test, y_train, y_test = train_test_data-spliter(X, y, test_size=0.2)
# Train / dev / test split
x_train, x_dev, x_test, y_train, y_dev, y_test = train_dev_test_data-spliter(
X, y, dev_size=0.1, test_size=0.2
)
Running tests
pytest --cov=data-spliter
License
MIT
Metadata
Release files for data-spliter 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| data_spliter-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for data_spliter-1.0.0-py3-none-any.whl |
Release files / data_spliter-1.0.0-py3-none-any.whl
| Download URL | data_spliter-1.0.0-py3-none-any.whl |
|---|---|
| Size | 2.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4d81346485ef35dca227d43922582064a87b388b8a62d6f893193c52bcb2e77f
|
|
BLAKE2b-256 checksum How to use checksums |
d4e19e542c764fbca5f349560a4aea78f365995d58adeff3a7cc955ce285129a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.7
|
Security for data-spliter 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.