Implemented of Dataset.apply method

Fixes #140