+0
Daily
991
stars
113
forks
29
watchers
129
prs
154
issues
17
releases
README
Patsy
Notice: patsy is no longer under active development. As of August 2021,
Matthew Wardrop (@matthewwardrop) and Tomás Capretto (@tomicapretto) have taken
on responsibility from Nathaniel Smith (@njsmith) for keeping the lights on, but
no new feature development is planned. The spiritual successor of this project
is Formulaic, and we
recommend that users migrate
when possible. For the time being, until major software packages have successfully
transitioned, we will attempt to keep patsy working in its current state with
current releases in the Python ecosystem.
---
Patsy is a Python library for describing statistical models
(especially linear models, or models that have a linear component) and
building design matrices. Patsy brings the convenience of R "formulas" to Python.
!PyPI - Python Version
!https://patsy.readthedocs.io/
!PyPI - Status
!https://doi.org/10.5281/zenodo.592075
- Documentation:
- Downloads:
- Code and issues:
- Mailing list: ()
Dependencies
Python (3.6+)
numpy
Optional:
pytest/pytest-cov: needed to run tests
scipy: needed for spline-related functions like bs
Installation
pip install patsy (or, for traditionalists: python setup.py install)
License
2-clause BSD, see LICENSE.txt for details.Top issues
#10Feature request: "target ~ ." syntax38 comments · 2012-10-29#26Make DesignMatrixBuilders pickleable and saveable24 comments · 2013-10-06#36Categorical does not work with nan14 comments · 2014-03-18#18Maximum recursion depth error for formulas with more than 485 terms14 comments · 2013-04-12#80Is this the expected behavior of patsy when building a design matrix of a two-level categorical variable without an intercept?12 comments · 2016-03-11#1940.5.3: pytest is failing in some units11 comments · 2023-05-20#46Sparse matrix from formula11 comments · 2014-06-19#77coding categorical response variables for use with scikit-learn10 comments · 2015-11-11
Latest release
v1.0.3 v1.0.3 2026-08-29Added official support for Python 3.14. Fixed constraint tokenizer compatibility with Python 3.15 pre-releases. Updates to CI tooling and doc building. Full Changelog: https://github.com/pydata/patsy/compare/v1.0.2...v1.0.3