great-tables
great-tables copied to clipboard
Allow for row height setting
trafficstars
Prework
- [ ] Read and abide by the great_tables code of conduct and contributing guidelines.
- [ ] Search for duplicates among the existing issues (both open and closed).
Proposal
It'd be nice if there was a row height setting
Maybe something like
GT(df).tab_style(
style.height(
pl.when(pl.col('col1')==5).then(pl.lit('200px')).otherwise(pl.lit('100px'))
)
)
It would also be nice to be able to set the desired column width. Example GT(df).tab_style( style.width([10, 10, 20]) )
or GT(df).tab_style( style.text(col_width=10), loc.body(columns=df.columns[0]) )
Ha, yeah, for some reason I thought there was a column width setting, I just haven't needed it.
There’s now a cols_width() method available. We’ll have a closer look at how to set row heights though.