head method

Datacat head([
  1. int n = 5
])

Returns a new Datacat containing the first n rows.

Implementation

Datacat head([int n = 5]) {
  return Datacat(columns: List.from(columns), rows: rows.take(n).toList());
}