Switching Kernels in Notebook

Can you switch kernels in the middle of a Notebook session, and if so, what happens to your code?

Hi @nivethitha.ponnambal, you can switch kernels in the middle of a Jupyter Notebook session. However, what happens to your code depends on the programming language of the kernels you are switching between.

when switching kernels in a Jupyter Notebook session, the availability of libraries can impact your code as well. Different kernels may have different versions of the same libraries or may not have certain libraries installed at all.

For example, if you switch from a Python kernel that has the Pandas library installed to a Python kernel that does not have Pandas installed, any code that uses Pandas will not work in the new kernel.

Furthermore, even if both kernels have the same libraries installed, they may have different versions of those libraries. This can lead to differences in behavior or unexpected errors.