Csv encapsulates a tabular data structure, as found in a CSV file or spreadsheet.
Csv encapsulates a tabular data structure, as found in a CSV file or spreadsheet. It allows client code to:
This class may be useful for:
Csv is designed to be lazy. The datasource is traversed ONCE, when accessed via the Csv.iterator method. All other operations are declarative (restructuring, data transformations, validations, etc). Thus, the time cost of traversing the data and applying these functions is only paid once, when the client code materialises the Csv.
TODO - CAS - 07/08/2014 - A Y-shaped pipeline (spits out two CSVs) TODO - CAS - 07/08/2014 - Aggregator 1 - merge columns using a Row => Row (e.g. (firstName, surname) -> s"$firstName $surname") TODO - CAS - 07/08/2014 - Aggregator 2 - merge rows - provide a predicate for row grouping/inclusion/exclusion
Simple parser with common defaults:
Simple parser with common defaults:
A way of providing data to an instance of the Csv class.
A way of providing data to an instance of the Csv class. Most needs should be met by BufferedDataSource, which has a number of implicit adapters declared in the planet7 package.
Used in sort(input, "Age" -> by(_.toInt))
Converts Seq("foo" -> "foo", "bar" -> "bar") to Seq("foo", "bar"), to make building header rows easier
Converts Seq("foo", "bar") to Seq("foo" -> "foo", "bar" -> "bar") to make operations on column names easier
Converts Csv(data).columnStructure("Name") to Csv(data).columnStructure("Name" -> "Name")
Converts sort(input, "Surname") into sort(input, "Surname" -> Comparator[String])
Used in Cvs.assertAndAbort() and Csv.assertAndReport().
Used in Cvs.assertAndAbort() and Csv.assertAndReport(). Converts , to build simple validation checks