TabularFile

abstract class TabularFile(columns: Map<String, DataType>, val path: Path)

An abstraction for holding tabular data in a single file. That is, a list of columns with specified data types and rows containing the values of every column stored within rows within a file. The order of the columns is important. (first column, second column, etc.). The order of the rows is relevant (first row, second row, etc.).

There are only two types: numeric and text. The numeric type should be used for numeric data (float, double, long, int, etc.). In addition, use the numeric type for boolean values, which are stored 1.0 = true, 0.0 = false). The text type should be used for strings and date/time data. Date/time data is saved as ISO8601 strings ("YYYY-MM-DD HH:MM:SS.SSS"). If you need more type complexity, you should use a database.

Inheritors

Constructors

Link copied to clipboard
constructor(columns: Map<String, DataType>, path: Path)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val path: Path
Link copied to clipboard

Functions

Link copied to clipboard

Transforms the file into an SQLite database file

Link copied to clipboard
abstract fun asDataFrame(): AnyFrame

Converts the columns and rows to a Dataframe.

Link copied to clipboard
fun checkTypes(elements: Array<Any?>): Boolean
Link copied to clipboard
fun columnIndex(name: String): Int
Link copied to clipboard
fun columnIndexForNumeric(storageIndex: Int): Int

Returns the column index associated with the storage index

Link copied to clipboard
fun columnIndexForText(storageIndex: Int): Int

Returns the column index associated with the storage index

Link copied to clipboard
fun columnName(colNum: Int): String
Link copied to clipboard
fun dataType(colNum: Int): DataType
Link copied to clipboard
fun isNumeric(colNum: Int): Boolean
Link copied to clipboard
fun isText(colNum: Int): Boolean
Link copied to clipboard

Returns the storage index of the numeric column at column index

Link copied to clipboard
fun textStorageIndex(colNum: Int): Int

Returns the storage index of the text column at column index

Link copied to clipboard
open override fun toString(): String