bottom() 函数
bottom()
函数按指定的列对每个输入表进行排序,并在每个表中保留最底部的 n
条记录。
注意: bottom()
函数会删除空表。
函数类型签名
(<-tables: stream[A], n: int, ?columns: [string]) => stream[A] where A: Record
有关更多信息,请参阅 函数类型签名。
参数
n
(必需) 从每个输入表中返回的行数。
columns
要排序的列的列表。默认为 ["_value"]
。
排序优先级由列表顺序(从左到右)确定。
tables
输入数据。默认为管道转发数据 (<-
)。
示例
返回每个输入表中值最低的两行
import "sampledata"
sampledata.int()
|> bottom(n: 2)
此页内容是否对您有帮助?
感谢您的反馈!