Skip to content

API cleanup: Remove global duplicates of DataFrame methods #15241

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

Closed
jondo opened this issue Jan 27, 2017 · 4 comments
Closed

API cleanup: Remove global duplicates of DataFrame methods #15241

jondo opened this issue Jan 27, 2017 · 4 comments
Labels
API Design Duplicate Report Duplicate issue or pull request Reshaping Concat, Merge/Join, Stack/Unstack, Explode

Comments

@jondo
Copy link

jondo commented Jan 27, 2017

In the currently online pandas 0.19.2 documentation, I see the following inconsistency:

The global versions of these methods (and probably others) are identical to the local ones except for an additional DataFrame argument, I think that all these should only be DataFrame methods. This would e.g. consistently enable chaining.

So let me suggest that the global versions should be removed, of course after a deprecation period.

@jreback
Copy link
Contributor

jreback commented Jan 27, 2017

duplicate of this #12640

yes there are a number things that could be done. would you like to do a PR to deprecate?

@jreback jreback closed this as completed Jan 27, 2017
@jreback jreback added API Design Duplicate Report Duplicate issue or pull request Reshaping Concat, Merge/Join, Stack/Unstack, Explode labels Jan 27, 2017
@jondo
Copy link
Author

jondo commented Jan 28, 2017

Are the two pivot_table documentation pages both generated from the same docstring in pivot.py? Where shall the "DEPRECATED: use DataFrame.pivot_table()" (as seen here) go in this case?

@jreback
Copy link
Contributor

jreback commented Jan 28, 2017

https://github.com/pandas-dev/pandas/blob/master/pandas/tools/pivot

but DataFrame.pivot calls this

so easiest to move this to a private method and deprecate the public one

@jorisvandenbossche
Copy link
Member

I also just commented on the other issue #12640. I am not sure I agree it is needed to deprecate those

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API Design Duplicate Report Duplicate issue or pull request Reshaping Concat, Merge/Join, Stack/Unstack, Explode
Projects
None yet
Development

No branches or pull requests

3 participants