mindspore.dataset.Dataset.get_col_names
- Dataset.get_col_names()[source]
Return the names of the columns in dataset.
- Returns
list, list of column names in the dataset.
Examples
>>> import mindspore.dataset as ds >>> dataset = ds.GeneratorDataset([i for i in range(10)], "column1") >>> col_names = dataset.get_col_names() >>> print(col_names) ['column1']