snowflake.snowpark.DataFrame.approx_quantile¶
- DataFrame.approx_quantile(col: Union[Column, str, Iterable[Union[Column, str]]], percentile: Iterable[float], *, statement_params: Optional[Dict[str, str]] = None) Union[List[float], List[List[float]]][source]¶
For a specified numeric column and a list of desired quantiles, returns an approximate value for the column at each of the desired quantiles. This function uses the t-Digest algorithm.
Examples:
- Parameters:
col – The name of the numeric column.
percentile – A list of float values greater than or equal to 0.0 and less than 1.0.
statement_params – Dictionary of statement level parameters to be set while executing this action.
- Returns:
A list of approximate percentile values if
colis a single column name, or a matrix with the dimensions(len(col) * len(percentile)containing the approximate percentile values ifcolis a list of column names.