Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the purpose of the IPython.display.display_markdown() function?

I frequently need to produce Markdown formatted output in Jupyter notebook. The way I do it is:

from IPython.display import display, Markdown
display(Markdown('# This is a Title'))

This will produce a beautiful formatted output. However there also exists a function called display_markdown() that I would expect to do the same. But apparently it doesn't do anything at all. What is it supposed to do?

like image 317
MrLeeh Avatar asked Mar 31 '17 06:03

MrLeeh


People also ask

What is the use of IPython display?

IPython provides the following features: Interactive shells (terminal and Qt-based). A browser-based notebook interface with support for code, text, mathematical expressions, inline plots and other media. Support for interactive data visualization and use of GUI toolkits.

What does Display () do in Python?

show command displays the form within the window that is running the Python script. (See this command used in the Basic Display example below.)

What is the role of a markdown cell in a Jupyter Notebook?

Markdown cell displays text which can be formatted using markdown language. In order to enter a text which should not be treated as code by Notebook server, it must be first converted as markdown cell either from cell menu or by using keyboard shortcut M while in command mode.

What is a markdown file in Jupyter lab?

Markdown is a simple and popular markup language used for text cells in the Jupyter Notebook. Markdown documents can be edited as text files or rendered inline: Jupyter / IPython.


1 Answers

You need to set raw=True since it is a raw markdown:

enter image description here

like image 51
AKS Avatar answered Oct 13 '22 11:10

AKS