transpose

Converts this DataRow into a DataFrame with one row per column of the original row.

The result is a DataFrame of NameValuePair with two columns:

  • name — the original column names, as String;

  • value — the cell values of this row, kept as they are.

For more information: See Row Functions on the documentation website.

See also transposeTo, which converts every value to a given type, and namedValues, which gives the same name-value pairs as a List.

Example

// Read one wide row vertically: one line per column
df.first().transpose()

Return

A DataFrame of NameValuePair with name and value columns, containing one row for each column of this DataRow.