Skip to content

featurebyte.BatchFeatureTable.sample

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

Description

Returns a DataFrame that contains a random selection of rows of the batch 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

>>> batch_feature_table = catalog.get_batch_feature_table("batch_feature_table_name")
>>> sample_df = batch_feature_table.sample()