Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

DataTable in Bokeh - How do you hide the index column?

Tags:

python

bokeh

How do you hide the index header column in a bokeh DataTable?

like image 629
jundl77 Avatar asked Jan 16 '20 11:01

jundl77


1 Answers

It took me a long time to figure this one out, so I wanted to post it:

According to the documentation:

index_position

property type: Int

Where among the list of columns to insert a column displaying the row index. Negative indices are supported, and specify an index position from the end of the list of columns (i.e. standard Python behaviour).

To prevent the index column from being added, set to None.

If the absolute value of index_position is larger than the length of the columns, then the index will appear at the beginning or end, depending on the sign.

So, set index_position=None like so:

table = DataTable(..., index_position=None, ...)
like image 169
jundl77 Avatar answered Oct 04 '22 02:10

jundl77