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

EA interface: rename ExtensionArray._hasnans to ._hasna #45519

Merged
merged 2 commits into from
Jan 21, 2022

Conversation

jorisvandenbossche
Copy link
Member

As discussed in follow-up on #45024 (comment)

Since this is "public" for developers, we need to decide on a name now for 1.4. Using "na" instead of "nan" makes it consistent with the other missing values related methods in the EA interface (isna, dropna, fillna, _can_hold_na)

@jorisvandenbossche jorisvandenbossche added the ExtensionArray Extending pandas with custom dtypes or arrays. label Jan 21, 2022
@jorisvandenbossche jorisvandenbossche added this to the 1.4 milestone Jan 21, 2022
@jreback jreback modified the milestones: 1.4, 1.5 Jan 21, 2022
@jreback
Copy link
Contributor

jreback commented Jan 21, 2022

@jorisvandenbossche no more on 1.4

@jorisvandenbossche jorisvandenbossche modified the milestones: 1.5, 1.4 Jan 21, 2022
@jorisvandenbossche
Copy link
Member Author

This is an innocent name change, but important to do now since it's public API. Given that the release is planned tomorrow or Sunday, I think that is certainly still enough time to merge something like this.

@jreback
Copy link
Contributor

jreback commented Jan 21, 2022

@jbrockmendel
Copy link
Member

I chose _hasnans to be consistent with the Index.hasnans method, dont really give a darn.

@jreback
Copy link
Contributor

jreback commented Jan 21, 2022

I chose _hasnans to be consistent with the Index.hasnans method, dont really give a darn.

we could change that too

@simonjayhawkins
Copy link
Member

I chose _hasnans to be consistent with the Index.hasnans method, dont really give a darn.

we could change that too

As that's public wouldn't that need a deprecation

@jreback
Copy link
Contributor

jreback commented Jan 21, 2022

I chose _hasnans to be consistent with the Index.hasnans method, dont really give a darn.

we could change that too

As that's public wouldn't that need a deprecation

no its experimental on an EA and private on Index

@jreback jreback merged commit a0b40c0 into pandas-dev:main Jan 21, 2022
@lumberbot-app

This comment has been minimized.

@jreback
Copy link
Contributor

jreback commented Jan 21, 2022

@meeseeksdev backport 1.4.x

@jreback
Copy link
Contributor

jreback commented Jan 21, 2022

@jorisvandenbossche if you can followup with a change in the docs (e.g. add _hasna) & also we need to followup on Index.

@lumberbot-app

This comment has been minimized.

@jreback
Copy link
Contributor

jreback commented Jan 21, 2022

this needs a manual backport @jorisvandenbossche @simonjayhawkins

@simonjayhawkins
Copy link
Member

I chose _hasnans to be consistent with the Index.hasnans method, dont really give a darn.

we could change that too

As that's public wouldn't that need a deprecation

no its experimental on an EA and private on Index

ok. should probably remove from the docs https://pandas.pydata.org/pandas-docs/dev/reference/api/pandas.Index.hasnans.html

@@ -841,7 +841,7 @@ def _isnan(self) -> npt.NDArray[np.bool_]:
return self.asi8 == iNaT

@property # NB: override with cache_readonly in immutable subclasses
Copy link
Member

Choose a reason for hiding this comment

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

the comment here should be updated, might no longer be relevant

@jorisvandenbossche
Copy link
Member Author

no its experimental on an EA and private on Index

hasnans is a public property on both Index and Series, so as Simon says, that would need to be deprecated if we want to remove that. But that's a separate discussion.

@jorisvandenbossche
Copy link
Member Author

@simonjayhawkins thanks for the backport!

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
ExtensionArray Extending pandas with custom dtypes or arrays.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants