Skip to main content

TabCamel: A DataFrame-focused solution for tabular datasets in machine learning workflows

Project description

TabCamel

Test In Colab PyPI version Last Commit License Python 3.10+ Downloads

A DataFrame-focused solution for tabular datasets in machine learning workflows.

🎯 Features

  • TabularDataset: Comprehensive dataset class with sampling and splitting capabilities
  • Data Transformations: Scikit-learn compatible preprocessing transformations
  • Multi-source Loading: Support for local files and popular ML repositories
  • AutoGluon Integration: Seamless integration with AutoGluon for automated ML

🛠 Installation

pip install tabcamel

🚀 Quick Start

from tabcamel.data.dataset import TabularDataset

# Load a remote dataset
dataset = TabularDataset('iris', task_type='classification')

# Split into train/test sets
train_test = dataset.split('stratified', train_size=0.8)
train_data = train_test['train_set']
test_data = train_test['test_set']

print(train_data)

💽 Dataset Sources

TabCamel supports multiple data sources:

Remote Datasets

  • OpenML: 30+ popular datasets ('iris', 'adult', 'titanic', etc.)
  • UCI ML Repository: Classic datasets with proper metadata
  • scikit-learn: Built-in sklearn datasets ('diabetes', etc.)
  • pgmpy: Bayesian network datasets from pgmpy
  • bnlearn: datasets from bnlearn

Local Datasets

For local datasets, you have several options:

Option 1: Direct File Path

# Use full path to your dataset
dataset = TabularDataset('/path/to/your/data.csv', task_type='classification')

Option 2: Configure Data Directory

import tabcamel.utils.config as config

# Set up your data directory
local_dataset2path = {
    "local_data": "/path/to/your/data.csv",
}
config.set_local_data_path(local_dataset2path)

# Now use short names
dataset = TabularDataset('local_data', task_type='classification')

💻 Examples

Basic Usage

from tabcamel.data.dataset import TabularDataset

# Remote dataset
dataset = TabularDataset('adult', task_type='classification')

# Local dataset with full path
dataset = TabularDataset('/home/user/data/my_data.csv', task_type='regression')

# Local dataset with configured data directory
dataset = TabularDataset('my_data', task_type='classification')

Data Operations

# Dataset sampling
sample_result = dataset.sample('stratified', sample_size=1000)
sampled_data = sample_result['dataset_sampled']

# Dataset splitting
split_result = dataset.split('stratified', test_size=0.2)
train_set = split_result['train_set']
test_set = split_result['test_set']

# Access properties
print(f"Samples: {dataset.num_samples}")
print(f"Features: {dataset.num_features}")
print(f"Classes: {dataset.num_classes}")

📚 Citation

If you use TabCamel in your research, please cite:

@misc{tabcamel,
  title = {TabCamel: A DataFrame-focused solution for tabular datasets in machine learning workflows},
  author = {Xiangjian Jiang},
  year = {2025},
  howpublished = {\url{https://github.com/SilenceX12138/TabCamel}},
}

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

tabcamel-2026.3.19.tar.gz (2.0 MB view details)

Uploaded Source

Built Distribution

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

tabcamel-2026.3.19-py3-none-any.whl (31.2 kB view details)

Uploaded Python 3

File details

Details for the file tabcamel-2026.3.19.tar.gz.

File metadata

  • Download URL: tabcamel-2026.3.19.tar.gz
  • Upload date:
  • Size: 2.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for tabcamel-2026.3.19.tar.gz
Algorithm Hash digest
SHA256 e143f9d97ad71651cf4411838e6ff80154c3a05c5c85eb9987ff7e4b8529dae7
MD5 57b007beed92dee145c4c543ca158dd0
BLAKE2b-256 451bca1d43d186769e62f076a01f367f501cd26288d0367ad6eccb2f0b9c525d

See more details on using hashes here.

Provenance

The following attestation bundles were made for tabcamel-2026.3.19.tar.gz:

Publisher: pypi.yaml on SilenceX12138/TabCamel

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

File details

Details for the file tabcamel-2026.3.19-py3-none-any.whl.

File metadata

  • Download URL: tabcamel-2026.3.19-py3-none-any.whl
  • Upload date:
  • Size: 31.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for tabcamel-2026.3.19-py3-none-any.whl
Algorithm Hash digest
SHA256 edc33f78f7f0f82e31bbe27f2c71cbb1b5fe6b63569c5865c75224c38aa74c05
MD5 63d0218e90fab9db7b21a78098ae3ea1
BLAKE2b-256 e24e5ae096b82be2f1fb3700e53270909c22a11716dffb772d68fbb4e11fcd75

See more details on using hashes here.

Provenance

The following attestation bundles were made for tabcamel-2026.3.19-py3-none-any.whl:

Publisher: pypi.yaml on SilenceX12138/TabCamel

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 Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page