Skip to content
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

Remove StringMixin from code base #26495

topper-123 opened this issue May 22, 2019 · 1 comment


Copy link

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):
...        return “abc”

the repr would output an unexpected string.

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


This comment has been minimized.

Copy link

commented May 23, 2019

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
None yet
4 participants
You can’t perform that action at this time.