toDataFrames

fun <T, C> Convert<T, List<List<C>>>.toDataFrames(containsColumns: Boolean = false): DataFrame<T>

Converts a list of lists values in the columns previously selected with convert to DataFrame, preserving their original names and positions within the DataFrame.

By default, treats the first inner list as a header (column names), and the remaining lists as rows. If containsColumns is true, interprets each inner list as a column, where the first element is used as the column name, and the remaining elements as values.

For more information: See convert on the documentation website.

Examples:

df.convert { userData }.toDataFrames()
df.convert { colsOf<List<List<*>>>() }.toDataFrames(containsColumns = true)

Return

A new DataFrame with the values converted to DataFrame.

Parameters

containsColumns

If true, treats each nested list as a column with its first element as the column name. Otherwise, the first list is treated as the header. Defaults to false.


fun <T> DataColumn<List<List<T>>>.toDataFrames(containsColumns: Boolean = false): DataColumn<DataFrame<*>>

Converts a list of lists values in this DataColumn to DataFrame.

By default, treats the first inner list as a header (column names), and the remaining lists as rows. If containsColumns is true, interprets each inner list as a column, where the first element is used as the column name, and the remaining elements as values.

For more information: See convert on the documentation website.

Return

A new DataColumn with the values converted to DataFrame.

Parameters

containsColumns

If true, treats each nested list as a column with its first element as the column name. Otherwise, the first list is treated as the header. Defaults to false.