Closed jlstevens closed 3 years ago
Here's the code involved, which I tested in this environment:
python=3.6.11
notebook=6.1.5
ipykernel=5.3.4
colorcet=1.0.0
datashader=0.12.1
geoviews=1.9.1
holoviews=1.14.3
pandas=1.1.5
dask=2020.12.0
@philippjfr Given that you understand the details of the network format in HoloViews best, do you have any suggestions for either supporting the same constructor style for dask dataframes as pandas dataframes or at minimum some way of warning users trying to use dask dataframes in the same way as works for pandas?
Another option may be to change our Pandas examples to whatever works for both Pandas and Dask, if any, and if that way is a plausible recommendation for both.
Definite option. It would be more efficient in both the pandas and dask case to use the existing index rather than adding a new column with an integer index.
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
In this example I tried getting the HoloViews example at the end to work (note, that example is wrong, neither of those images are wireframes!). I did this by transforming
verts
,tris
andmesh
to their dask versions asverts_ddf
,tris_ddf
andmesh_ddf
using:Now the datashader portion of the notebook works fine using the dask dataframes instead of the original pandas dataframes. In the HoloViews example at the end, this is no longer true. This is what works with pandas (fixing the example to show a wireframe):
With this result:
But if I just replace
tris
withtris_ddf
etc I get an exception:Here is what does work, using a very different constructor:
This is unintuitive (and @philippjfr tells that this isn't necessary if an index column is present) and it would be nice if you could transparently replace pandas dataframes with dask ones.