mindspore.dataset.Dataset.skip

Dataset.skip(count)[source]

Skip the first N elements of this dataset.

Parameters

count (int) – Number of elements in the dataset to be skipped.

Returns

Dataset, a new dataset with the above operation applied.

Examples

>>> import mindspore.dataset as ds
>>> dataset = ds.GeneratorDataset([i for i in range(10)], "column1")
>>> # Skip first 3 elements of dataset and retain 7 elements.
>>> dataset = dataset.skip(3)