Extracting number of entries from CDS

I’m wondering what’s the recommend way to extract the number of entries of a ColumnDataSource. Currently I’m directly extracting this information from the data dict which feels rather clunky.
Use Case: Select last or all entries.

On the JS side or the Python side? On the JS side CDS have a get_length method. I thought there was similar on the Python side, but I don’t see it, so I’m either mis-remembering, or it was removed. [1] Either way, CDS columns must always all have the same length so just taking the length of one is a straightforward approach.


  1. If you are interested to add something like that then a small PR with tests would be accepted. ↩︎