jupyter notebook switch kernels in cell code example
Example: change kernel from a jupyter cell
%%javascript
Jupyter.notebook.session.restart({kernel_name: 'python3'})
%%javascript
Jupyter.notebook.session.restart({kernel_name: 'python3'})