Skip to content

BUG: NumericIndex.append retain dtype #43938

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 3 commits into from
Oct 11, 2021

Conversation

jbrockmendel
Copy link
Member

  • closes #xxxx
  • tests added / passed
  • Ensure all linting tests pass, see here for how to run them
  • whatsnew entry


is_numeric = result.dtype.kind in ["i", "u", "f"]
if self._is_backward_compat_public_numeric_index and is_numeric:
return type(self)(result, name=name)
Copy link
Contributor

Choose a reason for hiding this comment

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

can you use _simple_new ?

Copy link
Member Author

Choose a reason for hiding this comment

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

i think so, will update

@jreback jreback added this to the 1.4 milestone Oct 10, 2021
@jreback jreback added Index Related to the Index class or subclasses Reshaping Concat, Merge/Join, Stack/Unstack, Explode labels Oct 10, 2021
@jreback
Copy link
Contributor

jreback commented Oct 10, 2021

can you add a whatsnew note, otherwise lgtm

@jbrockmendel
Copy link
Member Author

can you add a whatsnew note, otherwise lgtm

shouldnt need whatsnew since NumericIndex isn't exposed in a released version

@jreback jreback merged commit 2c7393b into pandas-dev:master Oct 11, 2021
@jbrockmendel jbrockmendel deleted the bug-numericindex-append branch October 11, 2021 17:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Index Related to the Index class or subclasses Reshaping Concat, Merge/Join, Stack/Unstack, Explode
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants