Python
Bindings: %python, %python.ipython, %python.sql, %python.conda, %python.docker
Runs Python code. %python is the general-purpose binding; the others cover more specific workflows:
| Binding | Use it for |
|---|---|
%python | Regular Python scripts |
%python.ipython | An interactive IPython shell (better completion and magics) |
%python.sql | Running SQL directly over pandas DataFrames |
%python.conda | Running Python inside a named Conda environment |
%python.docker | Running Python inside an isolated Docker container |
%python
import pandas as pd
df = pd.read_csv("/data/sales.csv")
ssnc.show(df.head(20))
Configuration
| Property | Default | Description |
|---|---|---|
skeyenote.python | python | Path to the Python binary executable to use. |
skeyenote.python.maxResult | 1000 | Max number of DataFrame rows to display in a result. |
skeyenote.python.useIPython | true | Whether %python transparently uses IPython when it's available. |
These are set by your administrator from the interpreter settings screen — for example to point %python at a specific virtual environment.