Registry / data / rdt
library1.21.0pypypi✓ verified 88d ago

RDT (Reversible Data Transforms) is a Python library that enables the transformation of raw data into fully numerical data, making it ready for various data science tasks. The transformations are designed to be reversible, allowing conversion back to the original data format. It is part of The Synthetic Data Vault Project and is actively maintained by DataCebo, with frequent updates and releases. The current version is 1.21.0.

pip install rdt
INSTALL
IMPORT
SIG · RDT
R
rdt
datapythonv1.21.0
Install
15.2s avg
Import
3171ms
Disk
383MB
Pass rate
5/ 10
Env Coverage5 / 10
glibc
3.9–3.13
musl
3.9–3.13
Install & Compatibility
Where this runs
tested against v1.21.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.10–3.920 runs
build_error
glibc
py 3.10–3.920 runs
installs and imports cleanly · install 15.2s · import 3.171s · 367MB
383MB installed
● package 383MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

HyperTransformer
✓ from rdt import HyperTransformer
Used for transforming multi-column datasets.
get_demo
✓ from rdt import get_demo
Provides a demo dataset for quick experimentation.

This quickstart demonstrates how to load a demo dataset, initialize a `HyperTransformer`, automatically detect its configuration based on the data, transform the data into a numerical format, and then reverse the transformation back to its original representation.

import pandas as pd from rdt import HyperTransformer, get_demo # Load a demo dataset customers = get_demo() print("Original Data:\n", customers.head()) # Initialize and detect config with HyperTransformer ht = HyperTransformer() ht.detect_initial_config(data=customers) print("\nDetected Config:\n", ht.get_config()) # Transform the data transformed_data = ht.transform(customers) print("\nTransformed Data (first 5 rows):\n", transformed_data.head()) # Reverse transform the data back to original format reversed_data = ht.reverse_transform(transformed_data) print("\nReversed Data (first 5 rows):\n", reversed_data.head())
Debug
Known issues
breakingRDT versions prior to 0.2.0 had a significantly different API. Version 0.2.0 introduced a brand new API, removed the old metadata JSON from user arguments, and made transformers work exclusively with pandas Series.
fix
Upgrade to RDT 0.2.0 or newer and refactor code to use the new API, especially `HyperTransformer` and its configuration. Ensure data is in pandas DataFrame format.
affects: <0.2.0
breakingVersion 0.6.0 brought major changes to the `HyperTransformer` and `BaseTransformer` APIs, enabling multi-column input for transformers and allowing sequences of transformers per column.
fix
Update code to align with the new `HyperTransformer` and `BaseTransformer` APIs introduced in 0.6.0, leveraging the enhanced multi-column and chained transformer capabilities.
affects: 0.5.x
deprecatedThe `frequencyEncoder` transformer is deprecated and will not be supported in future RDT versions.
fix
Migrate to using the `UniformEncoder` transformer instead.
affects: All versions up to 1.7.0
deprecatedThe distribution option names for `GaussianNormalizer` have been updated to be consistent with `scipy`. `gaussian` is now `norm`, `student_t` is `t`, and `truncated_gaussian` is `truncnorm`.
fix
Update distribution names in `GaussianNormalizer` configurations to the new `scipy`-consistent terms.
affects: All versions up to 1.7.0
gotchaThe `sdtype` 'text' was removed in RDT versions 1.13.0 and newer. Attempting to use 'text' as an sdtype will lead to errors.
fix
Replace the 'text' sdtype with 'id' for relevant columns.
affects: >=1.13.0
gotchaPython 3.6 support was dropped in RDT 1.0.0, and later versions have stricter Python requirements (e.g., currently >=3.9, <3.15).
fix
Ensure your Python environment meets the required version for your RDT installation. For version 1.21.0, Python 3.9 through 3.14 are supported.
affects: <1.0.0 (for Python 3.6), all (for specific range)
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'rdt'
The rdt library has not been installed in your current Python environment.
fix
pip install rdt
ValueError: Data contains non-numerical values.
You attempted to apply a numerical transformer (e.g., FloatFormatter) to a column that contains non-numerical data or data that cannot be implicitly converted to a number.
fix
Preprocess the data to ensure the column only contains numerical values, or select an appropriate categorical transformer if the data is categorical.
KeyError: "[<column_name>] not in index"
The DataFrame provided to the HyperTransformer's reverse_transform method is missing one or more columns that were present in the original data and expected for reversal.
fix
Ensure the transformed DataFrame passed to reverse_transform contains all necessary columns, typically corresponding to the columns generated by transform.
TypeError: Cannot convert column <column_name> to float.
RDT attempted to convert a column to a float type, but it encountered non-numeric values that prevent this conversion, often when a numerical transformer is used on mixed-type data.
fix
Inspect the column `<column_name>` in your input data, remove or convert any non-numeric entries, or use a transformer designed for categorical or mixed data types.
Upgrade
Version history
1.21.0latest on PyPI · released Apr 10, 2026
Audit
Dependencies
pythonrequiredRequired Python version range for rdt.
pandasrequiredFundamental for data handling; HyperTransformer expects pandas DataFrames.
sdvoptionalRDT is part of the SDV project; installing SDV automatically includes RDT.
Agent activity
16 hits · last 30 days
node
14
OpenAI (training)
1
Resources
rdt — pip install rdt · libregistry