Skip to main content

fast-feature-transform

fast-feature-transform

Feature preprocessing for machine learning, written in C++ with a Python API. Fit a pipeline on Parquet files, save it, then transform one record at a time when serving or whole files when training.

Demo: https://fare.fast-feature-transform.dev

  • Feature parity with category_encoders and scikit-learn's preprocessors.
  • Fast: one record takes 0.13 to 1.2 µs, where scikit-learn takes 32 to 219 µs and category_encoders 0.31 to 1.2 ms.
  • Out-of-core execution: Parquet is read in batches, and fits that need every value spill to disk.

Install

pip install fast-feature-transform

Wheels cover CPython 3.14, standard and free-threaded (python3.14t), on Linux x86_64 and arm64 (glibc 2.28 or later) and on macOS 26 or later on Apple silicon. Elsewhere, build from source as Development describes.

Usage

from fast_feature_transform import OrdinalEncoder, Pipeline, StandardScaler

pipeline = Pipeline(
    [
        ("country", OrdinalEncoder(columns=["country"])),
        ("numbers", StandardScaler(columns=["age", "income"])),
    ]
).fit(["train.parquet"])

pipeline.transform_dict({"country": "CA", "age": 42, "income": 75000.0})  # serving: one record
pipeline.transform_parquet(["train.parquet"], output_dir="train-features")  # batches: Parquet in, Parquet out
pipeline.transform_memmap(["train.parquet"], output_dir="train-mmap")  # training: one packed file for NumPy

pipeline.save("artifacts/preprocessing")
serving = Pipeline.load("artifacts/preprocessing")

If you run a batch operation in a daemon thread, join that thread before Python shuts down. The engine needs the interpreter to stay alive until the call returns.

Transform latency

Time to transform one record (a dict in, a dict out) and batches of 100,000 and 1,000,000 rows, after fitting on 100,000 rows. For one record, category_encoders and scikit-learn also pay to build their DataFrame or array and to turn the result back into a dict. A batch goes from one Parquet file to another on both sides. This package reads the file's strings as stored, a dictionary of distinct values plus an index per row; category_encoders and scikit-learn read the file with pyarrow into pandas or NumPy, transform it, and write the result with this package's Parquet settings. Medians of seven rounds on an Apple M4, one thread; lower is better.

Transform time for 20 encoders, fast-feature-transform against category_encoders 2.10.0

Transform time for 11 preprocessors, fast-feature-transform against scikit-learn 1.9.0

At a million rows scikit-learn took 1.14 to 5.3 times as long and category_encoders 1.2 to 30 times. Reading and writing Parquet adds time on both sides, which narrows the gap where the transform is cheap or its output wide; it stays widest where the other library's transform is slow. Matching names don't always mean matching behavior: categories are sorted, output types are fixed at fit, and PolynomialEncoder differs from category_encoders by about 1e-5 at 32 categories and by more than 0.5 from 40 to 128, because category_encoders' basis is the less accurate one. With handle_missing="return_nan", CountEncoder keeps a null for every handle_unknown setting. category_encoders fills it with an integer handle_unknown and rejects it under "error".

License

MIT. The wheels also contain Apache Arrow and the other libraries that THIRD_PARTY_NOTICES.txt lists, and code adapted from SciPy, each under its own license.

Metadata

Release files for fast-feature-transform 0.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for fast-feature-transform 0.0.3
File Actions
fast_feature_transform-0.0.3-cp314-cp314t-manylinux_2_28_x86_64.whl CPython 3.14 CPython 3.14 free-threading Linux glibc 2.28+ x86-64 Details for fast_feature_transform-0.0.3-cp314-cp314t-manylinux_2_28_x86_64.whl
fast_feature_transform-0.0.3-cp314-cp314t-manylinux_2_28_aarch64.whl CPython 3.14 CPython 3.14 free-threading Linux glibc 2.28+ ARM64 Details for fast_feature_transform-0.0.3-cp314-cp314t-manylinux_2_28_aarch64.whl
fast_feature_transform-0.0.3-cp314-cp314t-macosx_26_0_arm64.whl CPython 3.14 CPython 3.14 free-threading macOS 26.0+ ARM64 Details for fast_feature_transform-0.0.3-cp314-cp314t-macosx_26_0_arm64.whl
fast_feature_transform-0.0.3-cp314-cp314-manylinux_2_28_x86_64.whl CPython 3.14 CPython 3.14 Linux glibc 2.28+ x86-64 Details for fast_feature_transform-0.0.3-cp314-cp314-manylinux_2_28_x86_64.whl
fast_feature_transform-0.0.3-cp314-cp314-manylinux_2_28_aarch64.whl CPython 3.14 CPython 3.14 Linux glibc 2.28+ ARM64 Details for fast_feature_transform-0.0.3-cp314-cp314-manylinux_2_28_aarch64.whl
fast_feature_transform-0.0.3-cp314-cp314-macosx_26_0_arm64.whl CPython 3.14 CPython 3.14 macOS 26.0+ ARM64 Details for fast_feature_transform-0.0.3-cp314-cp314-macosx_26_0_arm64.whl

