Skip to main content

Transpose

Transpose the DataFrame (swap columns to rows).

Transpose a dataframe.

Parameters​

NameDescriptionAccepted ValuesDefaultRequired
I/O
header_columnName 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, null0No
Conditions
ifCondition that determines whether the wrangle runs as a whole. Recipe variables may be referenced with ${variable}.string—No
whereFilter rows before applying the wrangle using SQL-like criteria, such as column1 = 123 OR column2 = 'abc'.string—No
where_paramsValues 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
MaterialProduct Data
CeramicSKF ball brg
Rubberbrg seal
MaterialCeramicRubber
Product DataSKF ball brgbrg seal
Access
RequirementValue
AI-poweredNo
Requires WrangleWorks accountNo
Requires subscriptionNo
Requires external API keyNo
Technical details
FieldValue
Catalog ID97
Catalog keytranspose
Recipe keytranspose
Catalog statusactive
Lifecycle statusactive
Recipe Writer eligibleYes
NamespaceRoot-level
Documentation grouptransform
AliasesNone
Runtime symbolwrangles.recipe_wrangles.pandas.transpose
Legacy UUID8716347f-f286-49b2-8a0b-cb73292e7475

Sources