May-19-2018, 03:38 AM
Hi everyone,
I am working through a text book and I don't think my sklearn has the categorical encoder. I recently downloaded python 3 anaconda package so thought it would have everything.
Any ideas on how I can get the categorical encoder for my sklearn?
('Cat_encoder', CategoricalEncoder(encoding="onehot-dense")),
NameError: name 'CategoricalEncoder' is not defined
I am working through a text book and I don't think my sklearn has the categorical encoder. I recently downloaded python 3 anaconda package so thought it would have everything.
Any ideas on how I can get the categorical encoder for my sklearn?
cat_pipeline = Pipeline([ ('Selector', DataFrameSelector(cat_attribs)), ('Cat_encoder', CategoricalEncoder(encoding="onehot-dense")), ])File "<ipython-input-21-92eef82c65d6>", line 3, in <module>
('Cat_encoder', CategoricalEncoder(encoding="onehot-dense")),
NameError: name 'CategoricalEncoder' is not defined