Skip to content

Wolfram Language (aka Mathematica) paclet for data reshaping functions, like, long- and wide form, cross tabulation, etc.

License

Notifications You must be signed in to change notification settings

antononcube/WL-DataReshapers-paclet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DataReshapers WL paclet

Wolfram Language (aka Mathematica) paclet for data reshaping functions, like, long- and wide form, cross tabulation, etc.


Usage examples

Here we get the Titanic dataset:

dsTitanic = ResourceFunction["ExampleDataset"][{"MachineLearning", "Titanic"}];
dsTitanic[1 ;; -1 ;; 400]

Here is a summary of the dataset:

RecordsSummary[dsTitanic]

Here is computed the contingency table for passenger survival vs class:

CrossTabulate[dsTitanic[All, {"passenger survival", "passenger class"}]]

Here the Titanic dataset is converted into long form:

LongFormDataset[dsTitanic]

Here is computed the contingency tensor for passenger survival vs class vs sex:

cols = {"passenger survival", "passenger class", "passenger sex"};
MatrixForm@
CrossTensorate[Count == Evaluate[(Plus @@ cols)], dsTitanic[All, cols]]

Here is a grid table form of a full integer array with "custom" column names:

SeedRandom[23];
GridTableForm[RandomInteger[100, {5, 7}], TableHeadings -> RandomWord[7]]

References

Articles

[AA1] Anton Antonov, "Contingency tables creation examples", (2016), MathematicaForPrediction at WordPress.

[Wk1] Wikipedia entry, Contingency table.

[Wk2] Wikipedia entry, Wide and narrow data.

Functions, repositories

[AAf1] Anton Antonov, CrossTabulate, (2019), Wolfram Function Repository.

[AAf2] Anton Antonov, LongFormDataset, (2020), Wolfram Function Repository.

[AAf3] Anton Antonov, WideFormDataset, (2021), Wolfram Function Repository.

[AAf4] Anton Antonov, RecordsSummary, (2019), Wolfram Function Repository.

Videos

[AAv1] Anton Antonov, "Multi-language Data-Wrangling Conversational Agent", (2020), YouTube channel of Wolfram Research, Inc.. (Wolfram Technology Conference 2020 presentation.)

[AAv2] Anton Antonov, "Data Transformation Workflows with Anton Antonov, Session #1", (2020), YouTube channel of Wolfram Research, Inc..

[AAv3] Anton Antonov, "Data Transformation Workflows with Anton Antonov, Session #2", (2020), YouTube channel of Wolfram Research, Inc..

Releases

No releases published

Packages

No packages published