Skip to content

Conversation

@DeaMariaLeon
Copy link
Member

Towards #37875

Example by itself because I have doubts if it's good enough

@DeaMariaLeon DeaMariaLeon requested a review from mroeschke as a code owner July 26, 2023 16:15
@DeaMariaLeon DeaMariaLeon added this to the 2.1 milestone Jul 26, 2023
--------
>>> class MyExtensionArray(pd.arrays.NumpyExtensionArray):
... def _formatter(self, boxed=False):
... return lambda x: '*' + str(x) + '*'
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
... return lambda x: '*' + str(x) + '*'
... return lambda x: '*' + str(x) if boxed else repr(x) + '*'

@mroeschke mroeschke merged commit 577bb72 into pandas-dev:main Jul 26, 2023
@mroeschke
Copy link
Member

Thanks @DeaMariaLeon

@DeaMariaLeon DeaMariaLeon deleted the Jul26-2 branch July 27, 2023 08:44
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.

2 participants