bach.Series.mode
mode
(partition=None, skipna=True)Returns the mode in each partition or for all values if none is given.
Parameters
partition
(Union[GroupBy, DataFrame]) – The partition or window to applyskipna
(bool) – onlyskipna=True
supported. This means NULL values are ignored.
Returns
a new Series with the aggregation applied
Return type
bach.series.series.SeriesSubType
danger
The result of this function might be non-deterministic if there are multiple values with the same frequency.
note
BigQuery has no support for aggregation function MODE
, therefore APPROX_TOP_COUNT
approximate aggregate function is used instead. Which means that an approximate result will
be produced instead of exact results.
For more information: https://cloud.google.com/bigquery/docs/reference/standard-sql/approximate_aggregate_functions#approx_top_count