mode() function
mode()
returns the non-null value or values that occur most often in a
specified column in each input table.
If there are multiple modes, mode()
returns all mode values in a sorted table.
If there is no mode, mode()
returns null
.
Note: mode()
drops empty tables.
Function type signature
(<-tables: stream[A], ?column: string) => stream[{B with _value: C}] where A: Record, B: Record
Parameters
column
Column to return the mode from. Default is _value
.
tables
Input data. Default is piped-forward data (<-
).
Examples
Return the mode of each input table
import "sampledata"
sampledata.int()
|> mode()
Was this page helpful?
Thank you for your feedback!
Support and feedback
Thank you for being part of our community! We welcome and encourage your feedback and bug reports for Flux and this documentation. To find support, use the following resources:
Customers with an annual or support contract can contact InfluxData Support.