Danger

You are looking at the documentation for an older version of the SDV! We are no longer supporting or maintaining this version of the software

Click here to go to the new docs pages.

sdv.demo.load_tabular_demo

sdv.demo.load_tabular_demo(dataset_name='demo_single_table', table_name=None, data_path='/home/runner/work/SDV/SDV/sdv/data', metadata=False)[source]

Load a tabular demo.

If a dataset name is given, it is downloaded from the sdv-datasets S3 bucket. Otherwise, a toy dataset with a single table that contains data from a short fake collection of employees.

If metadata is True, the output will be a tuple with a Metadata instance for the dataset and a pandas.DataFrame with the data from the table. If metadata is False, only the pandas.DataFrame is returned.

Parameters
  • dataset_name (str) – Dataset name to be downloaded. Defaults to 'demo_single_table', which is the name of the single table demo dataset.

  • table_name (str) – If a table name is given, return this table from the indicated dataset. Otherwise, return the first one.

  • data_path (str) – Data path to save the dataset files, only used if dataset_name is provided. Defaults to DATA_PATH.

  • metadata (bool) – If True also return a Table object. Defaults to False.

Returns

If metadata is False return a pandas.DataFrame with the tables data. If metadata is True return a tuple with a Table and the data.

Return type

pandas.DataFrame or tuple