Dataset.drop(labels, dim=None, *, errors='raise')

Drop variables or index labels from this dataset.

labelsscalar or list of scalars

Name(s) of variables or index labels to drop.

dimNone or str, optional

Dimension along which to drop index labels. By default (if dim is None), drops variables rather than index labels.

errors: {‘raise’, ‘ignore’}, optional

If ‘raise’ (default), raises a ValueError error if any of the variable or index labels passed are not in the dataset. If ‘ignore’, any given labels that are in the dataset are dropped and no error is raised.