module documentation
Undocumented
Class | _ |
Module that can act both as a lazy-loader and as a proxy. |
Function | _lazy |
Lazy import the given module; avoids up-front import costs. |
Constant | _PANDAS |
Undocumented |
Constant | _PANDERA |
Undocumented |
Constant | _SENTENCE |
Undocumented |
Lazy import the given module; avoids up-front import costs.
Parameters
- module_name : str
- name of the module to import, eg: "pyarrow".
Notes
If the requested module is not available (eg: has not been installed), a proxy module is created in its place, which raises an exception on any attribute access. This allows for import and use as normal, without requiring explicit guard conditions - if the module is never used, no exception occurs; if it is, then a helpful exception is raised.
Returns
- tuple of (Module, bool)
- A lazy-loading module and a boolean indicating if the requested/underlying module exists (if not, the returned module is a proxy).