getOrElse

inline fun CsvDataRow.getOrElse(column: CsvColumn, defaultValue: (CsvColumn) -> String): String

Returns the value from this row for the given column, or computes a default value if not present.

Return

the value at the column's index, or the result of defaultValue

Parameters

column

the column to retrieve the value for

defaultValue

function to compute a default value if the column is missing from the dataset