toDataColumn
protected fun <D, P> List<D>.toDataColumn(name: String, targetColumnSchema: ColumnSchema?, inferNullability: Boolean): DataColumn<P>
Helper function to convert this list of values to a DataColumn<P>.
NOTE: While this function can handle targetColumnSchema= ColumnSchema.Group, and this being a List<DataRow<*>>, this should generally be avoided to circumvent creating n data rows, (which essentially are n single-row dataframes).
Instead, use preprocessValue to convert to Map<String, Any?> and then use the more efficient Iterable in buildDataColumn:
(values as List<Map<String, Any?>>)
.toDataFrame()
.asColumnGroup(name)
.asDataColumn()Content copied to clipboard