cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
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...

Welcome to Databricks Community: Lets learn, network and celebrate together

Join our fast-growing data practitioner and expert community of 80K+ members, ready to discover, help and collaborate together while making meaningful connections. 

Click here to register and join today! 

Engage in exciting technical discussions, join a group with your peers and meet our Featured Members.