Code
# Example variables
x = 5
y = "Hello"
z = [1, 2, 3]
# These appear in the Variables panePositron Basics: Variables Pane, Magic Commands, and Shortcuts
https://workbench-1.bren.ucsb.edu and log in.Positron has two separate settings, and both need to read eds217_2026:
| Setting | Where it is | What it controls |
|---|---|---|
| Interpreter | Dropdown in the top right corner | The Console |
| Kernel | Kernel Selector in a notebookβs action bar | That one notebook |
Switching the interpreter shuts down the running one and starts the new one, so every variable you had defined is cleared. Choose it before you start working.
To change a notebookβs kernel from the keyboard, open the Command Palette (Ctrl + Shift + P or Cmd + Shift + P) and run Positron Notebook: Change Kernel.
Positron shows your variables in the Variables pane on the right. Nothing needs to be installed, and the pane updates as you run cells. It shows:
Click a DataFrame in the Variables pane to open it in the Data Explorer, a sortable and filterable table view. This is the fastest way to look at a dataset you have just loaded.
The Variables pane is not suitable for very large DataFrames or arrays. Use the standard commands df.head(), df.tail(), df.info(), and df.describe() to inspect large DataFrames.
Magic commands start with % (line magics) or %% (cell magics). They come from IPython, which is the Python kernel your notebooks run on, so they work in any editor that runs notebooks. Available magic commands vary with your environment and installed extensions.
Hello from the shell!
['bar_plots.qmd', 'chart_customization.qmd', 'comprehensions.qmd', 'control_flows.qmd', 'data_cleaning.qmd', 'data_grouping.qmd', 'data_merging.qmd', 'data_selection.qmd', 'dictionaries.qmd', 'first_steps.qmd', 'functions.qmd', 'lists.qmd', 'matplotlib_cheatsheet.pdf', 'matplotlib.qmd', 'numpy.qmd', 'Pandas_Cheat_Sheet.pdf', 'pandas_dataframes.qmd', 'pandas_series.qmd', 'positron.qmd', 'positron.quarto_ipynb', 'print.qmd', 'read_csv.qmd', 'seaborn.qmd', 'sets.qmd', 'setting_up_python.qmd', 'timeseries.qmd', 'workflow_methods.qmd']
Positronβs shortcuts are, with a few exceptions, a superset of the Visual Studio Code shortcuts.
| Action | Windows/Linux | Mac |
|---|---|---|
| Run cell and select below | Shift + Enter | Shift + Enter |
| Run cell and stay put | Ctrl + Enter | Cmd + Enter |
| Save notebook | Ctrl + S | Cmd + S |
| Command Palette | Ctrl + Shift + P | Cmd + Shift + P |
| Action | Windows/Linux | Mac |
|---|---|---|
| Run the current line or selection | Ctrl + Enter | Cmd + Enter |
| Contextual help for the name under the cursor | F1 | F1 |
| Clear the Console | Ctrl + L | Ctrl + L |
| Command Palette | Ctrl + Shift + P | Cmd + Shift + P |
Every command Positron knows is in the Command Palette, and the palette shows the shortcut next to each command. When you cannot remember a shortcut, search the palette for the action by name.
Tab for code completion.? after a function name for more detailed help (for example, print?).F1 with your cursor on a name to open its documentation in the Help pane.dir() to see available attributes and methods (for example, dir(str)).help() command to get information about functions and objects.