0

I am getting submission error in Kaggle ERROR: Column '' was not expected (Line 1, Column 1) when I am submitting my final .csv file

Pranay Aryal
  • 5,208
  • 4
  • 30
  • 41

3 Answers3

3

Try adding index=False while saving csv like so:

output.to_csv("output.csv", index=False)

Jakub Królak
  • 63
  • 1
  • 8
1

df_for_submission.to_csv('submission.csv', index=False)

Pranay Aryal
  • 5,208
  • 4
  • 30
  • 41
  • Please use the edit link on your question to add additional information. The Post Answer button should be used only for complete answers to the question. - [From Review](/review/low-quality-posts/20349417) – Busti Jul 19 '18 at 16:11
  • @Busti I'm afraid this is the complete answer to the question. What do you think is the complete answer to this question? If you have one you can post it below. – Pranay Aryal Jul 19 '18 at 16:49
0

Try this:

result_df.to_csv('Submission_file_name.csv', index=False , header = 1)