#112112th of 242 in ML frameworks and libraries

category_encoders

scikit-learn transformers that encode categorical columns as numeric features

Stars
2.5k
License
BSD-3-Clause
Last commit
Oct 2026
Last release
Oct 2026
Language
Python
Stars, last 29 weeks+31
25 Apr 2026: 2,479 stars2 May 2026: 2,480 stars9 May 2026: 2,480 stars16 May 2026: 2,480 stars23 May 2026: 2,482 stars30 May 2026: 2,482 stars6 Jun 2026: 2,482 stars13 Jun 2026: 2,483 stars20 Jun 2026: 2,483 stars27 Jun 2026: 2,484 stars4 Jul 2026: 2,485 stars11 Jul 2026: 2,487 stars18 Jul 2026: 2,488 stars25 Jul 2026: 2,488 stars1 Aug 2026: 2,488 stars8 Aug 2026: 2,490 stars15 Aug 2026: 2,492 stars22 Aug 2026: 2,492 stars29 Aug 2026: 2,494 stars5 Sept 2026: 2,496 stars12 Sept 2026: 2,498 stars19 Sept 2026: 2,499 stars26 Sept 2026: 2,503 stars3 Oct 2026: 2,505 stars10 Oct 2026: 2,507 stars17 Oct 2026: 2,507 stars24 Oct 2026: 2,508 stars31 Oct 2026: 2,509 stars7 Nov 2026: 2,510 stars14 Nov 2026: 2,510 stars

2,479 on 25 Apr 20262,510 on 14 Nov 2026

From GitHub's daily star counts.

Checked on GitHub.

Overview

A Python library of scikit-learn-compatible transformers that convert categorical variables to numbers. It covers unsupervised methods (one-hot, binary, BaseN, hashing, count, ordinal, contrast codings) and supervised ones (target, CatBoost, leave-one-out, James-Stein, weight of evidence, GLMM). Encoders accept numpy arrays and pandas DataFrames and work inside sklearn pipelines.

Who it is for: Data scientists preprocessing categorical features in scikit-learn pipelines

Strengths

  • About 23 encoding methods behind one sklearn transformer API
  • Works with numpy arrays and pandas DataFrames, and drops into sklearn pipelines
  • NestedCVWrapper and PolynomialWrapper add overfitting control and polynomial target support
  • Each method cites a reference, and the repo includes examples and benchmarks

Weaknesses

  • Supervised encoders need fit_transform on training data; fit().transform() can give different results
  • GLMMEncoder needs the optional statsmodels dependency via the glmm extra
  • Requires Python 3.11 or newer
  • Tabular preprocessing only; no model training or serving

What it needs

  • no GPU
  • Needs numpy, pandas, scikit-learn, scipy, statsmodels (optional, for GLMMEncoder)

What changed

From the release notes. No flag means the note does not say so, not that the upgrade is safe.

Also in ML frameworks and libraries

See all 242
Also in ML frameworks and libraries
RankProjectScore
1transformersModel-definition library for pretrained text, vision, audio and multimodal models169.3k starsApache-2.094 out of 100
2ultralyticsPython library and CLI for training and running YOLO vision models63.5k starsAGPL-3.094 out of 100
3pytorch-image-modelsPyTorch library of image models, pretrained weights and training scripts37.3k starsApache-2.094 out of 100
#4pytorchPython tensor library with GPU support and tape-based autograd105.8k starscustom license93 out of 100
#5supervisionPython toolkit for loading, annotating and counting computer vision detections Live demo ↗ (opens in a new tab)51.7k starsMIT92 out of 100