Create sub cell in Spyder
Asked Answered
M

1

16

Is there any workaround to create sub-cells in Spyder?

E.g. I know that with

#%% Cell 1

I can create a new cell.

But is there a way to create a sub-cell which is grouped under the cell as in

# Cell 1.1

?

I have found this discussion which didn't look encouraging. But I wanted to give it a try and ask here.

Marcellemarcellina answered 15/7, 2020 at 8:26 Comment(0)
D
21

As per the post linked, the feature you are asking has been implemented. I just tried it on my Spyder IDE version 4.1.3 and it works by using an increasing number of %. For instance

#%% Section 1
some code

#%%% Sub-Section 1.1
some more code

#%% Section 2
and so on
Donalt answered 15/7, 2020 at 8:35 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.