How Kaggle submissions actually work (CSV, code comps, and not wasting your daily budget)

Table of Contents

Submitting to Kaggle sounds trivial until your first CSV gets rejected for a reason the error message won’t explain. Here’s how the two formats work and how not to burn your limited daily submissions on nothing.

CSV submissions

Most competitions want a CSV with an ID column and one or more prediction columns. Titanic, for example:

PassengerId,Survived
892,0
893,1
894,0
...

The rules that actually bite:

Code Competition submissions

Some competitions make you submit a notebook that generates predictions at runtime instead of a finished CSV. In those:

The workflow, start to finish

  1. Train on the training data
  2. Predict on the test set
  3. Build a DataFrame with exactly the required columns
  4. Save it: df.to_csv("submission.csv", index=False)
  5. Submit: kaggle competitions submit -c <name> -f submission.csv -m "description"
  6. Check the score: kaggle competitions submissions -c <name>

In my toolkit, the SubmissionGenerator handles steps 3 through 5 so I can’t fat-finger the format.

Don’t waste your daily submissions

Most competitions give you 5 to 10 submissions a day, which disappears fast. What keeps me honest: