Jupyter Notebook - Cell Magic Functions

In this chapter, let us understand cell magic functions and their functionalities.


This cell magic function renders contents of code cell as html script.

Html Script

%%js or %%javascript

You can embed javascript code in Jupyter notebook cell with the help of this cell magic command.

Embedding JavaScript code

JavaScript Code Output


Contents of code cell are written to a file using this command.

Write File
Kickstart Your Career

Get certified by completing the course

Get Started