Skip to main content

No project description provided

Project description

tvtsplit

PyPI - Version PyPI - Python Version


Split polars DataFrame into training data, validation data and test data.

Table of Contents

Installation

pip install tvtsplit

Usage

import polars as pl
import tvtsplit

params = {"shuffle": False, "seed": 0, "val_size": 0.25, "test_size": 0.25}
sample_df = pl.DataFrame(
    data=["aaa", "bbb", "ccc", "ddd", "eee", "fff"],
    schema=[("txt", pl.String)],
    )
print(sample_df.tvtsplit.train(params))
shape: (4, 1)
┌─────┐
│ txt │
│ --- │
│ str │
╞═════╡
│ aaa │
│ bbb │
│ ccc │
│ ddd │
└─────┘
print(sample_df.tvtsplit.val(params))
shape: (1, 1)
┌─────┐
│ txt │
│ --- │
│ str │
╞═════╡
│ eee │
└─────┘
print(sample_df.tvtsplit.test(params))
shape: (1, 1)
┌─────┐
│ txt │
│ --- │
│ str │
╞═════╡
│ fff │
└─────┘

License

tvtsplit is distributed under the terms of the MIT license.

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

tvtsplit-0.0.2a1.tar.gz (100.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tvtsplit-0.0.2a1-py3-none-any.whl (3.8 kB view details)

Uploaded Python 3

File details

Details for the file tvtsplit-0.0.2a1.tar.gz.

File metadata

  • Download URL: tvtsplit-0.0.2a1.tar.gz
  • Upload date:
  • Size: 100.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for tvtsplit-0.0.2a1.tar.gz
Algorithm Hash digest
SHA256 a5269baad858152d205e6147e31b72b3a3eeaf1bd1ebb39118b0a42738f8b9d8
MD5 98e022e42c00f268a8225757865caf96
BLAKE2b-256 75127f425e303329f37ff60435c114313d7d9328b5616b522c68274d9ce27dd1

See more details on using hashes here.

File details

Details for the file tvtsplit-0.0.2a1-py3-none-any.whl.

File metadata

  • Download URL: tvtsplit-0.0.2a1-py3-none-any.whl
  • Upload date:
  • Size: 3.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for tvtsplit-0.0.2a1-py3-none-any.whl
Algorithm Hash digest
SHA256 ea395dd421dbb8c18244a527a33d778c3d9365f0fefb5a8856eda26c7eb581a4
MD5 e20896cf6932acbcffdb9387fd4bedac
BLAKE2b-256 3a3646e21a00f023765ede3a715140258a45ab73cbe399ca527bcb309c277b9e

See more details on using hashes here.

Supported by

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