pandas 1.4.2

Parameters
import_optional_dependency(name: 'str', extra: 'str' = '', errors: 'str' = 'raise', min_version: 'str | None' = None)

By default, if a dependency is missing an ImportError with a nice message will be raised. If a dependency is present, but too old, we raise.

Parameters

name : str

The module name.

extra : str

Additional text to include in the ImportError message.

errors : str {'raise', 'warn', 'ignore'}

What to do when a dependency is not found or its version is too old.

min_version : str, default None

Specify a minimum version that is different from the global pandas minimum version required.

Returns :
------- :
maybe_module : Optional[ModuleType]

The imported module, when found and the version is correct. None is returned when the package is not found and errors is False, or when the package's version is too old and errors is 'warn' .

Import an optional dependency.

Examples

See :

Local connectivity graph

Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.

Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)

SVG is more flexible but power hungry; and does not scale well to 50 + nodes.

All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them


File: /pandas/compat/_optional.py#87
type: <class 'function'>
Commit: