1

I created 2 named selections

df.select(df.x => 2,name='bigger')
df.select(df.x < 2,name='smaller')

and it's cool, I can use the selection parameter so many (ie statistical) functions offer, for example

df.count('*',selection='bigger')

but is there also a way to use the named selection in a filter? Something like

df['bigger']
Georgy
  • 12,464
  • 7
  • 65
  • 73
mojzis
  • 324
  • 1
  • 2
  • 13

1 Answers1

4

Well that syntax df['bigger'] is accessing a column (or expression) in vaex that is called 'bigger'.

However, you can do: df.filter('bigger') and will give you a filtered dataframe.

Note that, while similar in some ways, filters and selections are a bit different, and each has its own place when using vaex.

Joco
  • 803
  • 4
  • 7