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, dataset that containing rows like origin rows subtract skipped rows.

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)