Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Change the default language for databricks notebook

I have a Scala notebook, but now I want the default programming language for a new cell to be Python instead. Is it possible to change the notebook in that way (preferably, in a way that doesn't require manual changing of each of the existing cells)? Thanks

like image 630
information_interchange Avatar asked Sep 03 '25 06:09

information_interchange


1 Answers

You can change the default language of a Notebook by selecting File -> Change default cell language.

enter image description here

See also Set default language

As mentioned in other comments, it is possible to change the language of a single cell by using so called magic commands: %<language>

See also Mixed languages.

But they have some disadvantages e.g. you can't share variables between the different languages you use.

like image 102
ice1e0 Avatar answered Sep 04 '25 20:09

ice1e0