DOC: "justify" parameter in to_html · Issue #17527 · pandas-dev/pandas (original) (raw)

Skip to content

Provide feedback

Saved searches

Use saved searches to filter your results more quickly

Sign up

Appearance settings

@gfyoung

Description

@gfyoung

The Travis docs for to_html states that the only accepted parameters for justify are left and right.

However, I stumbled upon the fact that you can also pass in center, and it will work just fine (i.e. the cell elements and headers are centered), as evidenced by the code:

style = "text-align: {just};".format(just=self.fmt.justify)
row.extend([single_column_table(c, self.fmt.justify, style)
for c in self.columns])

@TomAugspurger : Should we continue to allow only left and right or should we expand to accept center ? I'm personally up for the latter but wanted to get consensus first.