skillfed

prince

Factor analysis in Python: PCA, CA, MCA, MFA, FAMD, GPA, PGA

prince v0.20.1 139.8K downloads/30d#11,288 on PyPI
Permissive license MIT Active released

What it is and what it does

Prince is a Python library for multivariate exploratory data analysis that implements seven factor analysis methods: PCA, CA, MCA, MFA, FAMD, GPA, and PGA. It follows scikit-learn conventions, making it familiar to users of that ecosystem. The library was originally created in 2016 and underwent a major revamp in 2022 to improve robustness and feature coverage.

The package works with tabular data and supports advanced features like supplementary rows and columns, as well as row and column weights. It integrates with pandas for data handling and Altair for interactive visualization of results. Prince is tested against scikit-learn and FactoMineR (via rpy2) to ensure correctness, and PGA is validated against geomstats.

Use it for:

  • Reduce dimensionality of numerical datasets while preserving variance structure using PCA.
  • Analyze relationships between categorical variables in contingency tables with CA or MCA.
  • Explore mixed numerical and categorical data simultaneously using FAMD.
  • Analyze multiple groups of related columns with MFA.
  • Compare shapes across multiple datasets using GPA.
  • Perform dimensionality reduction on data constrained to a manifold using PGA.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Prince implements multivariate exploratory data analysis methods including PCA, CA, MCA, MFA, FAMD, GPA, and PGA with a scikit-learn API for tabular data summarization.

Yes. Prince is actively maintained, has no known vulnerabilities, installs with low friction, and provides a comprehensive suite of factor analysis methods under a permissive MIT license. It is well-tested against established implementations and suitable for exploratory data analysis workflows that need more than standard PCA.

Install

prince on PyPI

pip

pip install prince

uv

uv add prince

poetry

poetry add prince

Installing prince

Before you install

Low install friction with a pure-Python wheel. Actively maintained as of 45 days ago with a revamp completed in 2022. Requires Python 3.10 or later.

License in practice

MIT license is permissive; you can use, modify, and distribute Prince freely in commercial and private projects with minimal restrictions.

Quickstart

pip install prince

import prince
import pandas as pd

pca = prince.PCA(n_components=5)
pca = pca.fit(your_dataframe)
transformed = pca.transform(your_dataframe)

Requires Python 3.10 or later.

Verify before relying

  • Whether supplementary rows/columns and row/column weights work reliably across all seven analysis methods.
  • Performance characteristics on datasets larger than those shown in examples.
  • Completeness of interactive plotting features when deployed outside Jupyter environments.

Package facts

License MIT (permissive)
Python support supports the current Python release (>=3.10)
Install friction low — pure-Python wheel
Runtime dependencies 4 — scikit-learn, pandas, altair, typing-extensions
Maintenance actively maintained — 45 days since the last release
First released
Downloads 139,821/month — #11,288 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: prince-0.20.1-py3-none-any.whl

Tags

principal component analysis pythoncorrespondence analysis librarymultivariate data analysisfactor analysis methodsdimensionality reduction exploratoryPCA CA MCA implementationtabular data decomposition
dimensionality-reductionexploratory-data-analysisfactor-analysis

More Information Analysis packages