Table widget in python does not seem to update when changing column source

What I am trying to do
Re-assign the values of a whole column of a column data source that is the source of a table widget

What I have tried:

        output_col = "some_column"
        source = mytable.source
        values = source.data[output_col]
        values[0:len(my_list)] = my_list
        source.data[output_col] = values

This question is certainly similar to:

but the problem looks different because I am not changing the columns, just the values, but I keep seeing the old values. If I double-click each of the cells that have changed (as they are all editable), then I can see the new value, and then I click outside the cell and the new value is still displayed correctly (as it was actually there but not being shown until I double-click on each individual cell). How can I remove the need to double-click (“edit”) the cell to see the new value? No errors or exceptions are displayed in the console.

Thanks

Offhand, you should try making sure that the value that is being assigned is actually a new, different object. Generally speaking, Bokeh relies on object identity to be able to automatically detect when changes are made via assignment [1], so the above looks like a no-op as far as Bokeh is concerned. Idiomatic Bokeh usage would just be source.data[output_col] = my_list


  1. checking full value equality for every list or array would incur a very heavy performance penalty on the most common cases, all the time. ↩︎