| [ Web Proxy ] |
| Viewing: https://dataframes.bigquery.dev/reference/api/bigframes._config.SamplingOptions.html | [Back] [Original] |
Section Navigation
Encapsulates the configuration for data sampling.
Whether to enable downsampling. Default False.
If max_download_size is exceeded when downloading data (e.g., to_pandas()), the data will be downsampled if enable_downsampling is True, otherwise, an error will be raised.
Examples:
>>> import bigframes.pandas as bpd
>>> bpd.options.sampling.enable_downsampling = True
Download size threshold in MB. Default 500.
If value set to None, the download size wont be checked.
Examples:
>>> import bigframes.pandas as bpd
>>> bpd.options.sampling.max_download_size = 1000
The seed for the uniform downsampling algorithm. Default None.
If provided, the uniform method may take longer to execute and require more computation.
Examples:
>>> import bigframes.pandas as bpd
>>> bpd.options.sampling.random_state = 42
Downsampling algorithms to be chosen from. Default uniform.
The choices are: head: This algorithm returns a portion of the data from the beginning. It is fast and requires minimal computations to perform the downsampling.; uniform: This algorithm returns uniform random samples of the data.
Examples:
>>> import bigframes.pandas as bpd
>>> bpd.options.sampling.sampling_method = "head"
Configures whether to disable downsampling
The configuration for data sampling.
Configures the maximum download size for data sampling in MB
max_rows (None or int) An int value for the maximum row size.
The configuration for data sampling.
Configures the downsampling algorithms to be chosen from
method (None or Literal) A literal string value of either head or uniform data sampling method.
The configuration for data sampling.
Copyright 2019, Google.
Created using Sphinx 8.1.3.
Built with the PyData Sphinx Theme 0.19.0.
| Web Proxy Viewer | New URL | Original Page |