
Hi all,
For my bokeh app, I need to do some processing on the subset of the CDS data using CDSview. I can’t figure out how to do this, i.e. access the ndarrays that are stored in CDS using the filters from CDSview.
Of course I could reverse engineer it, and write a helper function with boolean masking, but surely this is available somewhere in the API?
so for example with
from bokeh.models import ColumnDataSource, CDSView, GroupFilter
from bokeh.sampledata.iris import flowers
source = ColumnDataSource(flowers)
view1 = CDSView(source=source, filters=[GroupFilter(column_name='species', group='versicolor')])
I want to do something like:
idx = (source.data[view1.filters[0].column_name] == view1.filters[0].group)
filtered = {k: v[idx] for k, v in source.data.items()}
but then using the API, and also handling multiple filters etc.
thx in advance,
Daniel

. Will solve my use-case some other way, then.