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
Emojis can also be implemented by using the emoji module provided in Python. To install it run the following in the terminal. emojize() function requires the CLDR short name to be passed in it as the parameter. It then returns the corresponding emoji.
Press Esc key, type m for markdown cell, press Enter key. The cursor is now in the markdown cell waiting for instructions. Type your code or paste a code block.
Emoji Module: Installation First, we have to open the command prompt terminal shell in the system, and then we have to use the following pip command to install Python Emoji Module through a pip installer: pip install emoji.
To apply the CSS style to all the notebooks, create the file ~/. jupyter/custom/custom. css and add the styles there.
Install emoji package:
pip install emoji --upgrade
then :
import emoji
print(emoji.emojize('Hi there! :revolving_hearts:'))
output:
Hi there! 💞
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With