bigframes._config.SamplingOptions#
- class bigframes._config.SamplingOptions(max_download_size: int | None = 500, enable_downsampling: bool = False, sampling_method: Literal['head', 'uniform'] = 'uniform', random_state: int | None = None)[source]#
Encapsulates the configuration for data sampling.
Attributes
Whether to enable downsampling.
Download size threshold in MB.
The seed for the uniform downsampling algorithm.
Downsampling algorithms to be chosen from.
Methods
__init__([max_download_size, ...])Configures whether to disable downsampling
with_max_download_size(max_rows)Configures the maximum download size for data sampling in MB
with_method(method)Configures the downsampling algorithms to be chosen from
with_random_state(state)Configures the seed for the uniform downsampling algorithm