$npx skillfedfor your agent

formulaic

An implementation of Wilkinson formulas.

Worth itPyPI MathematicsReleased Jun 20263.9M downloads / moMITPure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — formulaic-1.2.2-py3-none-any.whl
v1.2.2 · released 2026-06-02 · Python >=3.9 · 7 runtime deps: interface-meta, narwhals, numpy, pandas, scipy, typing-extensions, wrapt

Yes. Formulaic is actively maintained, MIT-licensed, has low install friction, and fills a clear gap as a high-performance successor to patsy for formula-based model matrix generation. It supports modern dataframe libraries (Polars, PyArrow) and is already adopted by established projects like Glum, Lifelines, and Linearmodels. No known vulnerabilities.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Low friction installation with seven runtime dependencies (numpy, pandas, scipy, narwhals, interface-meta, typing-extensions, wrapt).
  • Active maintenance with a recent release 73 days ago.

License · maintenance · safety

MIT (permissive) — MIT license permits unrestricted commercial and private use, modification, and distribution with minimal obligations.

last release 2026-06-02 (73 days) · last repo commit 2026-08-12 · 463 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 3,889,607 downloads/mo, #2,459 on PyPI

Verify before relying

pip install formulaic

from formulaic import Formula
import pandas

df = pandas.DataFrame({'y': [0, 1, 2], 'x': ['A', 'B', 'C'], 'z': [0.3, 0.1, 0.2]})
y, X = Formula('y ~ x + z').get_model_matrix(df)
  • Whether symbolic differentiation of formulas is production-ready or experimental
  • Performance benchmarks against R and patsy on current hardware
  • Extent of narwhals integration beyond the listed dataframe types
Same gist for agents: .md · .json

What it is and what it does

Formulaic is a Python implementation of Wilkinson formulas—a domain-specific language for specifying statistical model matrices from tabular data. It takes a formula string like 'y ~ x + z' and a dataframe, then automatically handles categorical encoding, intercept inclusion, and matrix construction. The package outputs model matrices as pandas DataFrames, NumPy arrays, or SciPy sparse matrices, making it useful for feeding data into machine learning and statistical models.

The library supports input from pandas, Polars, PyArrow, and any dataframe library compatible with narwhals. It also allows encoding choices from one dataset to be reused on others, supports symbolic differentiation of formulas, and includes extensible plugins for custom input/output formats. Seven runtime dependencies (numpy, pandas, scipy, narwhals, interface-meta, typing-extensions, wrapt) keep the installation lightweight.

Use it for

  • Prepare training data for linear regression or GLM models by converting formulas into design matrices with automatic categorical encoding.
  • Reuse categorical encodings learned on a training set when transforming new test or production data.
  • Work with Polars or PyArrow dataframes while maintaining formula-based data transformation workflows.
  • Generate sparse model matrices for high-dimensional datasets to reduce memory footprint.
  • Integrate formula-based preprocessing into statistical modeling pipelines used by statsmodels or custom estimators.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

Worth it

Yes.

Formulaic is actively maintained, MIT-licensed, has low install friction, and fills a clear gap as a high-performance successor to patsy for formula-based model matrix generation. It supports modern dataframe libraries (Polars, PyArrow) and is already adopted by established projects like Glum, Lifelines, and Linearmodels. No known vulnerabilities.

Install

formulaic on PyPI

Before you install

Low friction installation with seven runtime dependencies (numpy, pandas, scipy, narwhals, interface-meta, typing-extensions, wrapt). Active maintenance with a recent release 73 days ago.

License in practice

MIT license permits unrestricted commercial and private use, modification, and distribution with minimal obligations.

Quickstart

pip install formulaic

from formulaic import Formula
import pandas

df = pandas.DataFrame({'y': [0, 1, 2], 'x': ['A', 'B', 'C'], 'z': [0.3, 0.1, 0.2]})
y, X = Formula('y ~ x + z').get_model_matrix(df)

Verify before relying

  • Whether symbolic differentiation of formulas is production-ready or experimental
  • Performance benchmarks against R and patsy on current hardware
  • Extent of narwhals integration beyond the listed dataframe types

Package facts

LicenseMIT permissive
Python supportSupports the current Python release >=3.9
Install frictionLow. Pure-Python wheel
Runtime dependencies
7 packages
interface-metanarwhalsnumpypandasscipytyping-extensionswrapt
MaintenanceActively maintained 73 days since the last release
Last repo commit
First released
Downloads3,889,607 / month, #2,459 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 5 - Production/StableEnvironment :: ConsoleIntended Audience :: DevelopersIntended Audience :: Information TechnologyIntended Audience :: Science/ResearchLicense :: OSI Approved :: MIT LicenseNatural Language :: EnglishOperating System :: OS IndependentProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.9Topic :: Scientific/Engineering :: Mathematics

Evidence: formulaic-1.2.2-py3-none-any.whl

Tags

Capabilities
wilkinson formulas pythonmodel matrix generationdataframe to matrix conversionformula parsing statisticalsparse matrix from dataframecategorical encoding formulaspolars pandas arrow formulas
Topics
statistical-modelingdataframe-transformationformula-dsl

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “wilkinson formulas python”

  • formulaicFormulaic converts tabular data into model matrices using Wilkinson…
  • formulasParses and compiles Excel formulas and workbooks into executable…
  • xlcalculatorReads MS Excel files and translates Excel formulas into Python code…

Give your agent the search over MCP, or paste the wish link into any chat.

More Mathematics packages

networkx Worth it
PyPI · Python Modules · released Dec 2025

NetworkX provides data structures and algorithms for creating, analyzing, and manipulating graphs and networks, supporting everything from simple undirected graphs to complex directed and weighted networks.

BSD-3-Clausepure Python
290.9Mdownloads / mo
kiwisolver Worth it
PyPI · Mathematics · released Mar 2026

kiwisolver is a Python binding to a fast C++ implementation of the Cassowary constraint solver, enabling you to solve systems of linear constraints and inequalities.

Install it if you need to solve constraint systems; skip it if you only need simple linear algebra.

BSD-3-Clausecompiled wheel · 3.10+
205.5Mdownloads / mo
sympy Worth it
PyPI · Scientific/Engineering · released Apr 2025

SymPy is a Python library for symbolic mathematics, performing algebraic manipulation, calculus, equation solving, and mathematical expression simplification without numerical approximation.

BSD-3-Clausepure Python · 3.9+
196.4Mdownloads / mo
contourpy Worth it
PyPI · Information Analysis · released Jul 2025

ContourPy calculates contours of 2D quadrilateral grids using C++11 algorithms wrapped in Python, offering serial and multithreaded implementations without requiring Matplotlib as a dependency.

BSD-3-Clausecompiled wheel · 3.11+
191.2Mdownloads / mo
torch With conditions
PyPI · Software Development · released Jul 2026

PyTorch provides GPU-accelerated tensor computation and automatic differentiation for building and training deep neural networks in Python.

Apache-2.0 AND Apache-2.0 WITH LLVM-exception AND BSD-2-Clause AND BSD-3-Clause AND BSL-1.0 AND MITcompiled wheel · 3.10+
102.5Mdownloads / mo
onnxruntime Worth it
PyPI · Software Development · released Jul 2026

onnxruntime loads and executes Open Neural Network Exchange (ONNX) models with a focus on inference performance across CPUs and accelerators.

Install it if you have ONNX models to run in production or development.

MITcompiled wheel · 3.11+
89.3Mdownloads / mo

See also fastf1 · formulaic-contrasts · patsy · tabmat · spglm · formulas · itables · qdldl · narwhals · anndata