Mathematica 11.3.0.0 Windows 10 64
This may be a silly question, but I bang my head against this cumbersome feature.
Can anybody explain where the "None " in the following output comes from (and eventually how to eliminate it):
Input:
TableForm[{{1, {1, 1}}, {2, {2, 2}}}, TableDirections -> {Row, Column, Column}]
Output ( the periods indicate spaces, otherwise the text formatter of this forum screws up the formatting):
1…2
None…1..2
…1..2
neils
(Neil Singer)
2
Daniel,
I get the same thing. It appears to be a bug to me. This works:
TableForm[Transpose[{{1, {2, 3}}, {4, {5, 6}}}], TableDirections -> Column]
But this fails
TableForm[{{1, {2, 3}}, {4, {5, 6}}}, TableDirections -> Row]
and they should be the same. I would report that to Tech Support.
Regards,
Neil
iwilliams
(Ian Williams)
3
A couple of other possible solutions are:
ls = {{1, {2, 3}}, {4, {5, 6}}, {7, {8, 9}}};
TableForm[Flatten /@ ls, TableDirections -> Row]
Or maybe:
ls = {{1, {2, 3}}, {4, {5, 6}}, {7, {8, 9}}};
TableForm[# /. {a_, b__} -> {a, Column[b]} & /@ ls,
TableDirections -> Row]
Hope this helps,
Ian