Skip to content

Commit 600cb57

Browse files
author
y-p
committed
ENH: set display.max_seq_items default != None
1 parent 8ce7687 commit 600cb57

File tree

4 files changed

+7
-4
lines changed

4 files changed

+7
-4
lines changed

doc/source/release.rst

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

doc/source/v0.13.0.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,8 @@ These were announced changes in 0.12 or prior that are taking effect as of 0.13.
147147
- Remove deprecated ``_verbose_info`` (:issue:`3215`)
148148
- Remove deprecated ``read_clipboard/to_clipboard/ExcelFile/ExcelWriter`` from ``pandas.io.parsers`` (:issue:`3717`)
149149
- default for ``tupleize_cols`` is now ``False`` for both ``to_csv`` and ``read_csv``. Fair warning in 0.12 (:issue:`3604`)
150+
- default for `display.max_seq_len` is now 100 rather then `None`. This activates
151+
truncated display ("...") of long sequences in various places. (:issue:`3391`)
150152

151153
Deprecations
152154
~~~~~~~~~~~~

pandas/core/config_init.py

Lines changed: 1 addition & 1 deletion
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

Lines changed: 2 additions & 3 deletions
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)