This is my current Dataset:
list={<|"nTk"->"6T6","Order"->24,"Attributes"->{},"Name"->"A4*C2","PermutationGroupRepresentation"->PermutationGroup[{Cycles[{{3,6}}],Cycles[{{1,3,5},{2,4,6}}]}],"Generators"->{Cycles[{{3,6}}],Cycles[{{1,3,5},{2,4,6}}]},"CycleTypes"->{{},{2},{6},{2,2},{3,3},{2,2,2}}|>,<|"nTk"->"6T7","Order"->24,"Attributes"->{"InAn"},"Name"->"S4(a)","PermutationGroupRepresentation"->PermutationGroup[{Cycles[{{1,4},{2,5}}],Cycles[{{1,3,5},{2,4,6}}],Cycles[{{1,5},{2,4}}]}],"Generators"->{Cycles[{{1,4},{2,5}}],Cycles[{{1,3,5},{2,4,6}}],Cycles[{{1,5},{2,4}}]},"CycleTypes"->{{},{2,2},{2,4},{3,3}}|>,<|"nTk"->"6T8","Order"->24,"Attributes"->{},"Name"->"S4(b)","PermutationGroupRepresentation"->PermutationGroup[{Cycles[{{1,4},{2,5}}],Cycles[{{1,3,5},{2,4,6}}],Cycles[{{1,5},{2,4},{3,6}}]}],"Generators"->{Cycles[{{1,4},{2,5}}],Cycles[{{1,3,5},{2,4,6}}],Cycles[{{1,5},{2,4},{3,6}}]},"CycleTypes"->{{},{4},{2,2},{3,3},{2,2,2}}|>,<|"nTk"->"6T9","Order"->36,"Attributes"->{},"Name"->"S3*S3","PermutationGroupRepresentation"->PermutationGroup[{Cycles[{{2,4,6}}],Cycles[{{1,5},{2,4}}],Cycles[{{1,4},{2,5},{3,6}}]}],"Generators"->{Cycles[{{2,4,6}}],Cycles[{{1,5},{2,4}}],Cycles[{{1,4},{2,5},{3,6}}]},"CycleTypes"->{{},{3},{6},{2,2},{3,3},{2,2,2}}|>,<|"nTk"->"6T10","Order"->36,"Attributes"->{"InAn"},"Name"->"F36","PermutationGroupRepresentation"->PermutationGroup[{Cycles[{{2,4,6}}],Cycles[{{1,5},{2,4}}],Cycles[{{1,4,5,2},{3,6}}]}],"Generators"->{Cycles[{{2,4,6}}],Cycles[{{1,5},{2,4}}],Cycles[{{1,4,5,2},{3,6}}]},"CycleTypes"->{{},{3},{2,2},{2,4},{3,3}}|>};
ds=Dataset[list]
Currently, the first row of my table is very wide because of the "CycleTypes" field, since it is a list structure. Only one element is shown in the first row, but it stretches every row to be wide. Of course, I know that using something like:
ds[All, {"CycleTypes" -> (Row[#, ","] &)}]
can make the contents of the "CycleTypes" field display horizontally, which is indeed the style I want. However, the problem is that (Row[#, ","] &) breaks the actual content of this field, making those lists unusable for subsequent computations, so I don’t want to use this solution.
In other words, I don’t want to change the content of the Dataset; I only want the "CycleTypes" field to display horizontally instead of vertically. I suspect that ItemDisplayFunction could achieve this, but after trying for quite a while, I still don’t know how to implement it.


ItemDisplayFunctiondecides that the deepest level of the dataset, even when"CycleTypes"is specified as the position is the non-empty lists and completely ignores the empty list.Itemclearly only specifies this deepest level. You might be able to fight the type system identification with theDataset`*functions or you can wrap"CycleTypes"in afiniteGroupCycleTypeshead that won't be unwrapped. Then"CycleTypes" -> (Row[#[[1]], ","] &)works just fine. This has the side effect being semantically more clear as you write functions to act on this data $\endgroup$ds[All, {"CycleTypes" -> (Row[#, ","] &)}]. The original ds is not accessible to the user. $\endgroup$