experimental.mode() 函数
experimental.mode()
实验性包随时可能更改。
experimental.mode()
计算每个输入表的 _value
列中最常出现的众数或值。
experimental.mode
仅考虑非空值。如果存在多个众数,它将在排序后的表中返回所有众数。如果没有众数,则返回 null。
支持的类型
- string
- float
- int
- uint
- bool
- time
函数类型签名
(<-tables: stream[{A with _value: B}]) => stream[{A with _value: B}]
更多信息,请参阅函数类型签名。
参数
tables
输入数据。默认为管道转发数据 (<-
)。
示例
计算输入表的众数
import "experimental"
import "sampledata"
sampledata.int()
|> experimental.mode()
此页对您有帮助吗?
感谢您的反馈!