Skip to content

BUG: index attributes don't respect the width & need wrapping #11552

@jreback

Description

@jreback

I could get this only to show up in the notebook, but the idea is that the attributes (e.g. _format_attrs())
should be wrapped like we do data so that they don't get cut off.

In [14]: pd.options.display.width=20

In [15]: pd.CategoricalIndex(['foo','bar','baz','a really long string']*100,name='a long name')
Out[15]: 
CategoricalIndex([u'foo',
                  u'bar',
                  u'baz',
                  u'a really long string',
                  u'foo',
                  u'bar',
                  u'baz',
                  u'a really long string',
                  u'foo',
                  u'bar',
                  ...
                  u'baz',
                  u'a really long string',
                  u'foo',
                  u'bar',
                  u'baz',
                  u'a really long string',
                  u'foo',
                  u'bar',
                  u'baz',
                  u'a really long string'],
                 categories=[u'a really long string', u'bar', u'baz', u'foo'], ordered=False, name=u'a long name', dtype='category', length=400)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions