table
Attributes
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
table.type
Members list
Type members
Classlikes
Enumeration of strategies for inferring column types when reading CSV files.
Enumeration of strategies for inferring column types when reading CSV files.
FirstRow
: Infers types by inspecting only the first row of data.FirstN
: Infers types by inspecting the firstn
rows. Optionally, prefersInt
overBoolean
if both are possible.FromAllRows
: Infers types by inspecting all rows in the CSV.StringType
: Disables type inference; all columns are read asString
.FromTuple[T]
: Uses a user-supplied tuple typeT
for decoding, allowing custom or manual type specification.
Attributes
- Supertypes
-
trait Enumtrait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
Exports
Defined exports
Default header option that reads headers from the first row.
Default header option that reads headers from the first row.
Equivalent to HeaderOptions.FromRows(merge = 1, dropFirst = 0)
.
Attributes
Reads a CSV file from an absolute path and returns a io.github.quafadas.scautable.CsvIterator.
Reads a CSV file from an absolute path and returns a io.github.quafadas.scautable.CsvIterator.
Example:
val csv: CsvIterator[("colA", "colB", "colC")] = CSV.absolutePath("/absolute/path/to/file.csv")
Attributes
Read Excel file from an absolute path with compile-time type inference
Read Excel file from an absolute path with compile-time type inference
Value parameters
- filePath
-
Absolute path to the Excel file
- range
-
Optional cell range (e.g., "A1:C10"), empty string reads entire sheet
- sheetName
-
Name of the Excel sheet to read
- typeInferrer
-
Type inference strategy (StringType or FromTuple supported)
Attributes
- Returns
-
ExcelIterator with inferred types
Decoder for Int that can handle Excel's numeric formatting Attempts to parse as Double first, then converts to Int if it's a whole number Falls back to regular Int parsing if Double parsing fails
Decoder for Int that can handle Excel's numeric formatting Attempts to parse as Double first, then converts to Int if it's a whole number Falls back to regular Int parsing if Double parsing fails
Attributes
Decoder for Long that can handle Excel's numeric formatting Attempts to parse as Double first, then converts to Long if it's a whole number Falls back to regular Long parsing if Double parsing fails
Decoder for Long that can handle Excel's numeric formatting Attempts to parse as Double first, then converts to Long if it's a whole number Falls back to regular Long parsing if Double parsing fails
Attributes
Reads a CSV from a String and returns a io.github.quafadas.scautable.CsvIterator.
Reads a CSV from a String and returns a io.github.quafadas.scautable.CsvIterator.
Example:
val csvContent = "colA,colB\n1,a\n2,b"
val csv: CsvIterator[("colA", "colB")] = CSV.fromString(csvContent)
Attributes
Reads a CSV present in the current compiler working directory resources and returns a io.github.quafadas.scautable.CsvIterator.
Reads a CSV present in the current compiler working directory resources and returns a io.github.quafadas.scautable.CsvIterator.
Note that in most cases, this is not the same as the current runtime working directory, and you are likely to get the bloop server directory.
Hopefully, useful in almond notebooks.
Example:
val csv: CsvIterator[("colA", "colB", "colC")] = CSV.pwd("file.csv")
Attributes
Reads a CSV present in java resources and returns a io.github.quafadas.scautable.CsvIterator.
Reads a CSV present in java resources and returns a io.github.quafadas.scautable.CsvIterator.
Example:
val csv: CsvIterator[("colA", "colB", "colC")] = CSV.resource("file.csv")
Attributes
Read Excel file from the classpath with compile-time type inference
Read Excel file from the classpath with compile-time type inference
Value parameters
- filePath
-
Path to the Excel file in the classpath
- range
-
Optional cell range (e.g., "A1:C10"), empty string reads entire sheet
- sheetName
-
Name of the Excel sheet to read
- typeInferrer
-
Type inference strategy (StringType or FromTuple supported)
Attributes
- Returns
-
ExcelIterator with inferred types
Saves a URL to a local CSV returns a io.github.quafadas.scautable.CsvIterator.
Saves a URL to a local CSV returns a io.github.quafadas.scautable.CsvIterator.
Example:
val csv: CsvIterator[("colA", "colB", "colC")] = CSV.url("https://somewhere.com/file.csv")