Skip to content

Commit 8ce9218

Browse files
committed
update docs/options
1 parent da08394 commit 8ce9218

File tree

2 files changed

+46
-1
lines changed

2 files changed

+46
-1
lines changed

doc/source/whatsnew/v0.16.1.txt

+45
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,51 @@ API changes
7878
the order was arbitrary. (:issue:`9777`)
7979

8080

81+
.. _whatsnew_0161.index_repr:
82+
83+
Index Representation
84+
~~~~~~~~~~~~~~~~~~~~
85+
86+
The string representation of ``Index`` and its sub-classes have now been unified. These are all uniform in their output
87+
formats, except for ``MultiIndex``, which has a multi-line repr. The display width now responds to the option ``display.max_seq_len``,
88+
which is now defaulted to 10 (previously was 100).
89+
90+
Previous Behavior
91+
92+
.. code-block:: python
93+
94+
95+
In [1]: pd.get_option('max_seq_items')
96+
Out[1]: 100
97+
98+
In [2]: pd.Index(range(4),name='foo')
99+
Out[2]: Int64Index([0, 1, 2, 3], dtype='int64')
100+
101+
In [3]: pd.Index(range(104),name='foo')
102+
Out[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')
103+
104+
In [4]: pd.date_range('20130101',periods=4,name='foo',tz='US/Eastern')
105+
Out[4]:
106+
<class 'pandas.tseries.index.DatetimeIndex'>
107+
[2013-01-01 00:00:00-05:00, ..., 2013-01-04 00:00:00-05:00]
108+
Length: 4, Freq: D, Timezone: US/Eastern
109+
110+
In [5]: pd.date_range('20130101',periods=104,name='foo',tz='US/Eastern')
111+
Out[5]:
112+
<class 'pandas.tseries.index.DatetimeIndex'>
113+
[2013-01-01 00:00:00-05:00, ..., 2013-04-14 00:00:00-04:00]
114+
Length: 104, Freq: D, Timezone: US/Eastern
115+
116+
New Behavior
117+
118+
.. ipython:: python
119+
120+
pd.get_option('max_seq_items')
121+
pd.Index(range(4),name='foo')
122+
pd.Index(range(104),name='foo')
123+
pd.date_range('20130101',periods=4,name='foo',tz='US/Eastern')
124+
pd.date_range('20130101',periods=104,name='foo',tz='US/Eastern')
125+
81126
.. _whatsnew_0161.performance:
82127

83128
Performance Improvements

pandas/core/config_init.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ def mpl_style_cb(key):
269269
cf.register_option('show_dimensions', 'truncate', pc_show_dimensions_doc,
270270
validator=is_one_of_factory([True, False, 'truncate']))
271271
cf.register_option('chop_threshold', None, pc_chop_threshold_doc)
272-
cf.register_option('max_seq_items', 100, pc_max_seq_items)
272+
cf.register_option('max_seq_items', 10, pc_max_seq_items)
273273
cf.register_option('mpl_style', None, pc_mpl_style_doc,
274274
validator=is_one_of_factory([None, False, 'default']),
275275
cb=mpl_style_cb)

0 commit comments

Comments
 (0)