Package
A package is a bundle of code someone else wrote that you install to give Python new tools. pandas and Altair are packages.
Python comes with the basics. Reading tables, drawing charts and almost everything else arrive as packages you install with pip, Python's installer. In a notebook:
%pip install altair pandasThe %pip form installs into the same Python the notebook runs, so the next import finds what you installed. You install a package once per environment, and you import it in every new session.
R users know this pair as install.packages() and library(). Stata users know it as ssc install.
Learn more
Related terms
- Virtual environment
A virtual environment is a private set of Python packages for one project. What you install there stays there, so each project keeps the versions it needs.
- pandas
pandas is a Python package for working with tables of data, called DataFrames: loading them, filtering rows, picking columns and summarizing them.
- Altair
Altair (Vega-Altair) is a Python package for making charts by describing them: you say which column goes on each axis, color or size, and it writes the Vega-Lite that draws the chart.