Skip to content

Commit

Permalink
Handle dask groupby warning (#6391)
Browse files Browse the repository at this point in the history
  • Loading branch information
maximlt authored Oct 1, 2024
1 parent d303ad4 commit 519f720
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion holoviews/core/data/dask.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ def groupby(cls, dataset, dimensions, container_type, group_type, **kwargs):
for coord in indices:
if any(isinstance(c, float) and np.isnan(c) for c in coord):
continue
if len(coord) == 1:
if len(coord) == 1 and not util.PANDAS_GE_220:
coord = coord[0]
group = group_type(groupby.get_group(coord), **group_kwargs)
data.append((coord, group))
Expand Down
1 change: 1 addition & 0 deletions holoviews/core/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@

NUMPY_GE_200 = numpy_version >= Version("2")
PANDAS_GE_210 = pandas_version >= Version("2.1")
PANDAS_GE_220 = pandas_version >= Version("2.2")

# Types
generator_types = (zip, range, types.GeneratorType)
Expand Down
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,6 @@ filterwarnings = [
"ignore:datetime.datetime.utcfromtimestamp():DeprecationWarning:bokeh", # https://github.com/bokeh/bokeh/issues/13125
"ignore:datetime.datetime.utcnow():DeprecationWarning:bokeh", # https://github.com/bokeh/bokeh/issues/13125
# 2024-01: Pandas 2.2
"ignore:When grouping with a length-1 list::dask.dataframe.groupby", # https://github.com/dask/dask/issues/10572
"ignore:\\s*Pyarrow will become a required dependency of pandas:DeprecationWarning", # Will go away by itself in Pandas 3.0
"ignore:Passing a (SingleBlockManager|BlockManager) to (Series|GeoSeries|DataFrame|GeoDataFrame) is deprecated:DeprecationWarning", # https://github.com/holoviz/spatialpandas/issues/137
# 2024-04
Expand Down

0 comments on commit 519f720

Please sign in to comment.