Skip to content

CLN: Collapse private ._take implementation into the public take method #27349

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 1 commit into from
Jul 12, 2019

Conversation

endenis
Copy link
Contributor

@endenis endenis commented Jul 11, 2019

Getting rid the _take private method that seems to be no longer needed.

@endenis endenis changed the title CLN: Collapse private ._take implementation into the public take method #27174 CLN: Collapse private ._take implementation into the public take method Jul 11, 2019
@WillAyd WillAyd added the Clean label Jul 11, 2019
Copy link
Member

@WillAyd WillAyd left a comment

Choose a reason for hiding this comment

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

Thanks for the PR! @mroeschke

@Appender(generic.NDFrame._take.__doc__)
def _take(self, indices, axis=0, is_copy=False):
@Appender(generic.NDFrame.take.__doc__)
def take(self, indices, axis=0, is_copy=False, **kwargs):
Copy link
Member

Choose a reason for hiding this comment

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

Do we need to add kwargs here or did you just add this for consistency?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I added it for consistency:
Series class inherits from the NDFrame, so I wanted to preserve the same signature for take.

@jreback jreback added this to the 0.25.0 milestone Jul 12, 2019
@jreback jreback merged commit 423ca86 into pandas-dev:master Jul 12, 2019
@jreback
Copy link
Contributor

jreback commented Jul 12, 2019

thanks @endenis

@endenis endenis deleted the collapse_private_take branch July 12, 2019 14:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CLN: Collapse private ._take implementation into the public take method
3 participants