Unlike in a Jupyter notebook where cells execute top-to-bottom, in Count your Python cells execute in DAG order, just like SQL cells.
When opening a canvas containing Python cells, Count will:
Analyse all of the Python code and look for variable definitions and references.
Draw arrows between cells if we’ve detected that variables defined in one cell are referenced in another.
Download all of the imported modules and perform all of the imports.
Perhaps wait for any SQL cells to finish executing if any Python cells depend on them.
Execute the Python cells in order based on which variables they define.
--
For more information on Python in Count, check out our docs.