Skip to content

Commit 0b094b2

Browse files
author
y-p
committed
ENH: Make pprint_nest_depth settable via print_setoptions, update docstring.
1 parent 1d78502 commit 0b094b2

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

pandas/core/format.py

+7-1
Original file line numberDiff line numberDiff line change
@@ -941,7 +941,7 @@ def set_printoptions(precision=None, column_space=None, max_rows=None,
941941
max_columns=None, colheader_justify=None,
942942
max_colwidth=None, notebook_repr_html=None,
943943
date_dayfirst=None, date_yearfirst=None,
944-
multi_sparse=None, encoding=None):
944+
pprint_nest_depth=None,multi_sparse=None, encoding=None):
945945
"""
946946
Alter default behavior of DataFrame.toString
947947
@@ -965,6 +965,10 @@ def set_printoptions(precision=None, column_space=None, max_rows=None,
965965
When True, prints and parses dates with the day first, eg 20/01/2005
966966
date_yearfirst : boolean
967967
When True, prints and parses dates with the year first, eg 2005/01/20
968+
pprint_nest_depth : int
969+
Defaults to 3.
970+
Controls the number of nested levels to process when pretty-printing
971+
nested sequences.
968972
multi_sparse : boolean
969973
Default True, "sparsify" MultiIndex display (don't display repeated
970974
elements in outer levels within groups)
@@ -987,6 +991,8 @@ def set_printoptions(precision=None, column_space=None, max_rows=None,
987991
print_config.date_dayfirst = date_dayfirst
988992
if date_yearfirst is not None:
989993
print_config.date_yearfirst = date_yearfirst
994+
if pprint_nest_depth is not None:
995+
print_config.pprint_nest_depth = pprint_nest_depth
990996
if multi_sparse is not None:
991997
print_config.multi_sparse = multi_sparse
992998
if encoding is not None:

0 commit comments

Comments
 (0)