Loading Data
Demo Data
The SDV library contains many different demo datasets that you can use to get started. Use the demo
module to access these datasets.
The demo
module accesses the SDV's public dataset repository. These methods require an internet connection.
get_available_demos
Use this method to get information about all the available demos in the SDV's public dataset repository.
Parameters
modality
: Set this to the string'sequential'
to see all the sequential demo datasets
Returns A pandas DataFrame object containing the name of the dataset, its size (in MB) and the number of tables it contains.
The SDV currently only sequential data that is present in a single table. If you use the 'sequential'
modality, the number of tables is always 1.
download_demo
Use this method to download a demo dataset from the SDV's public dataset repository.
Parameters
(required)
modality
: Set this to the string'sequential'
to access sequential demo data(required)
dataset_name
: A string with the name of the demo dataset. You can use any of the dataset names from theget_available_demo
method.output_folder_name
: A string with the name of a folder. If provided, this method will download the data and metadata into the folder, in addition to returning the data.(default)
None
: Do not save the data into a folder. The data will still be returned so that you can use it in your Python script.
Output A tuple (data, metadata)
.
Loading your own local datasets
A local dataset is a dataset that you have already downloaded onto your computer. These do not require any internet connectivity to access.
load_csvs
Use this method to load any datasets that are stored as CSVs.
Parameters
(required)
folder_name
: A string with the name of the folder where the datasets are stored
Returns A dictionary that contains all the CSV data found in the folder. The key is the name of the file (without the .csv
suffix) and the value is a pandas DataFrame containing the data.
Do you have data in other formats?
Last updated