-
Notifications
You must be signed in to change notification settings - Fork 265
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Displaying Styled Dataframes Inline #49
Comments
I know that to apply CSS in any email, it cannot be Also, I think you do not want inline... Try it without using E.g.: If you can apply CSS onto this HTML, that's what you probably need. You might want to consider stripping |
Thanks. Python has a built-in html escaper which can be applied to a styled/rendered html object like
You can then pass This function sends an email which begins with the appropriate |
Just in case it wasn't clear: it is email that does not allow |
Hi, I have such similar question. But |
like kootenpv wrote - seems like the problem is that style tags are not inline |
Just throwing it out there, this is now also possible:
Closing, but feel free to open. |
Hi - thanks for building this module.
Pandas 0.18 includes a style attribute that makes dataframes pretty. When rendered in html for inclusion in an email using render, the dataframe is nicely displayed inline as html and can be saved to an html file on the local path.
yagmail is able to send an email form a notebook, but the resulting message body contains degraded versions of the html dataframe rendering, irrespective of the method with which it was added to the yagmail code.
Code below shows an example of a styled dataframe which looks nice in a notebook. It is then converted to html and attempts are made to embed the html in-line with fidelity to the original styling. All attempts fail.
When df_styled_html is passed, we get a CSS string in the body of the email. Perhaps the email code is not appplying CSS styules to the dataframe natively?
Thanks.
The text was updated successfully, but these errors were encountered: