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.
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
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.
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.
metadata
True
Metadata
tables
pandas.DataFrames
False
dataset_name (str) – Dataset name to be downloaded. Defaults to 'demo_multi_table', which is the name of the multi table demo dataset.
'demo_multi_table'
data_path (str) – Data path to save the dataset files, only used if dataset_name is provided. Defaults to DATA_PATH.
DATA_PATH
metadata (bool) – If True return Metadata object. Defaults to False.
If metadata is False return a dict with the tables data. If metadata is True return a tuple with Metadata and tables data.
dict
tuple
dict or tuple