Skip to content

General repr format for our internal ExtensionArrays #22846

Closed
@jorisvandenbossche

Description

@jorisvandenbossche

Triggered by the discussion I am having in #22511, I was also thinking we should look at our EAs reprs.

Currently we have for IntegerArray:

In [14]: pd.core.arrays.integer_array([1, 2, 3, None])
Out[14]: IntegerArray([1, 2, 3, nan], dtype='Int64')

which looks like code, but actually is not valid code (because the constructor needs an array, has no dtype argument, and nan is actually no defined).

So also here (since here we still have the freedom to choose something without the concern of changing something), I think we should have some discussion about what we ideally want.

Metadata

Metadata

Assignees

No one assigned

    Labels

    ExtensionArrayExtending pandas with custom dtypes or arrays.Output-Formatting__repr__ of pandas objects, to_string

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions