Skip to content

datasets (Tablesaw)

Ax Kr edited this page Feb 11, 2020 · 5 revisions


The Dataset type is implemented with the tablesaw dataframe library

Dataset objects can be created with SemanticImport and SemanticImportString functions.

>> ds=SemanticImportString("Products,Sales,Market_Share

Select a single column:

>> ds(All, "Market_Share")

Select a single element:

>> ds(3, 2)

Select a row and return the result as an association

>> ds(2) // Normal 

Dataset rows can be selected.

>> ds(Select(#Sales < 13000 &), {"Products", "Market_Share"})

With the `Normal' function the Dataset can be converted into a Symja expression.

>> ds(All, "Sales") // Normal

Compute number of times an element is available in the column

>> ds(Counts, "Sales")

Compute the sum of a column

>> ds(Total, "Sales")

Join the strings of a column

>> ds(StringJoin, "Products")
		check("ds(StringJoin, \"Products\")", //
You can’t perform that action at this time.