{
  "id": 6613,
  "title": "anybody able to read the Train.csv file with open source java lib?",
  "url": "/competitions/facebook-recruiting-iii-keyword-extraction/discussion/6613",
  "author_name": "",
  "post_date": "2013-12-17T09:52:31.547Z",
  "votes": null,
  "comment_count": 5,
  "views": 3578,
  "content": "<p>opencsv doesnot work..</p>",
  "messages": [
    {
      "id": "36245",
      "postDate": "12/17/2013 09:52:31",
      "content": "<p>opencsv doesnot work..</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "36252",
      "postDate": "12/17/2013 13:58:16",
      "content": "<p>I read all the files and build all models in pure Java. Without any libraries. java.io.BufferedReader works just fine with Train.csv</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "36427",
      "postDate": "12/20/2013 21:18:16",
      "content": "<p>you probably ran into the same problem I had. opencsv will escape everything with &quot;\\&quot;.&nbsp;</p>\n<p>Took me a while to figure that out:</p>\n<p><code> InputStreamReader decoder = new InputStreamReader(fileStream, &quot;UTF-8&quot;);<br></code><code>reader = new CSVReader(decoder,',','\\&quot;','\\0'); // no escape characters!<br></code></p>\n<p>http://sourceforge.net/p/opencsv/support-requests/5/</p>\n<p>&nbsp;</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "36458",
      "postDate": "12/21/2013 10:31:48",
      "content": "<p>I also got into same problem on around 41st question on openCSV.</p>\n<p>Then i switched to SuperCSV and guess what it worked.</p>\n<p>this was easy if you would have abstracted class.</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "78774",
      "postDate": "05/17/2015 15:03:07",
      "content": "<p>I tried the <a href=\"http://sourceforge.net/projects/javacsv\">JavaCSV</a>, but then switched to the open source library&nbsp;<a href=\"http://www.univocity.com/pages/parsers-tutorial\">uniVocity-parsers</a>&nbsp;because of performance issue and flexibilty. You could also develop with uniVocity-parsers just in few lines of code:</p>\n<p>CsvParser parser = new CsvParser(new CsvParserSettings());<br> List&lt;String[]&gt; parsedData = parser.parseAll(new FileReader(&quot;/examples/example.csv&quot;));</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "78775",
      "postDate": "05/17/2015 15:03:18",
      "content": "<p>I tried the <a href=\"http://sourceforge.net/projects/javacsv\">JavaCSV</a>, but then switched to the open source library&nbsp;<a href=\"http://www.univocity.com/pages/parsers-tutorial\">uniVocity-parsers</a>&nbsp;because of performance issue and flexibilty. You could also develop with uniVocity-parsers just in few lines of code:</p>\n<p>CsvParser parser = new CsvParser(new CsvParserSettings());<br> List&lt;String[]&gt; parsedData = parser.parseAll(new FileReader(&quot;/examples/example.csv&quot;));</p>",
      "rawMarkdown": "",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 36252,
      "author_name": "edunov",
      "author_url": "",
      "post_date": "12/17/2013 13:58:16",
      "content": "<p>I read all the files and build all models in pure Java. Without any libraries. java.io.BufferedReader works just fine with Train.csv</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 36427,
      "author_name": "fschilder",
      "author_url": "",
      "post_date": "12/20/2013 21:18:16",
      "content": "<p>you probably ran into the same problem I had. opencsv will escape everything with &quot;\\&quot;.&nbsp;</p>\n<p>Took me a while to figure that out:</p>\n<p><code> InputStreamReader decoder = new InputStreamReader(fileStream, &quot;UTF-8&quot;);<br></code><code>reader = new CSVReader(decoder,',','\\&quot;','\\0'); // no escape characters!<br></code></p>\n<p>http://sourceforge.net/p/opencsv/support-requests/5/</p>\n<p>&nbsp;</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 36458,
      "author_name": "nikhilbhatt",
      "author_url": "",
      "post_date": "12/21/2013 10:31:48",
      "content": "<p>I also got into same problem on around 41st question on openCSV.</p>\n<p>Then i switched to SuperCSV and guess what it worked.</p>\n<p>this was easy if you would have abstracted class.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 78774,
      "author_name": "user353764",
      "author_url": "",
      "post_date": "05/17/2015 15:03:07",
      "content": "<p>I tried the <a href=\"http://sourceforge.net/projects/javacsv\">JavaCSV</a>, but then switched to the open source library&nbsp;<a href=\"http://www.univocity.com/pages/parsers-tutorial\">uniVocity-parsers</a>&nbsp;because of performance issue and flexibilty. You could also develop with uniVocity-parsers just in few lines of code:</p>\n<p>CsvParser parser = new CsvParser(new CsvParserSettings());<br> List&lt;String[]&gt; parsedData = parser.parseAll(new FileReader(&quot;/examples/example.csv&quot;));</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 78775,
      "author_name": "user353764",
      "author_url": "",
      "post_date": "05/17/2015 15:03:18",
      "content": "<p>I tried the <a href=\"http://sourceforge.net/projects/javacsv\">JavaCSV</a>, but then switched to the open source library&nbsp;<a href=\"http://www.univocity.com/pages/parsers-tutorial\">uniVocity-parsers</a>&nbsp;because of performance issue and flexibilty. You could also develop with uniVocity-parsers just in few lines of code:</p>\n<p>CsvParser parser = new CsvParser(new CsvParserSettings());<br> List&lt;String[]&gt; parsedData = parser.parseAll(new FileReader(&quot;/examples/example.csv&quot;));</p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "36245": "",
    "36252": "",
    "36427": "",
    "36458": "",
    "78774": "",
    "78775": ""
  },
  "source": "meta"
}