toDataFrame

internal fun <T, C> Split<T, C>.toDataFrame(): DataFrame<T>
inline fun <reified T> Iterable<T>.toDataFrame(): DataFrame<T>
inline fun <reified T> Iterable<T>.toDataFrame(noinline body: CreateDataFrameDsl<T>.() -> Unit): DataFrame<T>
inline fun <reified T> Iterable<T>.toDataFrame(vararg props: KProperty<*>, maxDepth: Int = 0): DataFrame<T>
@JvmName(name = "toDataFrameT")
fun <T> Iterable<DataRow<T>>.toDataFrame(): DataFrame<T>
@JvmName(name = "toDataFrameMapStringAnyNullable")
fun Iterable<Map<String, Any?>>.toDataFrame(): DataFrame<*>
@JvmName(name = "toDataFrameAnyColumn")
fun Iterable<BaseColumn<*>>.toDataFrame(): DataFrame<*>
inline fun <reified T> Iterable<T>.toDataFrame(columnName: String): DataFrame<*>
@JvmName(name = "toDataFrameColumnPathAnyNullable")
fun Map<ColumnPath, Iterable<Any?>>.toDataFrame(): DataFrame<*>


fun <T> List<List<T>>.toDataFrame(header: List<String>?, containsColumns: Boolean = false): DataFrame<*>

Converts a list of lists into a DataFrame.

By default, treats lists as row values. If header is not provided, the first inner list becomes a header (column names), and the remaining lists are treated as data.

With containsColumns = true, interprets each inner list as a column. If header is not provided, the first element will be used as the column name, and the remaining elements as values.

For more information: See DataFrame from List> on the documentation website.

Return

A DataFrame containing the data from the nested list structure. Returns an empty DataFrame if the input is empty or invalid.

Parameters

containsColumns

If true, treats each nested list as a column. Otherwise, each nested list is a row. Defaults to false.

header

overrides extraction of column names from lists - all values are treated as data instead.

Type Parameters

T

The type of elements contained in the nested lists.