cancel
Showing results forย 
Search instead forย 
Did you mean:ย 
Warehousing & Analytics
Engage in discussions on data warehousing, analytics, and BI solutions within the Databricks Community. Share insights, tips, and best practices for leveraging data for informed decision-making.
cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

How to collapse class' methods by default?

thales_campolim
New Contributor II

I have built a class which is already over 2.5k code lines.
It is extremelly painfull have to scroll a lot once you need something you know it on the bottom. 

I have looked after a solution to set the collapse as a default but could not find.

Has anyone found any solution for this?

3 REPLIES 3

SP_6721
New Contributor III

Hi @thales_campolim 
Just to clarify, are you referring to working in Databricks, or is this in another IDE or code editor?

hey,
Yes, I am working directly on Databricks notebook.

It seems like, Databricks notebooks currently do not offer a built in way to collapse all cells.

But you can manually collapse cells, you click on the little triangle on the left of a cell, it collapses that block.

Also, you can split the large class into smaller modules and save them as .py files. Then import them into your notebook using %run or through Databricks Repos if you are working with Git.

Join Us as a Local Community Builder!

Passionate about hosting events and connecting people? Help us grow a vibrant local communityโ€”sign up today to get started!

Sign Up Now