Skip to content

Commit dd859d1

Browse files
author
y-p
committed
Merge pull request #5753 from y-p/PR_max_seq_items
ENH: set display.max_seq_items default != None
2 parents b722ecb + 600cb57 commit dd859d1

File tree

4 files changed

+7
-4
lines changed

4 files changed

+7
-4
lines changed

doc/source/release.rst

+2
Original file line numberDiff line numberDiff line change
@@ -389,6 +389,8 @@ API Changes
389389
dates are given (:issue:`5242`)
390390
- ``Timestamp`` now supports ``now/today/utcnow`` class methods
391391
(:issue:`5339`)
392+
- default for `display.max_seq_len` is now 100 rather then `None`. This activates
393+
truncated display ("...") of long sequences in various places. (:issue:`3391`)
392394
- **All** division with ``NDFrame`` - likes is now truedivision, regardless
393395
of the future import. You can use ``//`` and ``floordiv`` to do integer
394396
division.

doc/source/v0.13.0.txt

+2
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,8 @@ These were announced changes in 0.12 or prior that are taking effect as of 0.13.
163163
- Remove deprecated ``read_clipboard/to_clipboard/ExcelFile/ExcelWriter`` from ``pandas.io.parsers`` (:issue:`3717`)
164164
These are available as functions in the main pandas namespace (e.g. ``pd.read_clipboard``)
165165
- default for ``tupleize_cols`` is now ``False`` for both ``to_csv`` and ``read_csv``. Fair warning in 0.12 (:issue:`3604`)
166+
- default for `display.max_seq_len` is now 100 rather then `None`. This activates
167+
truncated display ("...") of long sequences in various places. (:issue:`3391`)
166168

167169
Deprecations
168170
~~~~~~~~~~~~

pandas/core/config_init.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ def mpl_style_cb(key):
246246
validator=is_text)
247247
cf.register_option('expand_frame_repr', True, pc_expand_repr_doc)
248248
cf.register_option('chop_threshold', None, pc_chop_threshold_doc)
249-
cf.register_option('max_seq_items', None, pc_max_seq_items)
249+
cf.register_option('max_seq_items', 100, pc_max_seq_items)
250250
cf.register_option('mpl_style', None, pc_mpl_style_doc,
251251
validator=is_one_of_factory([None, False, 'default']),
252252
cb=mpl_style_cb)

pandas/tests/test_format.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -141,9 +141,8 @@ def test_repr_chop_threshold(self):
141141
def test_repr_obeys_max_seq_limit(self):
142142
import pandas.core.common as com
143143

144-
#unlimited
145-
reset_option("display.max_seq_items")
146-
self.assertTrue(len(com.pprint_thing(lrange(1000)))> 2000)
144+
with option_context("display.max_seq_items",2000):
145+
self.assertTrue(len(com.pprint_thing(lrange(1000))) > 1000)
147146

148147
with option_context("display.max_seq_items",5):
149148
self.assertTrue(len(com.pprint_thing(lrange(1000)))< 100)

0 commit comments

Comments
 (0)