{
  "id": 306057,
  "title": "Quick tip: dropped zero values in article id",
  "url": "/competitions/h-and-m-personalized-fashion-recommendations/discussion/306057",
  "author_name": "",
  "post_date": "2022-02-08T02:10:30.116901300Z",
  "votes": 116,
  "comment_count": 7,
  "views": 0,
  "content": "<p>Hey all!</p>\n<p>Just a quick tip that I learned the hard way. I just made a couple submissions and was really perplexed at why they were scoring zero when I suspected there should have been some type of score. Turns out that you need to load in the <code>article_id</code> as a string <code>str</code> otherwise when you try and submit the string version the zeros are missing from the beginning of the string. Here is a quick snippet that can help that</p>\n<pre><code>data = pd.read_csv(\n    '/kaggle/input/h-and-m-personalized-fashion-recommendations/transactions_train.csv',\n\n    # Make sure article_id is being loading in as a string\n    dtype={'article_id': str}\n)\n</code></pre>\n<p>I hope this is useful 🙂🎉</p>",
  "messages": [
    {
      "id": "1680737",
      "postDate": "02/08/2022 02:10:30",
      "content": "<p>Hey all!</p>\n<p>Just a quick tip that I learned the hard way. I just made a couple submissions and was really perplexed at why they were scoring zero when I suspected there should have been some type of score. Turns out that you need to load in the <code>article_id</code> as a string <code>str</code> otherwise when you try and submit the string version the zeros are missing from the beginning of the string. Here is a quick snippet that can help that</p>\n<pre><code>data = pd.read_csv(\n    '/kaggle/input/h-and-m-personalized-fashion-recommendations/transactions_train.csv',\n\n    # Make sure article_id is being loading in as a string\n    dtype={'article_id': str}\n)\n</code></pre>\n<p>I hope this is useful 🙂🎉</p>",
      "rawMarkdown": "Hey all!\n\nJust a quick tip that I learned the hard way. I just made a couple submissions and was really perplexed at why they were scoring zero when I suspected there should have been some type of score. Turns out that you need to load in the `article_id` as a string `str` otherwise when you try and submit the string version the zeros are missing from the beginning of the string. Here is a quick snippet that can help that\n\n```\ndata = pd.read_csv(\n    '/kaggle/input/h-and-m-personalized-fashion-recommendations/transactions_train.csv',\n\n    # Make sure article_id is being loading in as a string\n    dtype={'article_id': str}\n)\n```\n\nI hope this is useful 🙂🎉",
      "votes": null
    },
    {
      "id": "1680818",
      "postDate": "02/08/2022 03:30:43",
      "content": "<p>I was wondering how to relate to image file name, and it was the same problem, article_id with leading zero. Thanks!</p>",
      "rawMarkdown": "I was wondering how to relate to image file name, and it was the same problem, article_id with leading zero. Thanks!",
      "votes": null
    },
    {
      "id": "1681557",
      "postDate": "02/08/2022 14:58:07",
      "content": "<p>too bad I saw your comment after I figured it out the hard way too 😂</p>",
      "rawMarkdown": "too bad I saw your comment after I figured it out the hard way too 😂",
      "votes": null
    },
    {
      "id": "1681643",
      "postDate": "02/08/2022 15:50:32",
      "content": "<p>thanks for sharing…</p>",
      "rawMarkdown": "thanks for sharing...",
      "votes": null
    },
    {
      "id": "1682929",
      "postDate": "02/09/2022 13:24:42",
      "content": "<p>Thanks you <a href=\"https://www.kaggle.com/rdizzl3\" target=\"_blank\">@rdizzl3</a> 😊</p>",
      "rawMarkdown": "Thanks you @rdizzl3 😊",
      "votes": null
    },
    {
      "id": "1714197",
      "postDate": "03/06/2022 18:01:26",
      "content": "<p>Thanks, this helped fixed my 0 score as well</p>",
      "rawMarkdown": "Thanks, this helped fixed my 0 score as well",
      "votes": null
    },
    {
      "id": "1714695",
      "postDate": "03/07/2022 08:41:15",
      "content": "<p>thank you for sharing</p>",
      "rawMarkdown": "thank you for sharing",
      "votes": null
    },
    {
      "id": "1719832",
      "postDate": "03/12/2022 07:02:05",
      "content": "<p>Thank you for pointing this out (would have taken a while to see that this was an issue). </p>",
      "rawMarkdown": "Thank you for pointing this out (would have taken a while to see that this was an issue).",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 1680818,
      "author_name": "junkoda",
      "author_url": "",
      "post_date": "02/08/2022 03:30:43",
      "content": "<p>I was wondering how to relate to image file name, and it was the same problem, article_id with leading zero. Thanks!</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 1681557,
      "author_name": "eustachia",
      "author_url": "",
      "post_date": "02/08/2022 14:58:07",
      "content": "<p>too bad I saw your comment after I figured it out the hard way too 😂</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 1681643,
      "author_name": "ahsanzaman",
      "author_url": "",
      "post_date": "02/08/2022 15:50:32",
      "content": "<p>thanks for sharing…</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 1682929,
      "author_name": "arunasivapragasam",
      "author_url": "",
      "post_date": "02/09/2022 13:24:42",
      "content": "<p>Thanks you <a href=\"https://www.kaggle.com/rdizzl3\" target=\"_blank\">@rdizzl3</a> 😊</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 1714197,
      "author_name": "jesperkarsten",
      "author_url": "",
      "post_date": "03/06/2022 18:01:26",
      "content": "<p>Thanks, this helped fixed my 0 score as well</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 1714695,
      "author_name": "amulyaprasanth",
      "author_url": "",
      "post_date": "03/07/2022 08:41:15",
      "content": "<p>thank you for sharing</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 1719832,
      "author_name": "annnvv",
      "author_url": "",
      "post_date": "03/12/2022 07:02:05",
      "content": "<p>Thank you for pointing this out (would have taken a while to see that this was an issue). </p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "1680737": "Hey all!\n\nJust a quick tip that I learned the hard way. I just made a couple submissions and was really perplexed at why they were scoring zero when I suspected there should have been some type of score. Turns out that you need to load in the `article_id` as a string `str` otherwise when you try and submit the string version the zeros are missing from the beginning of the string. Here is a quick snippet that can help that\n\n```\ndata = pd.read_csv(\n    '/kaggle/input/h-and-m-personalized-fashion-recommendations/transactions_train.csv',\n\n    # Make sure article_id is being loading in as a string\n    dtype={'article_id': str}\n)\n```\n\nI hope this is useful 🙂🎉",
    "1680818": "I was wondering how to relate to image file name, and it was the same problem, article_id with leading zero. Thanks!",
    "1681557": "too bad I saw your comment after I figured it out the hard way too 😂",
    "1681643": "thanks for sharing...",
    "1682929": "Thanks you @rdizzl3 😊",
    "1714197": "Thanks, this helped fixed my 0 score as well",
    "1714695": "thank you for sharing",
    "1719832": "Thank you for pointing this out (would have taken a while to see that this was an issue)."
  },
  "source": "meta"
}