scikit-learn 1.9.0 (2 Jun 2026, jeremiedbb) adds narwhals (>=2.0.1) so pandas and Polars set_output share one path after __dataframe__ deprecation. Experimental callbacks (ProgressBar, ScoringMonitor). Not a LightGBM/XGBoost roundup. Three things to try tonight. Not investment advice.
scikit-learn 1.9.0 was tagged on 2 June 2026 by jeremiedbb. Python 3.11–3.14. The changelog lead for dataframe users is narwhals as a runtime dependency (narwhals>=2.0.1 on PyPI), same class as joblib — PR #31127 by Christian Lorentzen and Marco Gorelli. This note is that plus three things to try tonight. It is not a LightGBM / XGBoost comparison, not a gradient-boosting bake-off, and not investment advice.
The only course CTA is Introduction to Python Programming. Related Hub: Polars 1.44, NumPy 2.5 descending sort if you already sorted that notebook.
From Version 1.9 (June 2026):
narwhals. Lightweight, zero extra deps of its own. It unifies dataframe input X and set_output output (pandas, Polars, and room for more). sklearn had relied on the dataframe interchange protocol (__dataframe__) for non-pandas frames; Polars deprecated that protocol (sklearn also notes Polars 1.40). validate_data Polars path no longer uses __dataframe__ (#33789). You do not import narwhals to fit a pipeline — it is internal. Full API in narwhals: pandas, Polars, PyArrow, cuDF, Modin; lazy-only Dask / DuckDB / Ibis / PySpark / SQLFrame.
Experimental callbacks (sklearn.callback): ProgressBar, ScoringMonitor. Estimators that support them include LogisticRegression (solver="lbfgs"), GridSearchCV / RandomizedSearchCV / halving search, Pipeline, StandardScaler. Register with the callback API in the 1.9 developer notes. May change without the usual deprecation cycle.
sparse_interface config. sklearn.set_config(sparse_interface="sparray") to return SciPy sparse arrays instead of matrices. Default remains "spmatrix" for now.
Other 1.9 items you can ignore tonight: more Array API coverage, metric_at_thresholds, HTML estimator cards with fitted attributes. Still not wrapping LightGBM or XGBoost in this post.
python -c "import sklearn, narwhals; print(sklearn.__version__, narwhals.__version__)"
# pip install -U "scikit-learn==1.9.0"
1. Polars in, Polars out (tiny synthetic frame; no boosting libraries):
import polars as pl
from sklearn.preprocessing import StandardScaler
X = pl.DataFrame({"a": [0.0, 1.0, 2.0], "b": [10.0, 10.0, 12.0]})
sc = StandardScaler().set_output(transform="polars")
print(type(sc.fit_transform(X)))
print(sc.fit_transform(X))
2. pandas still works — same estimator, set_output(transform="pandas").
3. Peek the new dependency without changing your model:
import sklearn
print(sklearn.__version__)
import importlib.metadata as im
print("narwhals", im.version("narwhals"))
Stop after one of three. Changelog: v1.9.html. Narwhals docs: narwhals-dev.github.io/narwhals.
If Python environments still fight you, Introduction to Python Programming, then print sklearn.__version__ and run the Polars set_output sketch.