Skip to content

Remove StringMixin from code base #26495

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
topper-123 opened this issue May 22, 2019 · 1 comment · Fixed by #26505
Closed

Remove StringMixin from code base #26495

topper-123 opened this issue May 22, 2019 · 1 comment · Fixed by #26505
Labels
Clean Internals Related to non-user accessible pandas implementation
Milestone

Comments

@topper-123
Copy link
Contributor

topper-123 commented May 22, 2019

I`m thinking about making a PR to remove StringMixin from the code base in order to make pandas use more standard string output methodology (putting the base string representations in the ``repr`` , as is standard in python3, instead of in ``str``).

Any objections to this? This is backwards compatible for users of Pandas, but may be slightly backwards incompatible for subclasses of Pandas classes located in external packages, e.g. If a downstream package did this:

>>> class MyFrame(pd.DataFrame):
...    def __str__(self):
...        returnabc

the repr would output an unexpected string.

Would this e.g. affect Geopandas, @jorisvandenbossche?

@gfyoung gfyoung added Clean Internals Related to non-user accessible pandas implementation labels May 23, 2019
@jorisvandenbossche
Copy link
Member

GeoPandas does not modify the repr, so it would not be affected.

I don't really use or know of other packages that subclass pandas, but to me it seems OK to change this, if we really want to.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Clean Internals Related to non-user accessible pandas implementation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants