ENH: ExtensionArray.repeat by TomAugspurger · Pull Request #24349 · pandas-dev/pandas (original) (raw)

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 andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation10 Commits3 Checks0 Files changed

Conversation

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters

[ Show hidden characters]({{ revealButtonHref }})

TomAugspurger

@TomAugspurger

@pep8speaks

@TomAugspurger

TomAugspurger

@@ -987,7 +987,8 @@ update the ``ExtensionDtype._metadata`` tuple to match the signature of your
**Other changes**
- ``ExtensionArray`` has gained the abstract methods ``.dropna()`` (:issue:`21185`)

Choose a reason for hiding this comment

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

This method isn't abstract.

TomAugspurger

def repeat(self, repeats, axis=None):
"""
Repeat elements of an array.

Choose a reason for hiding this comment

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

Need a versionadded. Will do that on merge maybe, unless there are other comments on the implementation.

@codecov

@codecov

@jreback

do we have interactions with our other defintiions of this series.py and indexes/base.py? maybe create an issue to investigate this code duplication (same for searchsorted)

@TomAugspurger

@TomAugspurger

Added a fixture to parametrize the test across ExtensionArray.repeat and Series.repeat. I don't think there's any code duplication that could be removed. Series needs to handle repeating the index, and just dispatches to `._values` for repeating the array.

@TomAugspurger

jreback

Choose a reason for hiding this comment

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

these methods are in api.rst?

@TomAugspurger

ExtensionArray is an auto summary, so these will be added automatically. Though now that I think about it, it won't have the "private" methods like _from_sequnce, since numpydoc / autodoc excludes items starting with an `_`. But I guess they'll be looking at the source / GitHub anyway.

Pingviinituutti pushed a commit to Pingviinituutti/pandas that referenced this pull request

Feb 28, 2019

@TomAugspurger @Pingviinituutti

Pingviinituutti pushed a commit to Pingviinituutti/pandas that referenced this pull request

Feb 28, 2019

@TomAugspurger @Pingviinituutti