{"action":"created","issue":{"url":"https://api.github.com/repos/pydata/pandas/issues/9901","labels_url":"https://api.github.com/repos/pydata/pandas/issues/9901/labels{/name}","comments_url":"https://api.github.com/repos/pydata/pandas/issues/9901/comments","events_url":"https://api.github.com/repos/pydata/pandas/issues/9901/events","html_url":"https://github.com/pydata/pandas/pull/9901","id":68467827,"number":9901,"title":"Index repr changes to make them consistent","user":{"login":"jreback","id":953992,"avatar_url":"https://avatars.githubusercontent.com/u/953992?v=3","gravatar_id":"","url":"https://api.github.com/users/jreback","html_url":"https://github.com/jreback","followers_url":"https://api.github.com/users/jreback/followers","following_url":"https://api.github.com/users/jreback/following{/other_user}","gists_url":"https://api.github.com/users/jreback/gists{/gist_id}","starred_url":"https://api.github.com/users/jreback/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jreback/subscriptions","organizations_url":"https://api.github.com/users/jreback/orgs","repos_url":"https://api.github.com/users/jreback/repos","events_url":"https://api.github.com/users/jreback/events{/privacy}","received_events_url":"https://api.github.com/users/jreback/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/pydata/pandas/labels/Indexing","name":"Indexing","color":"0b02e1"},{"url":"https://api.github.com/repos/pydata/pandas/labels/Output-Formatting","name":"Output-Formatting","color":"ededed"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/pydata/pandas/milestones/29","html_url":"https://github.com/pydata/pandas/milestones/0.16.1","labels_url":"https://api.github.com/repos/pydata/pandas/milestones/29/labels","id":816810,"number":29,"title":"0.16.1","description":"after 0.16.0 of course!","creator":{"login":"jreback","id":953992,"avatar_url":"https://avatars.githubusercontent.com/u/953992?v=3","gravatar_id":"","url":"https://api.github.com/users/jreback","html_url":"https://github.com/jreback","followers_url":"https://api.github.com/users/jreback/followers","following_url":"https://api.github.com/users/jreback/following{/other_user}","gists_url":"https://api.github.com/users/jreback/gists{/gist_id}","starred_url":"https://api.github.com/users/jreback/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jreback/subscriptions","organizations_url":"https://api.github.com/users/jreback/orgs","repos_url":"https://api.github.com/users/jreback/repos","events_url":"https://api.github.com/users/jreback/events{/privacy}","received_events_url":"https://api.github.com/users/jreback/received_events","type":"User","site_admin":false},"open_issues":20,"closed_issues":195,"state":"open","created_at":"2014-10-07T14:39:07Z","updated_at":"2015-05-05T22:27:56Z","due_on":"2015-05-08T04:00:00Z","closed_at":null},"comments":23,"created_at":"2015-04-14T18:51:17Z","updated_at":"2015-05-05T22:38:13Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/pydata/pandas/pulls/9901","html_url":"https://github.com/pydata/pandas/pull/9901","diff_url":"https://github.com/pydata/pandas/pull/9901.diff","patch_url":"https://github.com/pydata/pandas/pull/9901.patch"},"body":"With this PR, makes repr of all Index types consistent. \r\ncloses #6482\r\ncloses #6295\r\nreplaces #9897\r\n\r\nPrevious Behavior\r\n```\r\nIn [1]: pd.get_option('max_seq_items')\r\nOut[1]: 100\r\n\r\nIn [2]: pd.Index(range(4),name='foo')\r\nOut[2]: Int64Index([0, 1, 2, 3], dtype='int64')\r\n\r\nIn [3]: pd.Index(range(104),name='foo')\r\nOut[3]: Int64Index([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, ...], dtype='int64')\r\n\r\nIn [4]: pd.date_range('20130101',periods=4,name='foo',tz='US/Eastern')\r\nOut[4]: \r\n<class 'pandas.tseries.index.DatetimeIndex'>\r\n[2013-01-01 00:00:00-05:00, ..., 2013-01-04 00:00:00-05:00]\r\nLength: 4, Freq: D, Timezone: US/Eastern\r\n\r\nIn [5]: pd.date_range('20130101',periods=104,name='foo',tz='US/Eastern')\r\nOut[5]: \r\n<class 'pandas.tseries.index.DatetimeIndex'>\r\n[2013-01-01 00:00:00-05:00, ..., 2013-04-14 00:00:00-04:00]\r\nLength: 104, Freq: D, Timezone: US/Eastern\r\n```\r\n\r\nNew Behavior\r\n```\r\nIn [1]:  pd.get_option('max_seq_items')\r\nOut[1]: 10\r\n\r\nIn [9]: pd.Index(range(4),name='foo')\r\nOut[9]: Int64Index([0, 1, 2, 3], dtype='int64', name=u'foo')\r\n\r\nIn [10]: pd.Index(range(104),name='foo')\r\nOut[10]: Int64Index([0, 1, ..., 102, 103], dtype='int64', name=u'foo', length=104)\r\n\r\nIn [11]: pd.date_range('20130101',periods=4,name='foo',tz='US/Eastern')\r\nOut[11]: DatetimeIndex(['2013-01-01 00:00:00-05:00', '2013-01-02 00:00:00-05:00', '2013-01-03 00:00:00-05:00', '2013-01-04 00:00:00-05:00'], dtype='datetime64[ns]', name=u'foo', freq='D', tz='US/Eastern')\r\n\r\nIn [12]: pd.date_range('20130101',periods=104,name='foo',tz='US/Eastern')\r\nOut[12]: DatetimeIndex(['2013-01-01 00:00:00-05:00', '2013-01-02 00:00:00-05:00', ..., '2013-04-13 00:00:00-04:00', '2013-04-14 00:00:00-04:00'], dtype='datetime64[ns]', name=u'foo', length=104, freq='D', tz='US/Eastern')\r\n```\r\n\r\nNote that ``MultiIndex`` and ``CategoricalIndex`` are multi-line repr and do no truncate sequences (of e.g. labels), this is consistent with previous versions. (easy to change this though)\r\n```\r\nIn [1]: MultiIndex.from_product([list('abcdefg'),range(10)],names=['first','second'])\r\nOut[1]: \r\nMultiIndex(levels=[[u'a', u'b', u'c', u'd', u'e', u'f', u'g'], [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]],\r\n           labels=[[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6], [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9]],\r\n           names=[u'first', u'second'])\r\n\r\nIn [4]: pd.CategoricalIndex(np.random.randint(0,5,size=100),name='foo')\r\nOut[4]: \r\nCategoricalIndex([3, 0, 0, 3, 1, 3, 0, 4, 2, 3, 0, 4, 0, 1, 2, 0, 4, 1, 4, 2, 3, 1, 0, 4, 4, 3, 0, 3, 0, 1, 2, 3, 3, 1, 1, 0, 0, 4, 4, 1, 1, 3, 1, 1, 4, 4, 3, 0, 0, 0, 4, 4, 0, 1, 3, 1, 2, 0, 3, 1, 2, 2, 2, 1, 1, 4, 1, 0, 4, 3, 3, 0, 0, 0, 4, 4, 1, 4, 2, 2, 1, 4, 0, 0, 0, 4, 3, 0, 4, 0, 0, 0, 3, 3, 1, 2, 2, 3, 4, 1],\r\n                 categories=[0, 1, 2, 3, 4],\r\n                 ordered=False,\r\n                 name=u'foo',\r\n                 dtype='category')\r\n```"},"comment":{"url":"https://api.github.com/repos/pydata/pandas/issues/comments/99251965","html_url":"https://github.com/pydata/pandas/pull/9901#issuecomment-99251965","issue_url":"https://api.github.com/repos/pydata/pandas/issues/9901","id":99251965,"user":{"login":"jorisvandenbossche","id":1020496,"avatar_url":"https://avatars.githubusercontent.com/u/1020496?v=3","gravatar_id":"","url":"https://api.github.com/users/jorisvandenbossche","html_url":"https://github.com/jorisvandenbossche","followers_url":"https://api.github.com/users/jorisvandenbossche/followers","following_url":"https://api.github.com/users/jorisvandenbossche/following{/other_user}","gists_url":"https://api.github.com/users/jorisvandenbossche/gists{/gist_id}","starred_url":"https://api.github.com/users/jorisvandenbossche/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jorisvandenbossche/subscriptions","organizations_url":"https://api.github.com/users/jorisvandenbossche/orgs","repos_url":"https://api.github.com/users/jorisvandenbossche/repos","events_url":"https://api.github.com/users/jorisvandenbossche/events{/privacy}","received_events_url":"https://api.github.com/users/jorisvandenbossche/received_events","type":"User","site_admin":false},"created_at":"2015-05-05T22:38:12Z","updated_at":"2015-05-05T22:38:12Z","body":"Furthermore, the CategoricalIndex is not following the `max_seq_items` as the other indices?\r\n\r\nWith the PR:\r\n\r\n```\r\nIn [34]: pd.CategoricalIndex(np.random.randint(0,5,size=100),name='foo')\r\nOut[34]:\r\nCategoricalIndex([3, 3, 4, 2, 2, 0, 3, 4, 0, 1, 1, 3, 2, 4, 2, 2, 2, 0, 4, 3, 4,\r\n 1, 0, 4, 0, 0, 3, 3, 4, 1, 2, 4, 3, 1, 0, 1, 0, 2, 0, 2, 0, 3, 0, 1, 3, 1, 3, 0\r\n, 2, 4, 3, 1, 1, 0, 0, 3, 0, 3, 2, 3, 1, 4, 1, 3, 2, 2, 0, 0, 1, 1, 1, 1, 0, 4,\r\n3, 1, 3, 0, 3, 1, 4, 4, 4, 4, 3, 3, 1, 2, 4, 3, 1, 3, 0, 2, 2, 2, 0, 4, 1, 1],\r\n                 categories=[0, 1, 2, 3, 4],\r\n                 ordered=False,\r\n                 name=u'foo',\r\n                 dtype='category')\r\n```"}}