sdv.demo.load_demo

sdv.demo.load_demo(dataset_name=None, 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, if None use default demo data. Defaults to None.

  • 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