Why is the ipynb format recommended?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
In this document, https://docs.databricks.com/aws/en/notebooks/notebook-format,
Jupyter (.ipynb) format is recommended.
> Select File from the workspace menu, select Notebook format, and choose the format you want. You can choose either Jupyter (.ipynb) (Recommended) or Source (.scala, .py, .sql, .r). The notebook’s current format is greyed out and has a checkmark next to it.
However, I prefer the .py format due to the simplicity it offers for code reviews.
What are the benefits or risks of using .ipynb compared to .py?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi @Advika_ ,
Thank you for the clear answer.
It made perfect sense to me, and I found that my understanding was correct as well.
Knowing that there are clear cases where the .py format is better is reassuring for me.
Thank you so much for your prompt reply.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi @Yuki,
One other risk that we foresee / encountered recently is how the notebooks will look in your pull requests of external repos (Azure Devops or GitHub). It will be very hard for a pull request reviewer to understand on the code / notebook readability.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
I've run up against this recently too, it's worth mentioning that saving serverless environment settings isn't supported on Python file backed Notebooks, so for some customers it may be a choice between ease of code reviews or using serverless as a product. I'm hoping the likes of Azure DevOps support diffs in with ipynb files in the future!

