如何在Jupyter Notebook上查看内置函数的文档?

yan*_*yan 5 python ipython-notebook jupyter-notebook

我最近研究了关于发现任何内置的文档python library's内的功能cellJupyter Notebook。有什么建议可以访问文档吗?我知道键盘快捷键是shift + tab,并且shift + tab弹出4次,带有示例的整个文档。我只是想知道除了快捷方式之外的通常方式。

mia*_*t17 5

该文档来自Python代码中的文档字符串。

您可以通过调用help看到它,并且该__doc__属性返回字符串。

以内置filter为例:

# Displays the documentation for filter function
help(filter)
# Obtains the string of the documentation.
docstring = filter.__doc__
Run Code Online (Sandbox Code Playgroud)