Advika_
Databricks Employee
Databricks Employee

Hello @Yuki!

Your preference for .py is valid, as it simplifies code reviews with cleaner diffs. On the other hand, .ipynb is better suited for interactive workflows since its cell-based execution allows incremental testing and supports inline graphs, tables, and Markdown for better visualization. The main risks with .ipynb include its dependency on Jupyter or Databricks to run and the possibility of state errors if cells are executed out of order.

For structured and code-centric projects, .py is the better choice, while .ipynb proves to be more effective for exploratory analysis.

View solution in original post