philippjfr on v0.12.0a6
Hi all, I'm attempting to use a value_format for datetime column in a holoviews table (bokeh backend) with the goal of showing nanoseconds rather than the default format of milliseconds. If this question is more appropriate for Github please let me know!
Here's a snippet of what I'm trying to do. Neither my format function or
dimension.py are called:
def datetime_format_function(x) -> str: return x.strftime('TEST: %s') time_dimension = hv.Dimension(('sending_time_dt', 'sending_time'), value_format=datetime_format_function, type=str) return hv.Table(data, kdims=[time_dimension], values=['x', 'y'])
@philippjfr I can reproduce as follows:
conda create -n hvtest0402 python=3.8 conda activate hvtest0402 conda install pandas holoviews conda install jupyter jupyter-notebook
Then I ran the file https://holoviews.org/user_guide/Applying_Customizations.html but changing the
hv.extension call to only use
bokeh and cannot get any visualization.
This is on Windows.
defaultschannel if I run
conda update --all -c pyviz -c conda-forge -yin the environment I could get it up and running. Though it creates another problem where I could not start a jupyter notebook, so I used jupyter lab instead of.
AttributeError: 'DataArray' object has no attribute '_file_obj'
I checked the latest tagged releases to make sure the problem was on my side, so I ended up runing (on the running server):
pip install geoviews==1.9.1 pip install holoviews==1.14.2 pip install param==1.10.0 pip install datashader==0.12.1
and I saw the bug was no longer there .. bu this also messed-up my jupyter widgets .. hence a rebuild
Now I want to check if mamba is doing the right things otherwise I will try pip.
opts.defaultsto set default for the whole notebook supposed to work for hvplot? If yes, I'll submit a new issue.
My guess is that opts.defaults would work only for options not processed as hvplot command-line arguments, except maybe for some that are just passed through. Basically, HoloViews's option system lets you use opts.defaults to set global defaults, but then those defaults get overridden by any values specified explicitly. Due to how hvPlot works, I would assume that it sets various options explicitly even when the user doesn't provide values, in part because hvPlot defaults need to match Pandas defaults, not HoloViews defaults. So no, I don't think hvPlot not being responsive to changes in opts.defaults counts as a bug.