mindspore.dataset.Dataset.concat

Dataset.concat(datasets)[source]

Concatenate the dataset objects in the input list. Performing “+” operation on dataset objects can achieve the same effect.

Note

The column name, and rank and type of the column data must be the same in the input datasets.

Parameters

datasets (Union[list, Dataset]) – A list of datasets or a single class Dataset to be concatenated together with this dataset.

Returns

Dataset, dataset concatenated.

Examples

>>> # Create a dataset by concatenating dataset_1 and dataset_2 with "+" operator
>>> dataset = dataset_1 + dataset_2
>>> # Create a dataset by concatenating dataset_1 and dataset_2 with concat operation
>>> dataset = dataset_1.concat(dataset_2)