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_demo

sdv.demo.load_demo(dataset_name='demo_multi_table', data_path='/home/runner/work/SDV/SDV/sdv/data', metadata=False)[source]

Load relational demo data.

If a dataset name is given, it is downloaded from the sdv-datasets S3 bucket. Otherwise, a toy dataset with three simple tables is loaded:

  • users: user data including country, gender and age.

  • sessions: sessions data with a foreign key to user.

  • transactions: transactions data with a foreign key to sessions.

If metadata is True, the output will be a tuple with a Metadata instance for the dataset and a tables dict that contains the tables loaded as pandas.DataFrames. If metadata is False, only the tables are returned.

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

  • 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 return Metadata object. Defaults to False.

Returns

If metadata is False return a dict with the tables data. If metadata is True return a tuple with Metadata and tables data.

Return type

dict or tuple