Commit d9fbf78
Adapt MeanEncoder to narwhals-returning check_X
check_X_y now returns a narwhals frame, so bind that to nw_X and keep the
original native X for _check_or_select_variables, _check_na,
_get_feature_names_in and the nwd.is_pandas_dataframe(X) fast-path check
(those helpers still expect native input, matching the CategoricalImputer
migration on narwhals-migration). The pandas value_counts/groupby fast
path is unchanged - X stays native so no rehydration is needed. The
narwhals branch reuses nw_X from check_X_y instead of nw.from_native(X).
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>1 parent bb9d673 commit d9fbf78
1 file changed
Lines changed: 2 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
219 | 219 | | |
220 | 220 | | |
221 | 221 | | |
222 | | - | |
| 222 | + | |
223 | 223 | | |
224 | 224 | | |
225 | 225 | | |
| |||
230 | 230 | | |
231 | 231 | | |
232 | 232 | | |
233 | | - | |
234 | | - | |
235 | | - | |
| 233 | + | |
236 | 234 | | |
237 | 235 | | |
238 | 236 | | |
| |||
265 | 263 | | |
266 | 264 | | |
267 | 265 | | |
268 | | - | |
269 | 266 | | |
270 | 267 | | |
271 | 268 | | |
| |||
0 commit comments