Skip to content

DEPR: NDFrame.bool #51749

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

Closed
jbrockmendel opened this issue Mar 3, 2023 · 5 comments · Fixed by #51756
Closed

DEPR: NDFrame.bool #51749

jbrockmendel opened this issue Mar 3, 2023 · 5 comments · Fixed by #51756
Labels
Deprecate Functionality to remove in pandas
Milestone

Comments

@jbrockmendel
Copy link
Member

jbrockmendel commented Mar 3, 2023

We recently deprecated Series.__int__ and Series.__float__, let's do NFrame.bool too.

xref #32923

@jbrockmendel jbrockmendel added Bug Needs Triage Issue that has not been reviewed by a pandas team member Deprecate Functionality to remove in pandas and removed Bug Needs Triage Issue that has not been reviewed by a pandas team member labels Mar 3, 2023
@phofl
Copy link
Member

phofl commented Mar 3, 2023

+1

This is funny, @rhshadrach and I talked about this while answering questions for the AMA yesterday :)

@MarcoGorelli
Copy link
Member

yes, please

then we can get rid of the confusing bool_t in that file as well 😄

@topper-123
Copy link
Contributor

+1

1 similar comment
@jorisvandenbossche
Copy link
Member

+1

@jorisvandenbossche
Copy link
Member

For Series.bool, we can point to Series.item() as an alternative. The main difference is that item() will just in general give you the scalar value (if Series is length 1), while bool() will only do that if it's actually a boolean.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Deprecate Functionality to remove in pandas
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants