Skip to content

featurebyte.ObservationTable.sample

sample(
size: int=10,
seed: int=1234
) -> DataFrame

Description

Returns a DataFrame that contains a random selection of rows of the observation table based on a specified size and seed for sampling control.

Parameters

  • size: int
    default: 10
    Maximum number of rows to sample, with an upper bound of 10,000 rows.

  • seed: int
    default: 1234
    Seed to use for random sampling.

Returns

  • DataFrame
    Sampled rows from the table.

Examples

>>> observation_table = catalog.get_observation_table("observation_table_name")
>>> observation_table.sample()