TabularDataBase(path, *[, target, dtype, ctx])

Read and compose a tabular dataset.

TabularDataExporter(extractor, save_dir, *)

Export a tabular dataset.


Import a tabular dataset.

class datumaro.plugins.data_formats.tabular.TabularDataBase(path: str, *, target: Optional[Union[str, List[str]]] = None, dtype: Optional[Dict[str, Type[TableDtype]]] = None, ctx: Optional[ImportContext] = None)[source]#

Bases: DatasetBase

Read and compose a tabular dataset. The file name of each ‘.csv’ file is regarded as subset.

  • path (str) – Path to a tabular dataset. (csv file or folder contains csv files).

  • target (optional, str or list(str)) – Target column or list of target columns. If this is not specified (None), the last column is regarded as a target column. In case of a dataset with no targets, give an empty list as a parameter.

  • dtype (optional, dict(str,str)) – Dictionay of column name -> type str (‘str’, ‘int’, or ‘float’). This can be used when automatic type inferencing is failed.

NAME = 'tabular'#

Returns metainfo about dataset labels.

class datumaro.plugins.data_formats.tabular.TabularDataImporter[source]#

Bases: Importer

Import a tabular dataset. Each ‘.csv’ file is regarded as a subset.

NAME = 'tabular'#
classmethod build_cmdline_parser(**kwargs)[source]#
classmethod find_sources(path)[source]#
class datumaro.plugins.data_formats.tabular.TabularDataExporter(extractor: IDataset, save_dir: str, *, save_media: Optional[bool] = None, image_ext: Optional[str] = None, default_image_ext: Optional[str] = None, save_dataset_meta: bool = False, save_hashkey_meta: bool = False, stream: bool = False, ctx: Optional[ExportContext] = None)[source]#

Bases: Exporter

Export a tabular dataset. This will save each subset into a ‘.csv’ file regardless of ‘save_media’ value

NAME = 'tabular'#
EXPORT_EXT = '.csv'#