I have this dataframe with a single row, with values that are string
, int
, bool
, array
:
col1 | col2 | col3 | col4 | col5 |
---|---|---|---|---|
val1 | val2 | val3 | val4 | val5 |
And I want to transpose it like this:
col1 | col2 | Columns | values |
---|---|---|---|
val1 | val2 | col3 | val3 |
val1 | val2 | col4 | val4 |
val1 | val2 | col5 | val5 |
The first 2 columns are to be AS IS, and the remaining columns need to be unpivoted.