Cell Magic Functions


Jupyter Notebook – Cell Magic Functions


”;


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

%%html

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

%%writefile

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

Write File

Advertisements

”;

Leave a Reply

Your email address will not be published. Required fields are marked *