# Let's build a pipeline for the numerical attributes

I did not understand.

from sklearn.pipeline import Pipeline
from sklearn.preprocessing import StandardScaler
num_pipeline=Pipeline([(‘imputer’,SimpleImputer(strategy=‘median’)),(‘attribs_adder’,CombinedAttributesAdder()),(‘std_scaler’,StanderdScaler())])

NameError Traceback (most recent call last)
in
1 from sklearn.pipeline import Pipeline
2 from sklearn.preprocessing import StandardScaler
----> 3 num_pipeline=Pipeline([(‘imputer’,SimpleImputer(strategy=‘median’)),(‘attribs_adder’,CombinedAttributesAdder()),(‘std_scaler’,StanderdScaler())])

NameError: name ‘CombinedAttributesAdder’ is not defined

How can i fix it??

Please reply.

Hi, the error is self-explanatory. You have either not defined the CombinedAttributesAdder function, or have not executed the cell that contains that code.

Please tell me the code.

Where I have to defind it??

Please check you complete code to find out where you have defined it, if you cannot find it that would mean that you did not define it and that is causing this error. Otherwise, please refer to the respective Jupyter notebook on our GitHub repository:

I am working on housing calfornia data but tell me why this happening

The error is self-explanatory, you have either not defined CombinedAttributesAdder() function, or have not executed the cell containing that code. As suggested earlier, please go through the correct code from our GitHub repository to understand where you need to make changes: