Skip to content

dask.dataframe groupby results in pandas FutureWarning: When grouping with a length-1 list-like, ... #10572

Open

Description

@graingert

when running against pandas 2.2.0.dev0+390.g59d4e84128 when using group_by a deprecation warning is raised:

>>> import pandas as pd
>>> import dask.dataframe as dd
>>> dd.from_pandas(pd.DataFrame([{"foo": 10, "bar": 4}]), npartitions=1).groupby("foo").get_group(10).compute()
/home/graingert/projects/dask/dask/dataframe/groupby.py:274: FutureWarning: When grouping with a length-1 list-like, you will need to pass a length-1 tuple to get_group in a future version of pandas. Pass `(name,)` instead of `name` to silence this warning.
  return grouped.get_group(get_key)
   foo  bar
0   10    4
>>> 

Activity

  1. added
    needs triage
    on Oct 18, 2023
  2. added
    needs attention
    on Nov 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs attentionneeds triage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions