Python Forum

Full Version: Applying function
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
code

Hi,

I still see nulls in X_train and my pipline seems to not have applied. For example, there should be more columns due to one-hot encoding. Am I doing something wrong?

def apply_fe_pipeline(X_train,X_test):
    # fit the imputer
    feature_engineering_pipeline.fit(X_train)

    # transform the data
    X_train= feature_engineering_pipeline.transform(X_train)
    X_test= feature_engineering_pipeline.transform(X_test)
    training_null=X_train.isna().values.sum()
    test_null=X_test.isna().values.sum()
    
    return print ('count of nulls in training set after fe:',training_null,
                 'count of nulls in test set after fe:',test_null)
apply_fe_pipeline(X_train,X_test)
This looks like a question that should be directed at the pytorch/tensorflow/whatever library you're using's forum, since the input/output/errors are all completely within those libraries.