importing emoji codes into jupyter notebooks
Asked Answered
M

2

11

Jupyter notebooks support markdown cells however it doesn't seem to support emoji codes. I suppose one way might be using html to import icons like fontawesome

Anyone have a workaround?

Edit: asked directly on the jupyter Github #2199

Mcfarlane answered 16/2, 2017 at 16:13 Comment(3)
You can already use emojis in markdown - just copy and paste them in☺️.Wobbly
Visit getemoji.com, copy any of the emoji of your choice and paste in MARKDOWN cell of Jupyter Notebook. It will work.Thistledown
Looks like does not supports: :warn: etc.Palstave
V
7

Install emoji package:

pip install emoji --upgrade

then :

import emoji
print(emoji.emojize('Hi there! :revolving_hearts:'))

output:

Hi there!  💞
Verisimilar answered 26/2, 2017 at 19:0 Comment(1)
Note that this only works in code cells, not MarkdownMcfarlane
S
6

If you want to use colored emojis in Markdown just copy the hexadecimal representation into the Markdown cell.

For instance, for 😀 (grinning face) use 😀

Slog answered 16/12, 2022 at 8:55 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.