{
  "id": 400938,
  "title": "Submission exception",
  "url": "/competitions/predict-student-performance-from-game-play/discussion/400938",
  "author_name": "",
  "post_date": "2023-04-11T02:25:00.903137100Z",
  "votes": 1,
  "comment_count": 2,
  "views": 0,
  "content": "<p>Hello.</p>\n<p>My submission.csv   contains duplicated [session_id, correct], I need some hints for moving forward.</p>\n<p>Regards.</p>",
  "messages": [
    {
      "id": "2217552",
      "postDate": "04/11/2023 02:25:00",
      "content": "<p>Hello.</p>\n<p>My submission.csv   contains duplicated [session_id, correct], I need some hints for moving forward.</p>\n<p>Regards.</p>",
      "rawMarkdown": "Hello.\n\nMy submission.csv   contains duplicated [session_id, correct], I need some hints for moving forward.\n\nRegards.",
      "votes": null
    },
    {
      "id": "2217867",
      "postDate": "04/11/2023 08:19:41",
      "content": "<pre><code> pandas  pd\n\nsubmission = pd.read_csv()\n\n(submission.duplicated(subset=).())\n\nsubmission = submission.drop_duplicates(subset=, keep=)\n\nsubmission.to_csv(, index=)\n</code></pre>",
      "rawMarkdown": "```python\nimport pandas as pd\n# Load your submission file as a dataframe\nsubmission = pd.read_csv(\"submission.csv\")\n# Check how many duplicates there are\nprint(submission.duplicated(subset=\"session_id\").sum())\n# Drop any duplicates and keep only the first occurrence\nsubmission = submission.drop_duplicates(subset=\"session_id\", keep=\"first\")\n# Save your submission file as a csv file\nsubmission.to_csv(\"submission.csv\", index=False)\n```",
      "votes": null
    },
    {
      "id": "2221070",
      "postDate": "04/14/2023 00:56:44",
      "content": "<p>Hi Yue,<br>\nSorry for the delay to respond. First of all thank for your help. I got rid of duplicate records. But I got a permition error on submission.to_csv. My understanding is that I do not understand how Kaggle Api works. <br>\nRegards.</p>",
      "rawMarkdown": "Hi Yue,\nSorry for the delay to respond. First of all thank for your help. I got rid of duplicate records. But I got a permition error on submission.to_csv. My understanding is that I do not understand how Kaggle Api works. \nRegards.",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 2217867,
      "author_name": "yus002",
      "author_url": "",
      "post_date": "04/11/2023 08:19:41",
      "content": "<pre><code> pandas  pd\n\nsubmission = pd.read_csv()\n\n(submission.duplicated(subset=).())\n\nsubmission = submission.drop_duplicates(subset=, keep=)\n\nsubmission.to_csv(, index=)\n</code></pre>",
      "votes": null,
      "replies": [
        {
          "id": 2221070,
          "author_name": "juliocontreras",
          "author_url": "",
          "post_date": "04/14/2023 00:56:44",
          "content": "<p>Hi Yue,<br>\nSorry for the delay to respond. First of all thank for your help. I got rid of duplicate records. But I got a permition error on submission.to_csv. My understanding is that I do not understand how Kaggle Api works. <br>\nRegards.</p>",
          "votes": null,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "2217552": "Hello.\n\nMy submission.csv   contains duplicated [session_id, correct], I need some hints for moving forward.\n\nRegards.",
    "2217867": "```python\nimport pandas as pd\n# Load your submission file as a dataframe\nsubmission = pd.read_csv(\"submission.csv\")\n# Check how many duplicates there are\nprint(submission.duplicated(subset=\"session_id\").sum())\n# Drop any duplicates and keep only the first occurrence\nsubmission = submission.drop_duplicates(subset=\"session_id\", keep=\"first\")\n# Save your submission file as a csv file\nsubmission.to_csv(\"submission.csv\", index=False)\n```",
    "2221070": "Hi Yue,\nSorry for the delay to respond. First of all thank for your help. I got rid of duplicate records. But I got a permition error on submission.to_csv. My understanding is that I do not understand how Kaggle Api works. \nRegards."
  },
  "source": "meta"
}