Skip to content Skip to sidebar Skip to footer

How Do I Create A Shortcut To Import Most Used Python Modules?

I am looking for a way to automatically (or as a shortcut) import a set of python modules in a jupyter notebook so that I don't have to import them every time I create a new notebo

Solution 1:

You could have a file frequently_imported_modules.py where you have literally only the imports you use frequently and then import all these in your new script like so:

from frequently_imported_modules import *

Whether this is a good practice? I don't think so.

Post a Comment for "How Do I Create A Shortcut To Import Most Used Python Modules?"