def copy(self, keep_fields=None):
        """
        :param keep_fields: if specified, then only the given fields will be kept
        :return: A deep copy of the dataset (each instance is copied).
        """
        keep_fields = self.fields.keys() or keep_fields
        return self.__class__(OrderedDict([(name, data[:]) for name, data in self.fields.items() if name in keep_fields]))