Bokeh - Do not show tooltip if it has missing value
I'm working on a bokeh figure that shows cluster activity. When a user hovers over a particular processor, I want it to show statistics about the processor. Heres the code: TOOLTIPS = [ ("Usage", "@{usage}%"), ("Name", "@name"), ("PID", "@pid"), ("Command", "@command"), ("User", "@user"), ] p = figure(title="Cluster Activity", plot_width=1200, plot_height=700, x_range=nodes, y_range=list(reversed(cores)), tools='hover', toolbar_location=None, tooltips=TOOLTIPS ) This works, but I don't want to show tooltips with a value of None. For example, if a particular processor, has a None value for User