# Create the Submission\_formet.csv file

**URL:** <https://community.drivendata.org/t/create-the-submission-formet-csv-file/4691>\
**Category:** Hateful Memes\
**Created:** [June 26, 2020, 7:24am UTC](https://community.drivendata.org/t/create-the-submission-formet-csv-file/4691 "2020-06-26T07:24:47Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![NEWTON](https://avatars.discourse-cdn.com/v4/letter/n/f475e1/32.png) [@NEWTON](https://community.drivendata.org/u/NEWTON)\
**Post date:** [June 26, 2020, 7:24am UTC](https://community.drivendata.org/t/create-the-submission-formet-csv-file/4691/1 "2020-06-26T07:24:47Z")

</div>

how to create submission.csv

---

<div class="post-metadata">

**Author:** ![VictorCallejas](https://avatars.discourse-cdn.com/v4/letter/v/8491ac/32.png) [@VictorCallejas](https://community.drivendata.org/u/VictorCallejas)\
**Post date:** [June 30, 2020, 4:09pm UTC](https://community.drivendata.org/t/create-the-submission-formet-csv-file/4691/2 "2020-06-30T16:09:34Z")

</div>

The way I do it.

From predicted logits:

- get labels with np.argmax
- get probas with a softmax

Then I create a pandas Dataframe:

- col\_names = [‘id’,‘proba’,‘label’]
- should be (1000,3)

Export to csv:  
`df.to_csv(file_path,index = False, header=True,sep=',',encoding='utf-8-sig')`

---

<div class="post-metadata">

**Author:** ![Agedev](https://avatars.discourse-cdn.com/v4/letter/a/dc4da7/32.png) [@Agedev](https://community.drivendata.org/u/Agedev)\
**Post date:** [August 9, 2020, 2:23am UTC](https://community.drivendata.org/t/create-the-submission-formet-csv-file/4691/4 "2020-08-09T02:23:09Z")

</div>

I had to ensure the order of id’s in the submission file matched the test set
