Transpose
Transpose the DataFrame (swap columns to rows).
Transpose a dataframe.
Parameters
| Name | Description | Accepted Values | Default | Required |
|---|---|---|---|---|
| I/O | ||||
header_column | Name or position of the column that will be used as the column headings for the transposed DataFrame. Default 0 (first column). Use header_column = null to not use any column as header. | string, integer, null | 0 | No |
| Conditions | ||||
if | Condition that determines whether the wrangle runs as a whole. Recipe variables may be referenced with ${variable}. | string | — | No |
where | Filter rows before applying the wrangle using SQL-like criteria, such as column1 = 123 OR column2 = 'abc'. | string | — | No |
where_params | Values used with where for parameterized criteria. Uses SQLite placeholder syntax such as ? or :name. | array, object | — | No |
Examples
note
Transpose is not compatible with where filtering.
wrangles:
- transpose:
header_column: Material
| Material | Product Data |
|---|---|
| Ceramic | SKF ball brg |
| Rubber | brg seal |
| Material | Ceramic | Rubber |
|---|---|---|
| Product Data | SKF ball brg | brg seal |
Access
| Requirement | Value |
|---|---|
| AI-powered | No |
| Requires WrangleWorks account | No |
| Requires subscription | No |
| Requires external API key | No |
Technical details
| Field | Value |
|---|---|
| Catalog ID | 97 |
| Catalog key | transpose |
| Recipe key | transpose |
| Catalog status | active |
| Lifecycle status | active |
| Recipe Writer eligible | Yes |
| Namespace | Root-level |
| Documentation group | transform |
| Aliases | None |
| Runtime symbol | wrangles.recipe_wrangles.pandas.transpose |
| Legacy UUID | 8716347f-f286-49b2-8a0b-cb73292e7475 |
Sources