Relational data
class RelationalData
RelationalData.__init__
Relational data structure.
Arguments:
data
- A dictionary with table names as keys andpandas.DataFrame
’s as values.schema
- ASchema
object.
RelationalData.split
Split the input data according to the given ratios for each root table.
Arguments:
ratio
- Split ratio. If a float, it must be between 0 and 1. If an integer > 1, then it is interpreted as the number of rows. If a dictionary, it must contain a split ratio for each root table (except LUTs).reset_index
- Whether to reset the index of the resulting dataframes.rng
- Random state. If an int, it will be used as seed, if None the seed will be chosen randomly.
Returns:
Tuple with the two splits.