Total release size: 34.9 MB

Release files / fast_feature_transform-0.0.3-cp314-cp314t-manylinux_2_28_x86_64.whl

Download URL fast_feature_transform-0.0.3-cp314-cp314t-manylinux_2_28_x86_64.whl
Size 7.0 MB
Tags CPython 3.14 CPython 3.14 free-threading Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
cb5989b4d08cc4cda108310bf59a2ca3aea74b09a905304b21911358b5526f15
BLAKE2b-256 checksum
How to use checksums
74e43f5a755c155773729bea61b08344a4a640df6edc0b90872d89c60d4949ae
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 18, 2026.

Transparency log

Release files / fast_feature_transform-0.0.3-cp314-cp314t-manylinux_2_28_aarch64.whl

Download URL fast_feature_transform-0.0.3-cp314-cp314t-manylinux_2_28_aarch64.whl
Size 6.3 MB
Tags CPython 3.14 CPython 3.14 free-threading Linux glibc 2.28+ ARM64
SHA-256 checksum
How to use checksums
1b10d3ec1c7326cd669ea560f9570f53b9f10011fee07118f146be8ca26a0b15
BLAKE2b-256 checksum
How to use checksums
a28bc650cb282225f5a03a620ef9b8e38e4d5a424ec83c4db97477f5d0e9d758
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 18, 2026.

Transparency log

Release files / fast_feature_transform-0.0.3-cp314-cp314t-macosx_26_0_arm64.whl

Download URL fast_feature_transform-0.0.3-cp314-cp314t-macosx_26_0_arm64.whl
Size 4.1 MB
Tags CPython 3.14 CPython 3.14 free-threading macOS 26.0+ ARM64
SHA-256 checksum
How to use checksums
421b70c04d385c666814754fb00483965091bfe513b291b2147db96f2bfbde0e
BLAKE2b-256 checksum
How to use checksums
05e940078d5815127f6fdfb92e245469b5733f2cdb5e86aeb0457b4daaa2b048
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 18, 2026.

Transparency log

Release files / fast_feature_transform-0.0.3-cp314-cp314-manylinux_2_28_x86_64.whl

Download URL fast_feature_transform-0.0.3-cp314-cp314-manylinux_2_28_x86_64.whl
Size 7.0 MB
Tags CPython 3.14 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
eb7c79d53d634dda7c259b318902653769ee73b85e193af536e19a195befeb5a
BLAKE2b-256 checksum
How to use checksums
d1cf7e65104b1d228f69ec11fe492c90992e2ed47b3bf0d6d585e5de7854a3a9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 18, 2026.

Transparency log

Release files / fast_feature_transform-0.0.3-cp314-cp314-manylinux_2_28_aarch64.whl

Download URL fast_feature_transform-0.0.3-cp314-cp314-manylinux_2_28_aarch64.whl
Size 6.3 MB
Tags CPython 3.14 Linux glibc 2.28+ ARM64
SHA-256 checksum
How to use checksums
03901d5ae7540e8bbdceec63f95bd3ec23210bb499889a447aca0bdeaed89969
BLAKE2b-256 checksum
How to use checksums
6d532d708ebd6c20b064e754e684e3a31891de6a2537816ceedcd2b19dddf2e2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 18, 2026.

Transparency log

Release files / fast_feature_transform-0.0.3-cp314-cp314-macosx_26_0_arm64.whl

Download URL fast_feature_transform-0.0.3-cp314-cp314-macosx_26_0_arm64.whl
Size 4.1 MB
Tags CPython 3.14 macOS 26.0+ ARM64
SHA-256 checksum
How to use checksums
a75364f6891da8bde378b338ca32146e9402d216ccb55311eafaf10085e2eb64
BLAKE2b-256 checksum
How to use checksums
3ff5beb62726d917b1c7019de82409b034fe671ff1f93ef7c3e10a6b52906763
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 18, 2026.

Transparency log

Security for fast-feature-transform 0.0.3

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.

Full provenance

All 6 files in this release have been uploaded with provenance metadata.

Select from 6 files

Attestation for fast_feature_transform-0.0.3-cp314-cp314t-manylinux_2_28_x86_64.whl

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 18, 2026.

Transparency log

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page