1. Learn
  2. /
  3. Courses
  4. /
  5. Introduction to Data Science in Python

Connected

Exercise

Importing Python modules

Modules (sometimes called packages or libraries) help group together related sets of tools in Python. In this exercise, we'll examine two modules that are frequently used by Data Scientists:

  1. statsmodels: used in machine learning; usually aliased as sm
  2. seaborn: a visualization library; usually aliased as sns

Note that each module has a standard alias, which allows you to access the tools inside of the module without typing as many characters. For example, aliasing lets us shorten seaborn.scatterplot() to sns.scatterplot().

Instructions 1/3

undefined XP
  • 1
    • In the script editor, use an import statement to import statsmodels without an alias.
  • 2
    • Add an as statement to alias statsmodels to sm.
  • 3
    • Add an as statement to alias seaborn to sns.