Skip to content

Fix test_numeric_column_names for pandas 2.0#9937

Merged
jrbourbeau merged 1 commit intodask:mainfrom
j-bennet:j-bennet/9736-fix-test-numeric-columns
Feb 10, 2023
Merged

Fix test_numeric_column_names for pandas 2.0#9937
jrbourbeau merged 1 commit intodask:mainfrom
j-bennet:j-bennet/9736-fix-test-numeric-columns

Conversation

@j-bennet
Copy link
Copy Markdown
Contributor

Fixes the following upstream failure with pandas 2.0:

FAILED dask/dataframe/tests/test_groupby.py::test_numeric_column_names[disk] - AssertionError: Index are different
FAILED dask/dataframe/tests/test_groupby.py::test_numeric_column_names[tasks] - AssertionError: Index are different

It appears that apply on groupby would lose dtype of columns. Oddly, this didn't happen with 1.5, might be because default index dtype has changed.

Xref #9736.

  • Tests added / passed
  • Passes pre-commit run --all-files

@j-bennet j-bennet requested a review from jrbourbeau February 10, 2023 04:21
@j-bennet j-bennet changed the title Fix test_numeric_column_names for pandas 2.0 compatibility. Fix test_numeric_column_names for pandas 2.0 compatibility Feb 10, 2023
Copy link
Copy Markdown
Member

@jrbourbeau jrbourbeau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @j-bennet! This looks good to me. For reference, I confirmed the changes here fix dask/dataframe/tests/test_groupby.py::test_numeric_column_names when running with the nightly version of pandas

@jrbourbeau jrbourbeau changed the title Fix test_numeric_column_names for pandas 2.0 compatibility Fix test_numeric_column_names for pandas 2.0 Feb 10, 2023
@jrbourbeau jrbourbeau merged commit 17dff09 into dask:main Feb 10, 2023
@j-bennet j-bennet deleted the j-bennet/9736-fix-test-numeric-columns branch February 10, 2023 22:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants