Skip to content
Advertisement

Differrence between install and import in Jupyterlab Notebooks

What is the difference between the install statement and the import statement in Jupyterlab Notebooks?

!pip install xlrd


import pandas as pd

Why can’t we say !pip install pandas or import xlrd for example?

[Screenshot of my notebook : https://i.stack.imgur.com/IxNjA.png ]

Advertisement

Answer

The install command is used to install a python library. In your case you have already installed xlrd, hence the output Requirement already satisfied.

The import command is used to import an already existing library to your code. Basically it tells python to use this library in your program.

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement