Parsing Tab Separated Value (TSV) file using Univocity

Unlike CSV files, Tab Separated Value (TSV) files contain data that is separated by tab delimiters. This recipe shows you how to retrieve data points from TSV files.

Getting ready

In order to perform this recipe, we will require the following:

  1. Download the Univocity JAR file from http://oss.sonatype.org/content/repositories/releases/com/univocity/univocity-parsers/2.2.1/univocity-parsers-2.2.1.jar. Include the JAR file in your project in Eclipse an external library.
  2. Create a TSV file from the following data using Notepad. The extension of the file should be .tsv. You save the file as C:/testTSV.tsv:
Year Make Model Description Price 1997 Ford E350 ac, abs, moon 3000.00 1999 Chevy Venture "Extended ...

Get Java Data Science Cookbook now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.