Skip to content

ENH: Index[bool] #45061

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

Merged
merged 36 commits into from
Feb 5, 2022
Merged

ENH: Index[bool] #45061

merged 36 commits into from
Feb 5, 2022

Conversation

jbrockmendel
Copy link
Member

@jbrockmendel jbrockmendel commented Dec 24, 2021

@jreback jreback added the Index Related to the Index class or subclasses label Dec 31, 2021
@jreback
Copy link
Contributor

jreback commented Dec 31, 2021

Thoughts on deprecation path?

i think it might be ok to actually just change this, are you finding that you need to change test behavior?

@jbrockmendel
Copy link
Member Author

are you finding that you need to change test behavior?

Yes. Largely around factorize and value_counts where this branch is currently very ad-hoc.

@jbrockmendel jbrockmendel changed the title ENH/WIP: Index[bool] ENH: Index[bool] Jan 7, 2022
@jbrockmendel jbrockmendel marked this pull request as ready for review January 7, 2022 22:49
@jreback jreback added this to the 1.4 milestone Jan 8, 2022
@jreback
Copy link
Contributor

jreback commented Jan 8, 2022

looks ok for 1.4?

@jbrockmendel
Copy link
Member Author

looks ok for 1.4?

I'd rather not rush it.

@jreback jreback modified the milestones: 1.4, 1.5 Jan 8, 2022
@jbrockmendel jbrockmendel marked this pull request as draft January 9, 2022 00:44
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.

minor comment. ready to go?

@@ -54,7 +54,9 @@ def test_drop_with_ignore_errors():

# GH 8522
ser = Series([2, 3], index=[True, False])
assert ser.index.is_object()
ser = Series([2, 3], index=[True, False])
Copy link
Contributor

Choose a reason for hiding this comment

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

duplicate line here

@jbrockmendel
Copy link
Member Author

minor comment. ready to go?

just pushed with a fix. i think ready, yes.

@jreback
Copy link
Contributor

jreback commented Jan 31, 2022

can you rebase again (as the scipy fix merged)

@jreback jreback merged commit ee6b0a0 into pandas-dev:main Feb 5, 2022
@jreback
Copy link
Contributor

jreback commented Feb 5, 2022

thanks @jbrockmendel very nice!

@jbrockmendel jbrockmendel deleted the enh-bool-index branch February 5, 2022 19:46
phofl pushed a commit to phofl/pandas that referenced this pull request Feb 14, 2022
jsignell pushed a commit to dask/dask that referenced this pull request Feb 22, 2022
There was pandas bug enhancement (pandas-dev/pandas#45061), that includes the possibility of a boolean Index.

In dask operations that involve `/` or `truediv` (see comment #8722 (comment)) returns a dataframe with an object-dtyped index instead. 

This PR includes includes the `idx.dtype` when registering the meta for the case of `pd.Index`
yehoshuadimarsky pushed a commit to yehoshuadimarsky/pandas that referenced this pull request Jul 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement Index Related to the Index class or subclasses
Projects
None yet
Development

Successfully merging this pull request may close these issues.

API: support a BooleanIndex
3 participants