diff --git a/doc/source/release.rst b/doc/source/release.rst index 8ac168e18233f..cb8d745099c1a 100644 --- a/doc/source/release.rst +++ b/doc/source/release.rst @@ -388,6 +388,8 @@ API Changes dates are given (:issue:`5242`) - ``Timestamp`` now supports ``now/today/utcnow`` class methods (:issue:`5339`) + - default for `display.max_seq_len` is now 100 rather then `None`. This activates + truncated display ("...") of long sequences in various places. (:issue:`3391`) - **All** division with ``NDFrame`` - likes is now truedivision, regardless of the future import. You can use ``//`` and ``floordiv`` to do integer division. diff --git a/doc/source/v0.13.0.txt b/doc/source/v0.13.0.txt index 720150015909e..7c0472fc07de5 100644 --- a/doc/source/v0.13.0.txt +++ b/doc/source/v0.13.0.txt @@ -147,6 +147,8 @@ These were announced changes in 0.12 or prior that are taking effect as of 0.13. - Remove deprecated ``_verbose_info`` (:issue:`3215`) - Remove deprecated ``read_clipboard/to_clipboard/ExcelFile/ExcelWriter`` from ``pandas.io.parsers`` (:issue:`3717`) - default for ``tupleize_cols`` is now ``False`` for both ``to_csv`` and ``read_csv``. Fair warning in 0.12 (:issue:`3604`) +- default for `display.max_seq_len` is now 100 rather then `None`. This activates + truncated display ("...") of long sequences in various places. (:issue:`3391`) Deprecations ~~~~~~~~~~~~ diff --git a/pandas/core/config_init.py b/pandas/core/config_init.py index b7ec76522b60c..e4d4ea74ac169 100644 --- a/pandas/core/config_init.py +++ b/pandas/core/config_init.py @@ -246,7 +246,7 @@ def mpl_style_cb(key): validator=is_text) cf.register_option('expand_frame_repr', True, pc_expand_repr_doc) cf.register_option('chop_threshold', None, pc_chop_threshold_doc) - cf.register_option('max_seq_items', None, pc_max_seq_items) + cf.register_option('max_seq_items', 100, pc_max_seq_items) cf.register_option('mpl_style', None, pc_mpl_style_doc, validator=is_one_of_factory([None, False, 'default']), cb=mpl_style_cb) diff --git a/pandas/tests/test_format.py b/pandas/tests/test_format.py index f09becb5befb7..f66c59fade2c1 100644 --- a/pandas/tests/test_format.py +++ b/pandas/tests/test_format.py @@ -141,9 +141,8 @@ def test_repr_chop_threshold(self): def test_repr_obeys_max_seq_limit(self): import pandas.core.common as com - #unlimited - reset_option("display.max_seq_items") - self.assertTrue(len(com.pprint_thing(lrange(1000)))> 2000) + with option_context("display.max_seq_items",2000): + self.assertTrue(len(com.pprint_thing(lrange(1000))) > 1000) with option_context("display.max_seq_items",5): self.assertTrue(len(com.pprint_thing(lrange(1000)))< 100)