[Pandas-dev] DataFrame.to_html()

Aaron Elmquist elmq0022 at umn.edu
Sat Dec 15 19:57:52 EST 2018


Drew,

I am not a core Dev, but I think this link might help.

    https://pandas.pydata.org/pandas-docs/stable/style.html

Looks like DatsFrame.styles.apply or DataFrame.style.applymap will let you
set css attributes and values in a very powerful way.

I have not tried this, so let me know if it helps or not.

Best,
Aaron



On Sat, Dec 15, 2018, 9:54 AM Aschenbrener, Drew <drew.asch at ufl.edu wrote:

> Hi Devs,
>
>
>
> I’m an entry level developer with University of Florida.
>
>
>
> I’ve spent several hours on stack-overflow and other forums, and it seems
> that something that pandas could easily handle is made extremely difficult.
> I may not have the full context of the decisions made, but maybe you could
> help me understand.
>
>
>
> ‘DataFrame.to_html’ does not provide any basic formatting options.
> Everywhere I’ve researched, the most simple solutions involve installing
> other packages in order to add various stylers. This seems excessive when
> you are trying to do something as simple as align a single column of data.
> I have one column of text and one column of numbers (defaults all to left
> align), I simply want to change the alignment of a single column, and the
> amount of work it takes to make that happen seems excessive. You provide
> table formatters, and the ability to justify labels, it seems a small step
> to provide the ability to justify specified columns.
>
>
>
> Is there something I am missing? I’ve been using python awhile, but I’m
> relatively new to pandas.
>
>
>
> - Drew
>
>
>
> *Andrew (Drew) Aschenbrener*
>
> IT Analyst | UF – Identity Services | (352) 273-1395 |
> Identity-Services at it.ufl.edu
>
>
> _______________________________________________
> Pandas-dev mailing list
> Pandas-dev at python.org
> https://mail.python.org/mailman/listinfo/pandas-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/pandas-dev/attachments/20181215/339fc5a7/attachment.html>


More information about the Pandas-dev mailing list