feat(bigquery): general approx_quantile
similar to approx_median
but for arbitrary quantile
#9541
Closed
1 task done
Milestone
Is your feature request related to a problem?
There isn't a great way to use BigQuery's APPROX_QUANTILES feature to get values besides the approximate median in Ibis.
What is the motivation behind your request?
To mimic pandas
describe
, BigQuery DataFrames uses APPROX_QUANTILES to get an approximate 25th percentile, median, and 75th percentile.Note: the percentiles are configurable in pandas, but unfortunately BigQuery SQL's # of bins approach makes it difficult to support arbitrary percentiles.
Describe the solution you'd like
From BigQuery DataFrames, perspective, it'd be great if there was an API to get evenly-spaced approximate quantiles, but perhaps a approx_quantile function that takes an integer from 0 - 100 would be more flexible? Or 0 to 1 to mimic pandas, but with the note that some backends like bigquery only support precision up to a certain point (maybe nearest 0.05 or nearest 0.01)?
What version of ibis are you running?
8.x, but working on 9.x upgrade
What backend(s) are you using, if any?
BigQuery
Code of Conduct
The text was updated successfully, but these errors were encountered: