How to centre and change font colour of pandas dataframe caption?
Question:
Answers:
You can create a dictionary of your preferred caption style:
Styles = [dict(selector = "caption",
props = [("color", "black"),
("text-align", "center")])]
Then set these Styles
in set_table_styles
:
d15N_model = d15N_model.style.set_caption("d15N Model Fixed Effect Statistics").set_table_styles(Styles)
PS you can set other HTML properties such as background-color
, font-size
and font-family
.
You can create a dictionary of your preferred caption style:
Styles = [dict(selector = "caption",
props = [("color", "black"),
("text-align", "center")])]
Then set these Styles
in set_table_styles
:
d15N_model = d15N_model.style.set_caption("d15N Model Fixed Effect Statistics").set_table_styles(Styles)
PS you can set other HTML properties such as background-color
, font-size
and font-family
.