COMPSCI C8 Lecture Notes - Lecture 11: Railways Act 1921
Document Summary
The apply method creates an array by calling a function on every element in one or more input columns: first argument: function to apply, other arguments: the input column(s) Apply called with only a function applies it to each row. The group method can also aggregate all rows that share the combination of values in multiple columns: first argument: a list of which columns to group by, second argument: (optional) how to combine values. Produces a grid of counts or aggregated values. Two required arguments: first: variable that forms column labels of grid, second: variable that forms row labels of grid.