I was wondering if there is a way to restart the ipython kernel without closing it, like the kernel restart function that exists in the notebook. I tried %reset
%reset
If you have installed Spyder with anaconda, then open Spyder window.
Then Consoles (menu bar) -> Restart Consoles.
or you can use CTRL+. which is a shortcut key to restart the console.