Created
April 27, 2022 20:50
-
-
Save data-enhanced/d65bc3eab1d08cb70fefd2860d147b25 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Format using Markdown ================================================ | |
# Format Jupyter Code Output using Markdown | |
# https://ipython.readthedocs.io/en/stable/api/generated/IPython.display.html?highlight=display_markdown#IPython.display.display_markdown | |
from IPython.display import display_markdown | |
markdowntext = 'Markdown Heading Level 3' | |
display_markdown(f'### Code Output Formatted as {markdowntext}', raw=True) | |
display_markdown(f'_Code output italicized using_ `display_markdown`', raw=True) | |
# Format using HTML ================================================ | |
# Format Jupyter Code Output using HTML | |
# https://ipython.readthedocs.io/en/stable/api/generated/IPython.display.html?highlight=display_#IPython.display.display_html | |
from IPython.display import display_html | |
htmltext = 'HTML h3' | |
display_html(f'<h3>{htmltext} Heading + <em>Emphasized</em></h3>', raw=True) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment