great-tables icon indicating copy to clipboard operation
great-tables copied to clipboard

Setting groupname_col drops the group col, unless you set rowname_col

Open machow opened this issue 2 years ago • 3 comments

If you set the groupname_col= arg of GT by itself, you should see grouping rows in the data. Instead, the group column gets dropped. If you set groupname_col and rowname_col, the groupings appear as expected.

from great_tables import GT, exibble

GT(exibble, groupname_col="group")

Here is the output (via vs code notebook)

image
GT(exibble, groupname_col="group", rowname_col="char")
image

machow avatar Jan 05 '24 15:01 machow

Here's matching R code for reference

gt(mtcars, groupname_col=cyl)
image

(note that the image is truncated, since the table has many rows)

machow avatar Jan 08 '24 14:01 machow

Let's raise a NotImplementedError for now

machow avatar Apr 29 '24 18:04 machow