You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently it is only possible to specify justify settings for column headers. This would extremely useful when used in conjunction with IPython Notebook.
yes...but how to you specify to the function that you want to do this? there are other options in html as well (color e.g., that we may want to support in the future). Looking for a general API to pass output-formatting options. Which might be as simple as allowing column_label_formatter, row_label_formatter, cell_formatter as passed functions?
It think pretty easy to pass a style=Formatter() where formatter is class that we define as a base class and advanced could sub-class. the engines then call out to format rows,columns,cells....
API: Would it be useful for everyone if DataFrame.to_html (and to_string) had an argument to specify justify settings for each column? · Issue #4315 · pandas-dev/pandas
Activity
cpcloud commentedon Jul 22, 2013
i like this idea. want to submit a pr?
jreback commentedon Jul 22, 2013
is there a standard way of doing this, e.g.
justify = [('foo','left'),('bar','right')]
or
justify_left = ['foo'], justify_right = ['bar']
or
style = dict(justify_left = ['foo'], justify_right = ['bar'])
?
cpcloud commentedon Jul 22, 2013
@jreback i don't know. u don't think this is output-formatting tag material?
jreback commentedon Jul 22, 2013
yes...but how to you specify to the function that you want to do this? there are other options in html as well (color e.g., that we may want to support in the future). Looking for a general API to pass
output-formatting
options. Which might be as simple as allowingcolumn_label_formatter, row_label_formatter, cell_formatter
as passed functions?cpcloud commentedon Jul 22, 2013
related #3190
cpcloud commentedon Jul 22, 2013
but #3190 is long term and would require a significant time investment
jreback commentedon Jul 22, 2013
It think pretty easy to pass a
style=Formatter()
where formatter is class that we define as a base class and advanced could sub-class. the engines then call out to format rows,columns,cells....but agreed prob a bit of work to do correctly
cpcloud commentedon Jul 22, 2013
someone could write a package and call it
framer
orframed
to do this....cpcloud commentedon Jul 22, 2013
Formatter
would work tho, while we don't haveframed
jreback commentedon Jul 22, 2013
or maybe
Style
jreback commentedon Jul 22, 2013
and
HTMLStyle
,TextStyle
.....9 remaining items