{
  "id": 22007,
  "title": "Submit Error: type 'Int32', but was 'String' ",
  "url": "/competitions/grupo-bimbo-inventory-demand/discussion/22007",
  "author_name": "",
  "post_date": "2016-07-02T05:52:59.763Z",
  "votes": null,
  "comment_count": 3,
  "views": 582,
  "content": "<p>EDIT: Solved, read below</p>\n\n<p>When submitting Kaggle gives the following error multiple times. ERROR: Expected 'id' column to be of type 'Int32', but was 'String' ERROR: Unable to convert 'id' column row 100001 value '1e+05' to expected type 'Int32'. </p>\n\n<p>specifically every 100,000, the next is 200001</p>\n\n<p>I essentially understand the problem, that the values in id is being converted to scientific notation and can not be read. However scientific notation isn't how my data appears in R.  I have tried the following:</p>\n\n<p>&quot;write.csv&quot; on data.table\nChanging column classes in data.table (numeric and character)\nsaving as a data.frame, and using &quot;write.csv&quot;\nsetting &quot;options(scipen = 10)&quot; and running &quot;write.csv&quot; on data.table\nsetting &quot;options(scipen = 10)&quot; and saving as a data.frame, calling &quot;format(output2, scientific = FALSE) and then using &quot;write.csv&quot;\nsetting &quot;options(scipen = 500)&quot; and saving as a data.frame, calling &quot;format(output2, scientific = FALSE) and then using &quot;write.csv&quot;\nsetting &quot;options(scipen = 500)&quot; and saving as a data.frame, calling &quot;format(output2, scientific = FALSE) and then using &quot;write.table&quot;(sep=&quot;,&quot;)</p>\n\n<p>I'm not sure what else to try at this point. To my knowledge I'm giving a file in the exact format of the sample submission file. </p>\n\n<p>EDIT: setting &quot;options(scipen = 500)&quot; and saving as a data.frame, calling &quot;format(output2, scientific = FALSE), converting data.frame columns to numeric, and then using &quot;write.table&quot;(sep=&quot;,&quot;)  worked. </p>\n\n<p>For some reason the columns were in a format called &quot;AsIs&quot; even though they had been correct in data table before the conversion to a data frame. </p>",
  "messages": [
    {
      "id": "125748",
      "postDate": "07/02/2016 05:52:59",
      "content": "<p>EDIT: Solved, read below</p>\n\n<p>When submitting Kaggle gives the following error multiple times. ERROR: Expected 'id' column to be of type 'Int32', but was 'String' ERROR: Unable to convert 'id' column row 100001 value '1e+05' to expected type 'Int32'. </p>\n\n<p>specifically every 100,000, the next is 200001</p>\n\n<p>I essentially understand the problem, that the values in id is being converted to scientific notation and can not be read. However scientific notation isn't how my data appears in R.  I have tried the following:</p>\n\n<p>&quot;write.csv&quot; on data.table\nChanging column classes in data.table (numeric and character)\nsaving as a data.frame, and using &quot;write.csv&quot;\nsetting &quot;options(scipen = 10)&quot; and running &quot;write.csv&quot; on data.table\nsetting &quot;options(scipen = 10)&quot; and saving as a data.frame, calling &quot;format(output2, scientific = FALSE) and then using &quot;write.csv&quot;\nsetting &quot;options(scipen = 500)&quot; and saving as a data.frame, calling &quot;format(output2, scientific = FALSE) and then using &quot;write.csv&quot;\nsetting &quot;options(scipen = 500)&quot; and saving as a data.frame, calling &quot;format(output2, scientific = FALSE) and then using &quot;write.table&quot;(sep=&quot;,&quot;)</p>\n\n<p>I'm not sure what else to try at this point. To my knowledge I'm giving a file in the exact format of the sample submission file. </p>\n\n<p>EDIT: setting &quot;options(scipen = 500)&quot; and saving as a data.frame, calling &quot;format(output2, scientific = FALSE), converting data.frame columns to numeric, and then using &quot;write.table&quot;(sep=&quot;,&quot;)  worked. </p>\n\n<p>For some reason the columns were in a format called &quot;AsIs&quot; even though they had been correct in data table before the conversion to a data frame. </p>",
      "rawMarkdown": "EDIT: Solved, read below\r\n\r\nWhen submitting Kaggle gives the following error multiple times. ERROR: Expected 'id' column to be of type 'Int32', but was 'String' ERROR: Unable to convert 'id' column row 100001 value '1e+05' to expected type 'Int32'. \r\n\r\nspecifically every 100,000, the next is 200001\r\n\r\nI essentially understand the problem, that the values in id is being converted to scientific notation and can not be read. However scientific notation isn't how my data appears in R.  I have tried the following:\r\n\r\n\"write.csv\" on data.table\r\nChanging column classes in data.table (numeric and character)\r\nsaving as a data.frame, and using \"write.csv\"\r\nsetting \"options(scipen = 10)\" and running \"write.csv\" on data.table\r\nsetting \"options(scipen = 10)\" and saving as a data.frame, calling \"format(output2, scientific = FALSE) and then using \"write.csv\"\r\nsetting \"options(scipen = 500)\" and saving as a data.frame, calling \"format(output2, scientific = FALSE) and then using \"write.csv\"\r\nsetting \"options(scipen = 500)\" and saving as a data.frame, calling \"format(output2, scientific = FALSE) and then using \"write.table\"(sep=\",\")\r\n\r\nI'm not sure what else to try at this point. To my knowledge I'm giving a file in the exact format of the sample submission file. \r\n\r\nEDIT: setting \"options(scipen = 500)\" and saving as a data.frame, calling \"format(output2, scientific = FALSE), converting data.frame columns to numeric, and then using \"write.table\"(sep=\",\")  worked. \r\n\r\nFor some reason the columns were in a format called \"AsIs\" even though they had been correct in data table before the conversion to a data frame.",
      "votes": null
    },
    {
      "id": "125769",
      "postDate": "07/02/2016 11:19:15",
      "content": "<p>I suggest you look at the content of the file.  It is likely containing string delimiters such as ' or &quot;.</p>",
      "rawMarkdown": "I suggest you look at the content of the file.  It is likely containing string delimiters such as ' or \".",
      "votes": null
    },
    {
      "id": "125775",
      "postDate": "07/02/2016 13:02:13",
      "content": "<p>Adding on to CPMP's answer above, </p>\n\n<p>To read lines 100000 to  100005, you can use the following command: </p>\n\n<p>sed -n '100000,100005p;100006q' sample_submission.csv</p>\n\n<p>[<a>http://stackoverflow.com/questions/191364/quick-unix-command-to-display-specific-lines-in-the-middle-of-a-file]</a></p>",
      "rawMarkdown": "Adding on to CPMP's answer above, \r\n\r\nTo read lines 100000 to  100005, you can use the following command: \r\n\r\nsed -n '100000,100005p;100006q' sample_submission.csv\r\n\r\n[http://stackoverflow.com/questions/191364/quick-unix-command-to-display-specific-lines-in-the-middle-of-a-file]",
      "votes": null
    },
    {
      "id": "126103",
      "postDate": "07/06/2016 07:47:19",
      "content": "<p>think your 'id' column is of class/type string, whereas both columns should be integer.. from memory.. anyway, take a look at the sample submission.. and see how it is different.</p>",
      "rawMarkdown": "think your 'id' column is of class/type string, whereas both columns should be integer.. from memory.. anyway, take a look at the sample submission.. and see how it is different.",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 125769,
      "author_name": "cpmpml",
      "author_url": "",
      "post_date": "07/02/2016 11:19:15",
      "content": "<p>I suggest you look at the content of the file.  It is likely containing string delimiters such as ' or &quot;.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 125775,
      "author_name": "rashmibanthia",
      "author_url": "",
      "post_date": "07/02/2016 13:02:13",
      "content": "<p>Adding on to CPMP's answer above, </p>\n\n<p>To read lines 100000 to  100005, you can use the following command: </p>\n\n<p>sed -n '100000,100005p;100006q' sample_submission.csv</p>\n\n<p>[<a>http://stackoverflow.com/questions/191364/quick-unix-command-to-display-specific-lines-in-the-middle-of-a-file]</a></p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 126103,
      "author_name": "vanilla",
      "author_url": "",
      "post_date": "07/06/2016 07:47:19",
      "content": "<p>think your 'id' column is of class/type string, whereas both columns should be integer.. from memory.. anyway, take a look at the sample submission.. and see how it is different.</p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "125748": "EDIT: Solved, read below\r\n\r\nWhen submitting Kaggle gives the following error multiple times. ERROR: Expected 'id' column to be of type 'Int32', but was 'String' ERROR: Unable to convert 'id' column row 100001 value '1e+05' to expected type 'Int32'. \r\n\r\nspecifically every 100,000, the next is 200001\r\n\r\nI essentially understand the problem, that the values in id is being converted to scientific notation and can not be read. However scientific notation isn't how my data appears in R.  I have tried the following:\r\n\r\n\"write.csv\" on data.table\r\nChanging column classes in data.table (numeric and character)\r\nsaving as a data.frame, and using \"write.csv\"\r\nsetting \"options(scipen = 10)\" and running \"write.csv\" on data.table\r\nsetting \"options(scipen = 10)\" and saving as a data.frame, calling \"format(output2, scientific = FALSE) and then using \"write.csv\"\r\nsetting \"options(scipen = 500)\" and saving as a data.frame, calling \"format(output2, scientific = FALSE) and then using \"write.csv\"\r\nsetting \"options(scipen = 500)\" and saving as a data.frame, calling \"format(output2, scientific = FALSE) and then using \"write.table\"(sep=\",\")\r\n\r\nI'm not sure what else to try at this point. To my knowledge I'm giving a file in the exact format of the sample submission file. \r\n\r\nEDIT: setting \"options(scipen = 500)\" and saving as a data.frame, calling \"format(output2, scientific = FALSE), converting data.frame columns to numeric, and then using \"write.table\"(sep=\",\")  worked. \r\n\r\nFor some reason the columns were in a format called \"AsIs\" even though they had been correct in data table before the conversion to a data frame.",
    "125769": "I suggest you look at the content of the file.  It is likely containing string delimiters such as ' or \".",
    "125775": "Adding on to CPMP's answer above, \r\n\r\nTo read lines 100000 to  100005, you can use the following command: \r\n\r\nsed -n '100000,100005p;100006q' sample_submission.csv\r\n\r\n[http://stackoverflow.com/questions/191364/quick-unix-command-to-display-specific-lines-in-the-middle-of-a-file]",
    "126103": "think your 'id' column is of class/type string, whereas both columns should be integer.. from memory.. anyway, take a look at the sample submission.. and see how it is different."
  },
  "source": "meta"
}