 Transpose - Maple Help

DataFrame/Transpose

transpose a DataFrame Calling Sequence Transpose( df ) df ^ + df ^ %T Parameters

 df - : DataFrame : the DataFrame to be transposed Description

 • The Transpose command creates a DataFrame that is the transpose of the input DataFrame df.  That is, the rows of the output DataFrame are the columns of df, and the columns of the output DataFrame are the rows of df.
 • $\mathrm{Transpose}\left(\mathrm{df}\right)$ can also be entered as ${\mathrm{df}}^{+}$ or as ${\mathrm{df}}^{\mathrm{%T}}$. Examples

 > $\mathrm{df}≔\mathrm{DataFrame}\left(⟨⟨⟨1|2|3⟩,⟨4|5|6⟩⟩⟩,'\mathrm{rows}'=\left['a','b'\right],'\mathrm{columns}'=\left['A','B','C'\right]\right)$
 ${\mathrm{df}}{≔}\left[\begin{array}{cccc}{}& {A}& {B}& {C}\\ {a}& {1}& {2}& {3}\\ {b}& {4}& {5}& {6}\end{array}\right]$ (1)
 > $\mathrm{df2}≔:-\mathrm{Transpose}\left(\mathrm{df}\right)$
 ${\mathrm{df2}}{≔}\left[\begin{array}{ccc}{}& {a}& {b}\\ {A}& {1}& {4}\\ {B}& {2}& {5}\\ {C}& {3}& {6}\end{array}\right]$ (2)
 > $\mathrm{df}\left['b','A'\right]$
 ${4}$ (3)
 > $\mathrm{df2}\left['A','b'\right]$
 ${4}$ (4)

Transpose also has two alternative calling sequences:

 > ${\mathrm{df}}^{\mathrm{%T}}$
 $\left[\begin{array}{ccc}{}& {a}& {b}\\ {A}& {1}& {4}\\ {B}& {2}& {5}\\ {C}& {3}& {6}\end{array}\right]$ (5)
 > ${\mathrm{df}}^{\mathrm{%T}}$
 $\left[\begin{array}{ccc}{}& {a}& {b}\\ {A}& {1}& {4}\\ {B}& {2}& {5}\\ {C}& {3}& {6}\end{array}\right]$ (6) Compatibility

 • The DataFrame/Transpose command was introduced in Maple 2016.