{
  "id": 398682,
  "title": "submission.csv getting bigger",
  "url": "/competitions/predict-student-performance-from-game-play/discussion/398682",
  "author_name": "",
  "post_date": "2023-03-31T07:34:24.761531500Z",
  "votes": 2,
  "comment_count": 1,
  "views": 0,
  "content": "<p>I'm running the following code:</p>\n<pre><code>import pandas as pd\n\nimport jo_wilder\nenv = jo_wilder.make_env()\niter_test = env.iter_test()\n\nfor (test, sample_submission) in iter_test:\n    env.predict(sample_submission)\n\ndf = pd.read_csv('submission.csv')\nprint( df.shape )\n</code></pre>\n<p>With each run of the code, the submission.csv file is getting bigger - it looks like the dataframe from the each line is added to the file, including the header, i.e. there is a **row ** with values (session_id, correct).</p>\n<p>Is that an expected behavior? Any thoughts on how to fix this?</p>",
  "messages": [
    {
      "id": "2203862",
      "postDate": "03/31/2023 07:34:24",
      "content": "<p>I'm running the following code:</p>\n<pre><code>import pandas as pd\n\nimport jo_wilder\nenv = jo_wilder.make_env()\niter_test = env.iter_test()\n\nfor (test, sample_submission) in iter_test:\n    env.predict(sample_submission)\n\ndf = pd.read_csv('submission.csv')\nprint( df.shape )\n</code></pre>\n<p>With each run of the code, the submission.csv file is getting bigger - it looks like the dataframe from the each line is added to the file, including the header, i.e. there is a **row ** with values (session_id, correct).</p>\n<p>Is that an expected behavior? Any thoughts on how to fix this?</p>",
      "rawMarkdown": "I'm running the following code:\n\n```\nimport pandas as pd\n\nimport jo_wilder\nenv = jo_wilder.make_env()\niter_test = env.iter_test()\n\nfor (test, sample_submission) in iter_test:\n    env.predict(sample_submission)\n\ndf = pd.read_csv('submission.csv')\nprint( df.shape )\n```\n\nWith each run of the code, the submission.csv file is getting bigger - it looks like the dataframe from the each line is added to the file, including the header, i.e. there is a **row ** with values (session_id, correct).\n\nIs that an expected behavior? Any thoughts on how to fix this?",
      "votes": null
    },
    {
      "id": "2204024",
      "postDate": "03/31/2023 10:16:38",
      "content": "<p>Yes, this line is also added to my file. It doesn't interfere</p>",
      "rawMarkdown": "Yes, this line is also added to my file. It doesn't interfere",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 2204024,
      "author_name": "vadimkamaev",
      "author_url": "",
      "post_date": "03/31/2023 10:16:38",
      "content": "<p>Yes, this line is also added to my file. It doesn't interfere</p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "2203862": "I'm running the following code:\n\n```\nimport pandas as pd\n\nimport jo_wilder\nenv = jo_wilder.make_env()\niter_test = env.iter_test()\n\nfor (test, sample_submission) in iter_test:\n    env.predict(sample_submission)\n\ndf = pd.read_csv('submission.csv')\nprint( df.shape )\n```\n\nWith each run of the code, the submission.csv file is getting bigger - it looks like the dataframe from the each line is added to the file, including the header, i.e. there is a **row ** with values (session_id, correct).\n\nIs that an expected behavior? Any thoughts on how to fix this?",
    "2204024": "Yes, this line is also added to my file. It doesn't interfere"
  },
  "source": "meta"
}