def reduce_to_dims(self, dims):
    '\n        remove all data for dimensions not in ``dims``\n        Args:\n            dims: list of dimensions to keep\n\n        '
    index = [i for (i, d) in enumerate(dims) if self.contains_dim(d)]
    for key1 in self._data:
        if isinstance(self._data[key1], list):
            self._data[key1] = [self[key1][i] for i in index]
    return self
remove all data for dimensions not in ``dims``
Args:
    dims: list of dimensions to keep
def reduce_to_dims(self, dims):
    '\n        remove all data for dimensions not in ``dims``\n        Args:\n            dims: list of dimensions to keep\n\n        '
    index = [i for (i, d) in enumerate(dims) if self.contains_dim(d)]
    for key1 in self._data:
        if isinstance(self._data[key1], list):
            self._data[key1] = [self[key1][i] for i in index]
    return self