Adds dataset truncation method

Fixes #257