import IPython IPython.Application.instance().kernel.do_shutdown(True)
#automatically restarts kernel
Worked for me
https://stackoverflow.com/questions/37751120/restart-ipython-kernel-with-a-command-from-a-cell
*** . *** *** . *** . *** . ***
Courses: http://Training.SitesTree.com (Big Data, Cloud, Security, Machine Learning)
Blog: http://Bangla.SaLearningSchool.com, http://SitesTree.com
8112223 Canada Inc./JustEtc: http://JustEtc.net
Shop Online: https://www.ShopForSoul.com/
Linkedin: https://ca.linkedin.com/in/sayedjustetc