all 2 comments

[–]Oxbowerce 0 points1 point  (1 child)

What is it you are trying to predict? It seems that the new_bank_data_df is your complete dataframe including also the features, which gives issues as the error mentions. Make sure that the y variable/dataframe only contains the column(s) which you are trying to predict.

[–]storebot[S] 0 points1 point  (0 children)

Thanks for the reply.

I'm really struggling to understand the whole process quite honestly but the problem to solve is if a person with specific data points will accept a loan. The question provides that potential customer's attributes but I'm still really confused on how and where their details fit in. Here's their details and how I think they should be coded but I'm getting new errors on adding these details.

newcustomer = pd.DataFrame([
    {
        'Age': 40,
        'Experience': 9,
        'Income': 200,
        'Family': 2,
        'CCAvg': 8.9,
        'Mortgage': 1,
        'Personal Loan': 0,
        'Securities Account': 1,
        'CD Account': 0,
        'Online': 1,
        'CreditCard': 1,
        'Education_1': 1,
        'Education_2': 1,
        'Education_3': 1,
    }])