here is my submission code:
submission = pd.DataFrame({
“Loan_ID”: df_test[“Loan_ID”],
“Loan_Status”: pred
})
submission.to_csv(’/resources/data/Loan prediction/Sample_Submission.csv’,sep=’,’, index=False)
as you can see i have used the ‘sep’ parameter to separate the features using comma and i also have 368 lines, but still it seems i am getting the same problem.
when i run the below lines:
import csv
with open(’/resources/data/Loan prediction/Sample_Submission.csv’) as f:
reader = csv.reader(f)
your_list = list(reader)
print (your_list)
i get:
[[‘Loan_ID’, ‘Loan_Status’], [‘LP001015’, ‘Yes’], [‘LP001022’, ‘Yes’], [‘LP001031’, ‘Yes’], [‘LP001035’, ‘Yes’], [‘LP001051’, ‘Yes’], [‘LP001054’, ‘Yes’], [‘LP001055’, ‘Yes’], [‘LP001056’, ‘No’], [‘LP001059’, ‘Yes’], [‘LP001067’, ‘Yes’], [‘LP001078’, ‘Yes’], [‘LP001082’, ‘No’], [‘LP001083’, ‘Yes’], [‘LP001094’, ‘No’],…]