Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我创建了 2 个命名选择
df.select(df.x => 2,name='bigger') df.select(df.x < 2,name='smaller')
很酷,我可以使用selection很多(即统计)函数提供的参数,例如
selection
df.count('*',selection='bigger')
但是还有一种方法可以在过滤器中使用命名选择吗?就像是
df['bigger']
好吧,该语法df['bigger']正在访问 vaex 中称为“更大”的列(或表达式)。
但是,您可以这样做:df.filter('bigger')并且会给您一个过滤的数据框。
df.filter('bigger')
请注意,虽然在某些方面相似,但过滤器和选择有点不同,并且在使用 vaex 时每个都有自己的位置。