Closed
Description
openedon Aug 6, 2024
Software versions
Python version : 3.12.4 | packaged by conda-forge | (main, Jun 17 2024, 10:23:07) [GCC 12.3.0]
IPython version : 8.26.0
Tornado version : 6.4.1
Bokeh version : 3.5.1
BokehJS static path : /home/shh/miniconda3/envs/holoviz/lib/python3.12/site-packages/bokeh/server/static
node.js version : v22.5.1
npm version : 10.8.2
jupyter_bokeh version : 4.0.5
Operating system : Linux-6.9.3-76060903-generic-x86_64-with-glibc2.35
Browser name and version
No response
Jupyter notebook / Jupyter Lab version
No response
Expected behavior
I would expect NaN
values to be changed to -
.
Observed behavior
It does not.
Example code
import numpy as np
from bokeh.io import show
from bokeh.models import ColumnDataSource, DataTable, StringFormatter, TableColumn
formatter = StringFormatter(nan_format="-")
source = ColumnDataSource(dict(a=["1", "2", "3", np.nan, float("nan")]))
columns = [TableColumn(field="a", formatter=formatter)]
data_table = DataTable(source=source, columns=columns)
show(data_table)
Stack traceback or browser console output
No response
Activity