Skip to content

Pandas 1.0.0 breaks the result set. #1283

@drvinceknight

Description

@drvinceknight

When running the tests for the result set:

python -m unittest 

with pandas 0.25.3 everything passes but with 1.0.0 we get errors:

  File "/Users/vince/anaconda3/envs/axelrod/lib/python3.7/site-packages/dask/local.py", line 222, in execute_task
    result = _execute_task(task, data)
  File "/Users/vince/anaconda3/envs/axelrod/lib/python3.7/site-packages/dask/core.py", line 119, in _execute_task
    return func(*args2)
  File "/Users/vince/anaconda3/envs/axelrod/lib/python3.7/site-packages/dask/utils.py", line 29, in apply
    return func(*args, **kwargs)
  File "/Users/vince/anaconda3/envs/axelrod/lib/python3.7/site-packages/dask/dataframe/groupby.py", line 279, in _groupby_aggregate
    return aggfunc(df.groupby(level=levels, sort=False, **dropna), **kwargs)
  File "/Users/vince/anaconda3/envs/axelrod/lib/python3.7/site-packages/pandas/core/frame.py", line 5807, in groupby
    observed=observed,
  File "/Users/vince/anaconda3/envs/axelrod/lib/python3.7/site-packages/pandas/core/groupby/groupby.py", line 409, in __init__
    mutated=self.mutated,
  File "/Users/vince/anaconda3/envs/axelrod/lib/python3.7/site-packages/pandas/core/groupby/grouper.py", line 625, in get_grouper
    if not isinstance(gpr, Grouping)
  File "/Users/vince/anaconda3/envs/axelrod/lib/python3.7/site-packages/pandas/core/groupby/grouper.py", line 287, in __init__
    ) = index._get_grouper_for_level(self.grouper, level)
  File "/Users/vince/anaconda3/envs/axelrod/lib/python3.7/site-packages/pandas/core/indexes/multi.py", line 1267, in _get_grouper_for_level
    grouper = level_index.take(codes, fill_value=True)
  File "/Users/vince/anaconda3/envs/axelrod/lib/python3.7/site-packages/pandas/core/indexes/base.py", line 761, in take
    f"Unable to fill values because {cls_name} cannot contain NA"
ValueError: Unable to fill values because Int64Index cannot contain NA

This has happened on #1282.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions