# Libraries

## What can a Python cell use?

A Python cell has two things to draw on. The `vistazo` library brings your workspace data in, and
six scientific libraries, installed at fixed versions, do the analysis.

## How does the vistazo library read data?

`vistazo` is available in every cell without an import. It has four calls. Each is awaited and
returns a pandas DataFrame, and top-level `await` works as it does in Jupyter.

```python
prices = await vistazo.call('markets', 'closing_prices', {'symbols': ['AAPL'], 'start_date': '2026-01-02'})
sales  = await vistazo.dataset('q3-sales.csv')
rows   = await vistazo.widget('w_8f2c1d')
conns  = await vistazo.tools()
```

| Call | What it reads |
|---|---|
| `call` | The result of one read-only tool on one of your connections |
| `dataset` | A table from a file you uploaded |
| `widget` | A dashboard widget's rows. It takes no arguments, because the widget already holds them |
| `tools` | Your connections and the read-only tools on each, with their arguments. Use it to find what to pass to `call` |

Every call runs under your own access and reaches only read-only tools. No credential reaches the code
in a cell, so a notebook someone shares with you can never write to one of your sources.

## Which libraries are installed?

Six libraries are installed at fixed versions, and there is no way to add more.

| Library | Version |
|---|---|
| numpy | 2.4.6 |
| pandas | 3.0.2 |
| scipy | 1.18.0 |
| statsmodels | 0.14.6 |
| scikit-learn | 1.8.0 |
| matplotlib | 3.10.8 |

The packages these depend on, such as `dateutil`, `patsy` and `PIL`, import too. pandas is version 3,
and a few APIs moved from version 2, so code copied from an older notebook may need a line changed.

There is no `pip`. Your code runs with no network and none of your files, so `requests`, or `pd.read_csv`
on a path or URL, can't reach your data. Data comes in through the `vistazo` library.
