Skip to content

Commit

Permalink
Add support for categorial dtype
Browse files Browse the repository at this point in the history
  • Loading branch information
hoxbro committed Jul 20, 2023
1 parent 6fb7721 commit 47b8932
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions holoviews/operation/datashader.py
Original file line number Diff line number Diff line change
Expand Up @@ -417,6 +417,9 @@ def _apply_datashader(self, dfdata, cvs_fn, agg_fn, agg_kwargs, x, y):
val = dfdata[col].values[data]
if val.dtype.kind == 'f':
val[neg1] = np.nan
elif isinstance(val.dtype, pd.CategoricalDtype):
val = val.to_numpy()
val[neg1] = "-"
elif val.dtype.kind == "O":
val[neg1] = "-"
else:
Expand Down

0 comments on commit 47b8932

Please sign in to comment.