Financial Inclusion in Africa
Can you predict who in Africa is most likely to have a bank account?
Prize
Knowledge
Time
Active
Participants
1080 active · 3380 enrolled
Helping
Africa
Good for beginners
Prediction
Financial Services
Error making submission
Help · 12 Aug 2022, 22:43 · 2

--------------------------------------------------------------------------- ValueError Traceback (most recent call last) <ipython-input-203-73aaf3ad5c5e> in <module>() 3 submission['uniqueid'] = test['uniqueid'] 4 ----> 5 submission['bank_account'] = log_model.predict(X_test) 6 7 submission.to_csv('first_project.csv',index=False) 3 frames /usr/local/lib/python3.7/dist-packages/pandas/core/common.py in require_length_match(data, index) 530 if len(data) != len(index): 531 raise ValueError( --> 532 "Length of values " 533 f"({len(data)}) " 534 "does not match length of index " ValueError: Length of values (7058) does not match length of index (10086)

Discussion 2 answers

Actually I think there's something, I there's a bug somewhere in my entire code.

But I don't know where or how to find it.

Use this code instead.

submission = pd.DataFrame({"uniqueid": test["uniqueid"] + " x " + test["country"], "bank_account": test.bank_account})