如何在pycharm中制作部分

Sey*_*avi 0 python pycharm

我刚刚从R转到Python。在R中,您可以使用

#new section####

to have the 'new section' as title in the script section list. Then, you could easily find that block of script by hitting this title within "Jump to menu" (please see figure). In this figure, the title is "reading data before 2013". 在此处输入图片说明 I have tried to find my answer here https://confluence.jetbrains.com/display/PYH/Code+folding and here https://www.jetbrains.com/help/pycharm/code-folding.html But I am lost in terms folding, class and .... Can you please let me know a simple way to mimic this option in Pycharm?

Dee*_*ace 5

请参阅使用代码折叠注释

对于Python文件:

 #region Description
 ...
 #endregion
Run Code Online (Sandbox Code Playgroud)


Rob*_*ert 2

PyCharm 还允许您设置匿名和标记书签来导航源代码。他们的跳转菜单版本是“收藏夹”窗口,您可以使用“视图”菜单显示该窗口:

查看 --> 工具窗口 --> 收藏夹