Skip to content

How to use selections? #1986

Answered by JovanVeljanoski
Eisbrenner asked this question in Q&A
Discussion options

You must be logged in to vote

Hi, here are some examples, i trust examples would be more valuable than explaining things in words:

# Get example data
import vaex
df = vaex.example()


# option 1: using selections
df.select('x > 5')
df.viz.heatmap('x', 'y', selection='default', f='log1p')

# option 2: using selections with custom names
df.select('x > 5', name='my_sel')
df.viz.heatmap('x', 'y', selection='my_sel', f='log1p')

# option 3: with a string expression directly in the viz method
df.viz.heatmap('x', 'y', selection='y < 0', f='log1p')

# option 4: as a vaex expression directly in the viz method
df.viz.heatmap('x', 'y', selection='y < 0', f='log1p')

There are some advanced plotting examples in the docs.

Hope this…

Replies: 1 comment 8 replies

Comment options

You must be logged in to vote
8 replies
@JovanVeljanoski
Comment options

@JovanVeljanoski
Comment options

@Eisbrenner
Comment options

@JovanVeljanoski
Comment options

@Eisbrenner
Comment options

Answer selected by Eisbrenner
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants