Manual: Import Paths and Structure
Import Paths and Structure
We offer two ways of importing functions and classes from statsmodels:
-
API import for interactive use
- Allows tab completion
-
Direct import for programs
- Avoids importing unnecessary modules and commands
API Import for interactive use
For interactive use the recommended import is:
import statsmodels.api as sm
Importing statsmodels.api
will load most of the public parts of statsmodels. This makes most functions and classes conveniently available within one or two levels, without making the “sm” namespace too crowded.
To see what functions and classes available