Controlling the look and feel of the table (cell width, height, text display, and more)
There are numerous options available to modify how your tables look, and it's always good to consult the documentation for ideas and solutions. The potentially tricky part is when you have combinations of options. In some cases, these might modify each other and not be displayed exactly the way you want. So, it is always good to isolate the options as much as possible when debugging.
In Figure 8.13, we displayed only three columns and the first few rows. We will now see how to display more columns and enable users to explore more rows:
- Modify
df
to include all columns that containIncome share
:df = poverty[poverty['year'].eq(2000)&poverty['is_country']].filter(regex='Country Name|Income share')
- Place the DataTable in a
dbc.Col
component with the desired width,7
in this case. The table automatically takes the width of the container it is in,...