For a head-like function you can just slice the array using dataset[:10].
For a tail-like function you can just slice the array using dataset[-10:].
For a head-like function you can just slice the array using dataset[:10].
For a tail-like function you can just slice the array using dataset[-10:].