Skip to content

Commit

Permalink
sparsify
Browse files Browse the repository at this point in the history
  • Loading branch information
topper-123 committed Jul 7, 2020
1 parent 82616e9 commit ef4732a
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions pandas/core/indexes/multi.py
Original file line number Diff line number Diff line change
Expand Up @@ -1237,7 +1237,7 @@ def format(
na_rep: Optional[str] = None,
names: bool = False,
space: int = 2,
sparsify: Optional[bool] = None,
sparsify = None,
adjoin: bool = True,
) -> list:
if name is not None:
Expand Down Expand Up @@ -1288,10 +1288,9 @@ def format(

if sparsify:
sentinel = ""
# GH3547
# use value of sparsify as sentinel, unless it's an obvious
# "Truthy" value
if sparsify not in [True, 1]:
# GH3547 use value of sparsify as sentinel if it's "Falsey"
assert isinstance(sparsify, bool) or sparsify is lib.no_default
if sparsify in [False, lib.no_default]:
sentinel = sparsify
# little bit of a kludge job for #1217
result_levels = _sparsify(
Expand Down

0 comments on commit ef4732a

Please sign in to comment.