English 中文(简体)
Cell Magic Functions
  • 时间:2024-12-22

Jupyter Notebook - Cell Magic Functions


Previous Page Next Page  

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

%%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