Skip to content

Commit 3c6e418

Browse files
committed
Allow columns to wrap even if they have None values within them.
1 parent 95ae5eb commit 3c6e418

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tabulate/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1529,7 +1529,7 @@ def _wrap_text_to_colwidths(list_of_lists, colwidths, numparses=True):
15291529
# Any future custom formatting of types (such as datetimes)
15301530
# may need to be more explicit than just `str` of the object
15311531
casted_cell = (
1532-
str(cell) if _isnumber(cell) else _type(cell, numparse)(cell)
1532+
'' if cell is None else str(cell) if _isnumber(cell) else _type(cell, numparse)(cell)
15331533
)
15341534
wrapped = [
15351535
"\n".join(wrapper.wrap(line))

0 commit comments

Comments
 (0)