LazyModule#
- class LazyModule(module, variable, namespace=None, overwrite=True)[source]#
Bases:
object
Create a “lazy” module that is loaded if and only if an attribute is called.
Typically not for use by the user, but is used by
sc.importbyname()
.- Parameters:
Example:
pd = sc.LazyModule('pandas', 'pd') # pd is a LazyModule, not actually pandas df = pd.DataFrame() # Not only does this work, but pd is now actually pandas
New in version 2.0.0.
Methods