Migrating to svy 2026

What changes when code written for svy 0.37 moves to svy 2026.0: the renames, the removals, and the changes that raise nothing.

svy 2026.0 is the first stable release. From here on, only a year’s first release (2027.0) may break code, and a rename or removal is announced by a DeprecationWarning during the year before it. Moving from 0.37 is a one-time update.

The renames and removals below fail loudly: an old keyword is Python’s TypeError, and most old names raise an error naming their replacement. The first table is the exception. Those changes raise nothing, so check them first. Each row is described in full in the release notes.

Coming from 0.35 or earlier, also note two changes of 0.36: svy.datasets.load returns a ready Sample (the frame is sample.data), and the bundled datasets hold codes, so filters and controls use svy.col("urbrur") == 2, not == "Urban". svy.datasets.info() replaces catalog() and describe(). The datasets tutorial shows both.

Changes that raise nothing

0.37 2026.0
frame.sampling.srs(), the pps_* methods and multistage drew into frame They return a new Sample and leave frame as it was: sample = frame.sampling.srs(...), or inplace=True
update_data(), set_design() and update_design() changed the sample They return a new Sample: sample = sample.update_design(...), or inplace=True
A SampleSize or Power goal, and allocate(), wrote into the object Each returns a new object
A one-sided SampleSize or Power test took the side the effect was on It takes the side alternative= names
fit.margins(variables="x") gave a list of one One GLMMargins; variables=["x"] keeps the list
create_sdr_wgts sorted a non-integer order column by its integer part It sorts by the values
A legacy RandomState gave a new seed on each n_draws= or show_data call It draws as numpy.random.default_rng of it does

Requirements and saved results

Requirements: Python 3.12, numpy 2.3 and scipy 1.15 or later.

Saved results: a 0.x payload raises PAYLOAD_SCHEMA_MISMATCH. Read it with svy<2026, or rerun the analysis.

Modules and names

0.37 2026.0
svy.selection, Selection svy.sampling, Sampling
svy.regression svy.glm
svy.TargetMean, TargetProp, TargetTwoMeans, TargetTwoProps svy.size.TargetMean, …
EstimateList, GLMMarginsList svy.estimation.ResultList, also svy.glm.ResultList
TTestOneGroup, TTestTwoGroups, TTestByResult TTest
RankTestTwoSample, RankTestKSample, RankTestByResult RankTest
TtestEst; DiffEst, TTestStats TTestEst; TTestRow in result.tests
svy.RandomState, svy.typing.RandomState, svy.utils.RandomState svy.typing.RNGLike
svy.utils.seed_from_random_state svy.utils.seed_from_rng
svy.core.Sample and other re-exports svy.Sample, svy.enums.X, svy.typing.X
svy.Cap svy.Threshold
svy.metadata.MetadataSource svy.enums.MetadataSource
svy.datasets.DatasetError svy.errors.DatasetError

Parameters

Call 0.37 2026.0
Every random step: draws, replicate weights, show_data, Singleton rstate= rng=
median, quantile q_method= quantile_rule=
tabulate rowvar=, colvar= row=, col=
remove_columns, keep_columns, describe, show_data, svy.io.read_* columns= cols=
top_code, bottom_code, bottom_and_top_code, recode, categorize replace=True into="<column>"
lag name= into=
create_sdr_wgts order_col= order_by=
allocate power= exponent=
SampleSize and Power tests and comparisons two_sides= alternative=
glm.fit family="nb", "negativebinomial", "inversegaussian" "negative_binomial", "inverse_gaussian"
svy.datasets.info, load use_cache=, force_download= refresh=
svy.datasets lookups slug name
Estimation calls fay_coef=, variance_center= On the design’s replicate weights: design.update_rep_weights(...)

Attributes

0.37 2026.0
ParamEst.prob ParamEst.p
Estimate.q_method Estimate.quantile_rule
Estimate.method, Contrast.method, Design.method .variance
where_clause on results where
Table.rowvar, colvar, rowvals, colvals row, col, row_levels, col_levels
GLMFit.cov_matrix covariance
GLMPred.yhat, GLMMargins.margin est
model.fitted.coefs and the fit’s other fields fit.coefs: glm.fit() returns the GLMFit
result.stats.t, result.diff[0].diff result.tests[0].t, result.tests[0].diff
A rank test’s method_name score
TargetAllocation.power exponent
Dataset.slug, DatasetCatalog.slugs name, names
sample.rep_wgts, n_reps On sample.design
sample.dtypes, n_columns sample.data.schema, sample.data.width
Design.specified_fields Design.columns()

Calls

0.37 2026.0
sample.glm.predict(), sample.glm.margins() fit = sample.glm.fit(...), then fit.predict(), fit.margins()
sample.set_var_label(s), set_value_labels, use_scheme, set_categories, set_type, wrangling.apply_labels sample.meta.set_var_labels({...}), set_value_labels, set_scheme, set_categories, set_type
meta.inspect, coverage, unlabeled, orphaned meta.summary()
LabellingCatalog.pick get
read_*_with_labels, create_from_* svy.io.read_*, which returns a labelled Sample
read_sav, read_dta, read_xpt and the other sav/dta/xpt names read_spss, read_stata, read_sas
scan_csv, scan_parquet pl.scan_*, then svy.Sample
write_csv(frame), write_parquet(frame) polars’ own writers; svy’s take a Sample
set_data, use_weight update_data, update_design(wgt=)
clone(data=), clone(design=), clone(rep_wgts=) update_data, set_design, update_design(rep_wgts=)
wrangling.drop, select remove_columns, keep_columns
controls_margins_template, control_aux_template rake_template, calibrate_template
set_default_print_width, set_print_width, Table.set_decimals, PRINT_WIDTH/DECIMALS/USE_LABELS svy.set_print_options(...), or result.style(...) for one object
show() on results and designs print(); print(fit.style(exponentiate=True))
Estimate.to_polars_printable() to_polars(), or str()
Table.to_dataframe(), to_records(), to_dict() crosstab(), to_polars().to_dicts(), svy.serialize.to_dict()
SampleSize.to_polars(order_by=, ...) to_polars(component="sizes" \| "allocation"), then sort with polars
SampleSize.to_rich_table() print()
Design.fill_missing Design.update

Removed

0.37 Use
mean(as_factor=True) prop()
prop(ci_method="beta") ci_method="korn-graubard"
use_labels= on tabulate, ttest, ranktest, glm.fit result.style(use_labels=) or to_polars(use_labels=)
method=None Leave it out: "taylor" is the default
glm.fit dropping incomplete rows by default drop_nulls=True
filter_records(None), check_singletons= A where=; on_singletons=
predict(y_col=) Residuals come whenever new_data holds the response
calibrate_matrix(weights_only=) out.data["calib_wgt"]
rake(display_iter=), corr(kind=), Estimate(rstate=), Table builder methods Nothing