For the complete documentation index, see llms.txt. This page is also available as Markdown.

Data Modalities

SDV is designed to work on tabular data, where each data table contains rows and columns. SDV supports single-table, multi-table, and sequential data modalities.

Single Table Data

Single table data contains rows and columns of information. Each row typically represents a new entity such as a user, transaction, or session. Each column represents an attribute of an entity. It should contain the same type of data.

This example of a single table includes a new row for each guest of a hotel.

SDV supports missing values in single table data. Single table data should be loaded into Python as a pandas DataFrame object.

Key Concepts:

  • Primary key, a column that uniquely identifies every row in the table.

Multi Table Data

Multi table data is present in multiple tables that each have rows and columns. The tables are connected to each other through foreign and primary key references.

This example of a multi table dataset has a table for hotels and a table for their guests. Each hotel has multiple guests who have visited.

Key Concepts:

  • Primary key, a column that uniquely identifies every row in the table.

  • Foreign key, a column that references another primary key column. Typically the reference is to another table's primary key, but it's possible to reference the same table.

  • Alternate key, a column that is unique for every row, but is not the primary key.

  • Composite key, when multiple columns together act as a primary, foreign, or alternate key to the table.

Multi-table data can contain relationships. These are references from one table (foreign key) to another table (primary key). SDV requires referential integrity, meaning that there should be no unknown references or broken links between the tables.

Multi-table data should be loaded into Python as a dictionary. The dictionary should map each table name (string) to a pandas DataFrame object containing the data for that table.

Sequential Data

Sequential data represents ordered records, such as in a timeseries. SDV is designed for the case where your table may contains multiple, independent sequences belonging to different entities (users, patients, etc.).

This example shows sequential data related to vital signs. The table contains multiple sequences, each corresponding to a different patient. For each sequences, health measurements change over time.

The main difference betwen single-table and sequential data is that in single-table data, the rows do not have an order. In sequential data, you have multiple ordered sequences.

Sequential data should be loaded into Python as a pandas DataFrame object.

Key Concepts:

  • Primary key, a column that uniquely identifies every row in the table. Sequential data may or may not have a primary key.

  • Sequence key, a column that uniquely identify each multi-row sequence in the table. In our example, the sequence key is Patient ID.

  • Sequence index, a column that determines the order of the rows. This is typically an index or timestamp. Some types of sequential data may not have a sequence index.

Last updated