Skip to content

Commit b577975

Browse files
Rebecca Jean Hermanastanin
authored andcommitted
minor change to fix issue preventing passing in an interable for showindex
1 parent c576b07 commit b577975

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

tabulate/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1600,7 +1600,7 @@ def _normalize_tabular_data(tabular_data, headers, showindex="default"):
16001600

16011601
# add or remove an index column
16021602
showindex_is_a_str = type(showindex) in [str, bytes]
1603-
if showindex == "default" and index is not None:
1603+
if showindex_is_a_str and showindex == "default" and index is not None:
16041604
rows = _prepend_row_index(rows, index)
16051605
elif isinstance(showindex, Sized) and not showindex_is_a_str:
16061606
rows = _prepend_row_index(rows, list(showindex))

0 commit comments

Comments
 (0)