-
-
Notifications
You must be signed in to change notification settings - Fork 113
Closed
Milestone
Description
Currently the polars
data frame is not supported. Is this perhaps something we can expect in the near future? Perhaps something like this could be implemented since polars
already supports it: https://data-apis.org/dataframe-api/draft/purpose_and_scope.html. Current status on the other side:
# import hvplot.pandas # monkeypatch `pandas` data frames so we can have `df.plot()`
# import hvplot.polars # does not exist
import hvplot
import polars
df = polars.DataFrame({"a": range(0, 10)})
hvplot.plot(df["a"], kind="line")
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
Cell In[59], line 7
4 import polars
6 df = polars.DataFrame({"a": range(0, 10)})
----> 7 hvplot.plot(df["a"], kind="line")
File ~/mambaforge-pypy3/envs/puma-lab/lib/python3.9/site-packages/hvplot/util.py:31, in with_hv_extension.<locals>.wrapper(*args, **kwargs)
29 from . import hvplot_extension
30 hvplot_extension(extension, logo=logo)
---> 31 return func(*args, **kwargs)
File ~/mambaforge-pypy3/envs/puma-lab/lib/python3.9/site-packages/hvplot/plotting/__init__.py:33, in plot(data, kind, **kwargs)
30 if v is not None:
31 no_none_kwargs[k] = v
---> 33 return hvPlotTabular(data)(kind=kind, **no_none_kwargs)
File ~/mambaforge-pypy3/envs/puma-lab/lib/python3.9/site-packages/hvplot/plotting/core.py:92, in hvPlotBase.__call__(self, x, y, kind, **kwds)
89 plot = self._get_converter(x, y, kind, **kwds)(kind, x, y)
90 return pn.panel(plot, **panel_dict)
---> 92 return self._get_converter(x, y, kind, **kwds)(kind, x, y)
File ~/mambaforge-pypy3/envs/puma-lab/lib/python3.9/site-packages/hvplot/plotting/core.py:99, in hvPlotBase._get_converter(self, x, y, kind, **kwds)
97 y = y or params.pop("y", None)
98 kind = kind or params.pop("kind", None)
---> 99 return HoloViewsConverter(self._data, x, y, kind=kind, **params)
File ~/mambaforge-pypy3/envs/puma-lab/lib/python3.9/site-packages/hvplot/converter.py:388, in HoloViewsConverter.__init__(self, data, x, y, kind, by, use_index, group_label, value_label, backlog, persist, use_dask, crs, fields, groupby, dynamic, grid, legend, rot, title, xlim, ylim, clim, symmetric, logx, logy, loglog, hover, subplots, label, invert, stacked, colorbar, datashade, rasterize, row, col, debug, framewise, aggregator, projection, global_extent, geo, precompute, flip_xaxis, flip_yaxis, dynspread, hover_cols, x_sampling, y_sampling, project, tools, attr_labels, coastline, tiles, sort_date, check_symmetric_max, transforms, stream, cnorm, features, rescale_discrete_levels, **kwds)
386 self.value_label = value_label
387 self.label = label
--> 388 self._process_data(
389 kind, data, x, y, by, groupby, row, col, use_dask,
390 persist, backlog, label, group_label, value_label,
391 hover_cols, attr_labels, transforms, stream, kwds
392 )
394 self.dynamic = dynamic
395 self.geo = any([geo, crs, global_extent, projection, project, coastline, features])
File ~/mambaforge-pypy3/envs/puma-lab/lib/python3.9/site-packages/hvplot/converter.py:806, in HoloViewsConverter._process_data(self, kind, data, x, y, by, groupby, row, col, use_dask, persist, backlog, label, group_label, value_label, hover_cols, attr_labels, transforms, stream, kwds)
804 self.data = data
805 else:
--> 806 raise ValueError('Supplied data type %s not understood' % type(data).__name__)
808 if stream is not None:
809 if streaming:
ValueError: Supplied data type Series not understood
MarcSkovMadsen, philippjfr, smutch and MarcoGorelli
Metadata
Metadata
Assignees
Labels
No labels