Open julienvos opened 3 years ago
That's a great point, thanks @julienvos . The ColumnTransformer
didn't exist when I wrote the book, so things were a bit ugly back then. You are right that we could just use a ColumnTransformer
for this: it would be more elegant and more robust. Would you like to submit a PR?
In command line 68 and 69 of the projectcode of Chapter 2, the column indices of rooms_ix, bedrooms_ix, population_ix, household_ix are calculated using the whole 'housing' df. These column indices are later used in the custom Transformer.
Shouldn't this be the indices of the subset of the housing df that is used in the Columntransformer?
(For the current project it does't matter because indices are the same, but just for the conveniece and clearity)
Kind regards