Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for issue #46870 DataFrame.select_dtypes(include='number') includes BooleanDtype #46951

Closed
wants to merge 2 commits into from

Conversation

MichaelRocchio
Copy link

@MichaelRocchio MichaelRocchio commented May 6, 2022

@MichaelRocchio MichaelRocchio changed the title changing boolean.py is_numeric Fix for issue #46870 DataFrame.select_dtypes(include='number') includes BooleanDtype May 6, 2022
@MichaelRocchio MichaelRocchio marked this pull request as ready for review May 6, 2022 02:29
@MichaelRocchio
Copy link
Author

Output for the following test has been confirmed after installing this branch:

df = pd.DataFrame({
    'a': [1, 2, 3],
    'b': pd.Series([True, False, True], dtype=pd.BooleanDtype()),
})
print(df.select_dtypes(include='number').columns)

Returns:
Index(['a'], dtype='object')

@jreback jreback added the Dtype Conversions Unexpected or buggy dtype conversions label May 8, 2022
Copy link
Contributor

@jreback jreback left a comment

Choose a reason for hiding this comment

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

always add tests

@simonjayhawkins simonjayhawkins added this to the 1.4.3 milestone May 16, 2022
@simonjayhawkins
Copy link
Member

always add tests

and a release note in doc/source/whatsnew/v1.4.3.rst

@simonjayhawkins simonjayhawkins mentioned this pull request Jun 8, 2022
@github-actions
Copy link
Contributor

This pull request is stale because it has been open for thirty days with no activity. Please update and respond to this comment if you're still interested in working on this.

@github-actions github-actions bot added the Stale label Jun 21, 2022
@simonjayhawkins
Copy link
Member

Thanks @MichaelRocchio for the PR. closing as stale. (needs green ci, tests for issue code sample and release note.)

ping if you want to continue and will re-open.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Dtype Conversions Unexpected or buggy dtype conversions Stale
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: DataFrame.select_dtypes(include='number') includes BooleanDtype columns
3 participants