VAEX表达式选择所有行
在VAEX中,哪些表达式可以用作滤波器选择所有行?我希望将过滤器作为变量创建并传递给函数。
filter = True
if x > 5:
filter = y > 20
df['new_col'] = filter & z < 10
我的希望是,如果X&lt; = 5它将忽略过滤器(因此我试图将TRUE用作值)。这样做的方式给出了错误'bitwise_and'and'不支持输入类型,并且根据铸件规则'safe'''所有行?
In Vaex, what expression can be used as a filter to select all rows? I wish to create a filter as a variable and pass that to a function.
filter = True
if x > 5:
filter = y > 20
df['new_col'] = filter & z < 10
My wish is that if x <= 5 it will ignore the filter (thus I'm trying to use True as a value). Doing it this way gives the error 'bitwise_and' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ''safe''
What expression will select all rows?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果我正确理解一个简单的技巧,可以“禁用”所有过滤器(即所有的行回),就是做一些事情,例如
使条件始终为真,所以什么也没有过滤。
If I understand correctly a simple trick to "disable" all filters (i.e. get all rows back) is to do something like
Making the condition always True, so nothing is filtered out.