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()
此页内容是否有帮助?
感谢您的反馈!