holoviz / datashader

Quickly and accurately render even the largest data.
http://datashader.org
BSD 3-Clause "New" or "Revised" License
3.32k stars 365 forks source link

Incompatibility with pandas 0.21 #522

Closed msarahan closed 7 years ago

msarahan commented 7 years ago

Seems like pandas 0.21 changed some major things that require adaptation in datashader. Here's one:

Traceback (most recent call last):
  File "/Users/msarahan/miniconda3/conda-bld/datashader_1510004384686/test_tmp/run_test.py", line 2, in <module>
    import datashader
  File "/Users/msarahan/miniconda3/conda-bld/datashader_1510004384686/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pla/lib/python3.5/site-packages/datashader/__init__.py", line 5, in <module>
    from .core import Canvas                                 # noqa (API import)
  File "/Users/msarahan/miniconda3/conda-bld/datashader_1510004384686/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pla/lib/python3.5/site-packages/datashader/core.py", line 5, in <module>
    import dask.dataframe as dd
  File "/Users/msarahan/miniconda3/conda-bld/datashader_1510004384686/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pla/lib/python3.5/site-packages/dask/dataframe/__init__.py", line 3, in <module>
    from .core import (DataFrame, Series, Index, _Frame, map_partitions,
  File "/Users/msarahan/miniconda3/conda-bld/datashader_1510004384686/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pla/lib/python3.5/site-packages/dask/dataframe/core.py", line 40, in <module>
    pd.core.computation.expressions.set_use_numexpr(False)
AttributeError: module 'pandas.core.computation' has no attribute 'expressions'
Tests failed for datashader-0.6.2-pyh11d61fc_0.tar.bz2 - moving package to /Users/msarahan/miniconda3/conda-bld/broken

another one I encountered recently was that the categorical dtype was no longer recognized, so the neat gerrymandering example you guys have didn't work anymore.

philippjfr commented 7 years ago

I believe this is fixed by upgrading dask to 0.15.4. pandas 0.21 seems to removed something and a new version of dask is required to fix it. @jbednar @jbcrail Maybe we should pin latest dask in the meta.yaml?

jbcrail commented 7 years ago

I ran into a similar issue with recent PRs. Upgrading dask did fix the exceptions, but one test, test_count_cat, is failing due to the unrecognized categorical dtype. Downgrading to pandas 0.20.x fixes that issue.

philippjfr commented 7 years ago

pandas added a new CategoricalDtype in 0.21.0 which probably needs to be handled now.

jbednar commented 7 years ago

Should be fixed on master now.