How does one change font size of text in a Tabulator widget? I’d prefer to change an attribute rather than defining CSS stuff (that I’m not familiar with at this time).
A conversational AI tool gave me this nice example, but it doesn’t actually change the font size:
import panel as pn
import pandas as pd
# Create a sample DataFrame
data = {'Name': ['John', 'Jane', 'Mike'],
'Age': [25, 30, 35]}
df = pd.DataFrame(data)
# Create a Panel Tabulator object
table = pn.widgets.Tabulator(df)
# Set the font size for the table cells
table.style_cell = {'font-size': '16px'} # Change the font size to your desired value
# Display the table
table.show()
In the end, I’m really trying to create a much more-compact table of information (think Excel-style). Any suggestions, besides changing font size, would be welcome. The best I’ve done so far is to use theme='bootstrap5', theme_classes=['table-sm']
.