Skip to content

featurebyte.HistoricalFeatureTable.sample

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

Description

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

Parameters

  • size: int
    default: 10
    Maximum number of rows to sample.

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

Returns

  • DataFrame
    Sampled rows from the table.

Examples

>>> historical_feature_table = catalog.get_historical_feature_table("historical_feature_table_name")
>>> historical_feature_table.sample()