tensorflow-transform
A library for data preprocessing with TensorFlow
What it is and what it does
TensorFlow Transform is a preprocessing library that extends TensorFlow's single-example capabilities to support full-pass operations over entire datasets. It handles transformations that require seeing all data—such as computing mean and standard deviation for normalization, building vocabularies from all unique values, or assigning data to quantile-based buckets—then exports the result as a frozen TensorFlow graph for reuse in both training and serving pipelines.
The library uses Apache Beam for distributed computation (defaulting to local mode but supporting Google Cloud Dataflow and other runners) and PyArrow for efficient vectorized operations. By applying identical transformations at train and serve time, it eliminates training-serving skew, a common source of model degradation in production.
Use it for:
- Normalize numerical features by computing global mean and standard deviation across the entire training dataset.
- Generate a vocabulary from all unique string values in a column and map strings to integer IDs consistently.
- Assign continuous values to discrete buckets based on observed data quantiles or distribution.
- Preprocess data pipelines for TensorFlow Extended (TFX) workflows with distributed Apache Beam runners.
- Export preprocessing logic as a reusable TensorFlow graph to serve alongside trained models.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
TensorFlow Transform preprocesses data with full-pass operations like normalization, vocabulary generation, and bucketing, exporting a reusable TensorFlow graph for consistent training and serving.
Yes. TensorFlow Transform is production-stable, actively maintained, and essential for building ML pipelines that require full-pass preprocessing or consistent train-serve transformations. Install if you need stateful data transformations (normalization, vocabulary generation, bucketing) in TensorFlow workflows; skip if your preprocessing fits single-example operations.
Install
tensorflow-transform on PyPI
pip
pip install tensorflow-transformuv
uv add tensorflow-transformpoetry
poetry add tensorflow-transformInstalling tensorflow-transform
Before you install
Low friction installation as a pure-Python wheel. Active maintenance with a recent release (64 days old) and ongoing repository activity. Requires TensorFlow and Apache Beam as core dependencies.
License in practice
Licensed under Apache 2.0 (permissive), allowing commercial use, modification, and distribution with minimal restrictions.
Quickstart
pip install tensorflow-transform
import tensorflow_transform as tft
# Use tft.scale_to_z_score() or tft.compute_and_apply_vocabulary()
# within a tf.Transform preprocessing function
Requires TensorFlow, Apache Beam, and PyArrow as runtime dependencies; Python 3.10 or later.
Verify before relying
- Whether the package works with Google Cloud Dataflow or other Apache Beam runners without additional configuration.
- Performance characteristics and scalability limits for very large datasets.
- Compatibility with custom Apache Beam runners beyond the default local mode.
Package facts
| License | Apache 2.0 (permissive) |
| Python support | supports the current Python release (<4,>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 10 — absl-py, apache-beam, numpy, protobuf, pyarrow, pydot, tensorflow, tensorflow-metadata, tf_keras, tfx-bsl |
| Maintenance | actively maintained — 64 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 187,343/month — #9,968 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: tensorflow_transform-1.21.0-py3-none-any.whl
Keywords: tensorflow, transform, tfx
Tags
More Software Development packages
Provides backported and experimental type hints…
permissive · top 100 on PyPI
numpyNumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
annotated-docProvides a way to document function parameters,…
permissive · top 100 on PyPI
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
distlibDistlib provides low-level packaging utilities…
permissive · top 1,000 on PyPI
tensorflow-data-validationTensorFlow Data Validation (TFDV) computes…
permissive · top 15,000 on PyPI
tfx-bsltfx_bsl provides shared libraries and utilities…
permissive · top 15,000 on PyPI
tensorflow-metadataProvides standard schema, statistics, and…
permissive · top 5,000 on PyPI
tensorflow-ioExtends TensorFlow with support for file…
permissive · top 15,000 on PyPI
fasttransformfasttransform provides a Transform class for…
permissive · top 15,000 on PyPI
tensorflow-io-gcs-filesystemProvides Google Cloud Storage filesystem…
permissive · top 5,000 on PyPI
diastatic-maltDiastaticMalt performs source-to-source…
permissive · top 15,000 on PyPI
Keras-PreprocessingProvides data preprocessing and augmentation…
permissive · top 5,000 on PyPI
tensorflow-textTensorFlow Text provides text preprocessing…
permissive · top 5,000 on PyPI
tensorflowTensorFlow is an open-source machine learning…
permissive · top 5,000 on PyPI