File tree 1 file changed +4
-5
lines changed
1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -1237,7 +1237,7 @@ def format(
1237
1237
na_rep : Optional [str ] = None ,
1238
1238
names : bool = False ,
1239
1239
space : int = 2 ,
1240
- sparsify : Optional [ bool ] = None ,
1240
+ sparsify = None ,
1241
1241
adjoin : bool = True ,
1242
1242
) -> list :
1243
1243
if name is not None :
@@ -1288,10 +1288,9 @@ def format(
1288
1288
1289
1289
if sparsify :
1290
1290
sentinel = ""
1291
- # GH3547
1292
- # use value of sparsify as sentinel, unless it's an obvious
1293
- # "Truthy" value
1294
- if sparsify not in [True , 1 ]:
1291
+ # GH3547 use value of sparsify as sentinel if it's "Falsey"
1292
+ assert isinstance (sparsify , bool ) or sparsify is lib .no_default
1293
+ if sparsify in [False , lib .no_default ]:
1295
1294
sentinel = sparsify
1296
1295
# little bit of a kludge job for #1217
1297
1296
result_levels = _sparsify (
You can’t perform that action at this time.
0 commit comments