Grouping data
Danfo.js only provides the ability to group data by means of values in a specific column. For the current version of Danfo.js, the specified number of columns for grouping can only be one or two.
In this section, we will show how to group by single and double columns.
Single-column grouping
First, let's start by creating a DataFrame and then group it by a single column:
let data = { 'A': [ 'foo', 'bar', 'foo', 'bar', 'foo', 'bar', 'foo', 'foo' ], 'C': [ 1, 3, 2, 4, 5, 2, 6, 7 ], 'D': [ 3, 2, 4, 1, 5, 6, 7, 8 ] }; let df = new dfd.DataFrame...