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.
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 15, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.9212085604667664, "perplexity": 4421.470977631209}, "config": {"markdown_headings": false, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2022-49/segments/1669446708046.99/warc/CC-MAIN-20221126180719-20221126210719-00175.warc.gz"}