toBool() 函数
toBool() 将 _value 列中的所有值转换为布尔类型。
支持的数据类型
- string:
true或false - int:
1或0 - uint:
1或0 - float:
1.0或0.0
函数类型签名
(<-tables: stream[{A with _value: B}]) => stream[{A with _value: B, _value: bool}]
有关更多信息,请参阅 函数类型签名。
参数
tables
输入数据。默认为管道传递数据 (<-)。
示例
将整数 _value 列转换为布尔值
import "sampledata"
sampledata.numericBool()
|> toBool()
此页内容是否有帮助?
感谢您的反馈!