cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results for 
Search instead for 
Did you mean: 

Default indentation for Python has changed after migration to the new workspace

Direo
Contributor

In our old workspace default identation was 2 spaces. In our new one it has changed to 4 spaces.

Of course you can manually change it back to 2 spaces as we used to have, but it does not work.

Does anyone know how to solve this issue?

3 REPLIES 3

Direo
Contributor

Found one solution. To change identation in every single old notebook which you gonna chnage by selecting edit-> set Python identation.

Still would be nice to make this change for all notebooks at once.

Prabakar
Esteemed Contributor III
Esteemed Contributor III

setting it for all notebooks won't be possible as the setting is notebook level. Users might have python/scala/sql/R notebook. So if this has to be set for all notebooks then other notebooks might be affected and would end up in error. So having these settings to notebook level is better.

ranged_coop
Valued Contributor II

You do have that option of Settings --> User Settings (Admin Settings ? not sure - I don't have admin access) --> Notebook Settings --> Default indentation for Python cells (in spaces)

This will change the indentation for newer cells, but existing ones, I am not sure.

Maybe someone from databricks can confirm...

On the other hand if it does change, it will be pain considering it will show up as a change in git history and we will have to push everything again ? Not sure...

Join 100K+ Data Experts: Register Now & Grow with Us!

Excited to expand your horizons with us? Click here to Register and begin your journey to success!

Already a member? Login and join your local regional user group! If there isn’t one near you, fill out this form and we’ll create one for you to join!