Python
Run Python code in a block.
Python blocks run Python 3.11 code, with the packages in the block's environment. They show their output directly under the code, as in a Jupyter notebook.
Using results from other blocks
Variables created in a block are available to the blocks connected after it. You don't need to save or reload data between blocks. See Variables, outputs and caching.
Imports
Imports in a block only apply to that block. To make an import available to every block, add it to Global imports.
Tidying code
Use Lint code in the block toolbar, or Shift+Alt+L (Windows) or ⇧+⌥+L (Mac), to tidy a block's code. To tidy every block at once, use Shift+Alt+Ctrl+L or ⇧+⌥+⌘+L.
Running in parallel
To run a Python block many times in parallel, once for each item in a list, use Fleet.
Last updated
Was this helpful?
