Attributes
Members list
Value members
Concrete methods
Method to construct one of the standard table types, given an Iterable of T and an optional header.
Method to construct one of the standard table types, given an Iterable of T and an optional header.
Type parameters
- X
-
the underlying type of xs.
Value parameters
- maybeHeader
-
an optional Header.
- xs
-
an Iterable of X.
Attributes
- Returns
-
a Table[X] which is either a HeadedTable or an UnheadedTable, as appropriate.
Primary method to parse a table from an Iterator of String. This method is, in turn, invoked by all other parse methods defined below (other than parseSequence).
Primary method to parse a table from an Iterator of String. This method is, in turn, invoked by all other parse methods defined below (other than parseSequence).
Type parameters
- T
-
the type of the resulting table.
Value parameters
- ws
-
the Strings.
Attributes
- Returns
-
an Try[T]
Method to parse a table from an Iterable of String.
Method to parse a table from an Iterable of String.
Type parameters
- T
-
the type of the resulting table.
Value parameters
- ws
-
the Strings.
Attributes
- Returns
-
an Try[T]
Method to parse a table from a Source (with proper resource management of the source).
Method to parse a table from a Source (with proper resource management of the source).
Type parameters
- T
-
the type of the resulting table.
Value parameters
- sy
-
the Source.
Attributes
- Returns
-
an Try[T]
Method to parse a table from a URI with an implicit encoding. If the URI has a fragment identifier which selects rows (RFC 7111, e.g. "data.csv#row=5-7": see CsvFragment), only those rows are in the table (its header lines are rows 1, etc.). Up to 2.0.3, a URI with a fragment could not be parsed at all.
Method to parse a table from a URI with an implicit encoding. If the URI has a fragment identifier which selects rows (RFC 7111, e.g. "data.csv#row=5-7": see CsvFragment), only those rows are in the table (its header lines are rows 1, etc.). Up to 2.0.3, a URI with a fragment could not be parsed at all.
Type parameters
- T
-
the type of the resulting table.
Value parameters
- codec
-
(implicit) the encoding.
- u
-
the URI.
Attributes
- Returns
-
an Try[T]
Method to parse a table from a URI with an explicit encoding.
Method to parse a table from a URI with an explicit encoding.
Type parameters
- T
-
the type of the resulting table.
Value parameters
- enc
-
the encoding.
- u
-
the URI.
Attributes
- Returns
-
an Try[T]
Parses a file at the given path into an instance of type T using the provided implicit TableParser.
Parses a file at the given path into an instance of type T using the provided implicit TableParser.
Type parameters
- T
-
The type to which the file content will be parsed.
Value parameters
- codec
-
The character codec to be used for reading the file. It is provided implicitly.
- path
-
The path to the file that needs to be parsed.
Attributes
- Returns
-
A Try containing the parsed instance of type T if successful, or a Failure if an error occurs.
Parses a file located at the specified path using the provided encoding and a typeclass instance for parsing the file content into the desired type.
Parses a file located at the specified path using the provided encoding and a typeclass instance for parsing the file content into the desired type.
Type parameters
- T
-
The type to which the file content will be parsed, requiring an implicit TableParser instance.
Value parameters
- enc
-
The encoding used to read the file.
- path
-
The path to the file that needs to be parsed.
Attributes
- Returns
-
A Try containing the parsed result of type T if successful, or a failure if an error occurs during parsing.
Method to parse a table from a File as a table of Seq[String].
Method to parse a table from a File as a table of Seq[String].
Value parameters
- codec
-
(implicit) the encoding.
- pathname
-
the path name.
Attributes
- Returns
-
an Try of Table[RawRow] where RawRow is a Seq[String].
Method to parse a table from an InputStream with an implicit encoding.
Method to parse a table from an InputStream with an implicit encoding.
Type parameters
- T
-
the type of the resulting table.
Value parameters
- codec
-
(implicit) the encoding.
- i
-
the InputStream (call-by-name).
Attributes
- Returns
-
an Try[T]
Method to parse a table from an InputStream with an explicit encoding.
Method to parse a table from an InputStream with an explicit encoding.
Type parameters
- T
-
the type of the resulting table.
Value parameters
- enc
-
the encoding.
- si
-
the InputStream, wrapped in Try.
Attributes
- Returns
-
an Try[T]
Parses a file at the given path into a Table[RawRow] using the specified conditions and options.
Parses a file at the given path into a Table[RawRow] using the specified conditions and options.
Value parameters
- codec
-
the character encoding to be used for reading the file
- forgiving
-
a flag indicating whether parsing should continue with warnings or fail on errors
- maybeFixedHeader
-
an optional header to be used instead of inferring it from the file
- path
-
the file path to be parsed
- predicate
-
a filtering function applied to each
RawRowwrapped in aTry, determining whether the row is included
Attributes
- Returns
-
a
Trycontaining the parsedTable[RawRow]on success or an exception on failure
Method to parse a table of raw rows from an Iterable of String.
Method to parse a table of raw rows from an Iterable of String.
Value parameters
- ws
-
the Strings.
Attributes
- Returns
-
an Try of Table of RawRow
Method to parse a table from a resource.
Method to parse a table from a resource.
Type parameters
- T
-
the type of the resulting table.
Value parameters
- clazz
-
the class for which the resource should be sought (should default to the calling class but doesn't).
- codec
-
(implicit) the encoding.
- w
-
the resource name.
Attributes
- Returns
-
an Try[T]
Method to parse a table from a URL.
Method to parse a table from a URL.
Type parameters
- T
-
the type of the resulting table.
Value parameters
- u
-
the URI.
Attributes
- Returns
-
an Try[T]
Method to parse a table from a URL with an explicit encoding.
Method to parse a table from a URL with an explicit encoding.
NOTE: the logic here is different from that of parseResource(u:=>URL)(using codec: Codec) above.
Type parameters
- T
-
the type of the resulting table.
Value parameters
- enc
-
the encoding.
- u
-
the URL.
Attributes
- Returns
-
an Try[T]
Method to parse a table from a resource as a table of Seq[String].
Method to parse a table from a resource as a table of Seq[String].
Value parameters
- clazz
-
the class for which the resource should be sought (defaults to the calling class).
- codec
-
(implicit) the encoding.
- forgiving
-
forcing (defaults to true). If true (the default) then an individual malformed row will not prevent subsequent rows being parsed.
- maybeFixedHeader
-
an optional fixed header. If None (the default), we expect to find the header defined in the first line of the file.
- s
-
the resource name.
Attributes
- Returns
-
an Try of Table[RawRow] where RawRow is a Seq[String].
Method to parse a table from a Seq of Seq of String.
Method to parse a table from a Seq of Seq of String.
Type parameters
- T
-
the type of the resulting table.
Value parameters
- wss
-
the Sequence of Strings.
Attributes
- Returns
-
an Try[T]
Method to parse a table from a Source.
Method to parse a table from a Source.
NOTE: the caller is responsible for closing the given Source.
Type parameters
- T
-
the type of the resulting table.
Value parameters
- x
-
the Source.
Attributes
- Returns
-
an Try[T]
Method to open a source defined by a Class and a resource name.
Method to open a source defined by a Class and a resource name.
Value parameters
- clazz
-
the class.
- w
-
the resource name.
Attributes
- Returns
-
an Try[Source].
Method to open source defined by a File.
Method to open source defined by a File.
Value parameters
- filename
-
a File.
Attributes
- Returns
-
an Try[Source].
Method to render the given Table[Row] as a CSV String with header.
Method to render the given Table[Row] as a CSV String with header.
Value parameters
- csvAttributes
-
implicit value of CsvAttributes.
- t
-
the Table[Row] to be rendered.
Attributes
- Returns
-
an Iterable[String]
Method to render the given Table[Row] as a CSV String with header.
Method to render the given Table[Row] as a CSV String with header.
Value parameters
- csvAttributes
-
implicit value of CsvAttributes.
- file
-
the destination File for the rendering of t.
- t
-
the Table[Row] to be rendered.
Attributes
- Returns
-
an Iterable[String]