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")

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.

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.2

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.2
File Actions
fast_feature_transform-0.0.2-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.2-cp314-cp314t-manylinux_2_28_x86_64.whl
fast_feature_transform-0.0.2-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.2-cp314-cp314t-manylinux_2_28_aarch64.whl
fast_feature_transform-0.0.2-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.2-cp314-cp314t-macosx_26_0_arm64.whl
fast_feature_transform-0.0.2-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.2-cp314-cp314-manylinux_2_28_x86_64.whl
fast_feature_transform-0.0.2-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.2-cp314-cp314-manylinux_2_28_aarch64.whl
fast_feature_transform-0.0.2-cp314-cp314-macosx_26_0_arm64.whl CPython 3.14 CPython 3.14 macOS 26.0+ ARM64 Details for fast_feature_transform-0.0.2-cp314-cp314-macosx_26_0_arm64.whl

Total release size: 35.1 MB

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

Download URL fast_feature_transform-0.0.2-cp314-cp314t-manylinux_2_28_x86_64.whl
Size 7.1 MB
Tags CPython 3.14 CPython 3.14 free-threading Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
8b13d318a3b5bcbd015f848bcbe640410e11447142461e4c258813c008712cbd
BLAKE2b-256 checksum
How to use checksums
ff40323c591ff4b281fa2251aea803c25edf4eab251ff819df3df516c8540c4f
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 12, 2026.

Transparency log

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

Download URL fast_feature_transform-0.0.2-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
5a3908f6210cbfb476d7051628602f531ee72725f6dad2cce2307a62b5c7ea16
BLAKE2b-256 checksum
How to use checksums
b27057993d177f57dcd4689510ff7a08c03e38659d395766c1e5ce75913b834d
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 12, 2026.

Transparency log

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

Download URL fast_feature_transform-0.0.2-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
069016feef2788bb6ea4498e4c2226f067149c8c3fc4216a87c3046f977119c9
BLAKE2b-256 checksum
How to use checksums
4da749260195d5bb12dcd61b4d7f804c3be34e50cdde218d4e203005695bdb76
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 12, 2026.

Transparency log

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

Download URL fast_feature_transform-0.0.2-cp314-cp314-manylinux_2_28_x86_64.whl
Size 7.1 MB
Tags CPython 3.14 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
1d458505258b4ed1988890a7b42270103460dddfcb733ec094c0f4f6a6bd68ba
BLAKE2b-256 checksum
How to use checksums
d58722021435fe73b22de401bd181900d1ba709b40c97af0141aefeb648e1b4f
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 12, 2026.

Transparency log

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

Download URL fast_feature_transform-0.0.2-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
ad9526c8e1cc7f70e09049d04be5b543884033bd4b25ca1a100ad4c6ab95caa3
BLAKE2b-256 checksum
How to use checksums
f7cb139cd9515e15bf107f6dec6a55c8f09e2e9dab64d0dc419767b6e052c38c
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 12, 2026.

Transparency log

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

Download URL fast_feature_transform-0.0.2-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
13e705abc171d1971cb12914d362895472a829b0614173f58c45e77b961cb04c
BLAKE2b-256 checksum
How to use checksums
a4a16423de1939969d52ceecbc9c21705110b2270a74552b7e7f603748f27ad0
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 12, 2026.

Transparency log

Security for fast-feature-transform 0.0.2

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.2-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 12, 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