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

enable_downsampling

Whether to enable downsampling.

max_download_size

Download size threshold in MB.

random_state

The seed for the uniform downsampling algorithm.

sampling_method

Downsampling algorithms to be chosen from.

Methods

__init__([max_download_size, ...])

with_disabled()

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