I recently researched about finding documentation of any inbuilt python library's
function within a cell
of Jupyter Notebook
. Any suggestion how I can access the documentation?. I know keyboard shortcut which is shift + tab
, and with 4 times shift + tab
, whole documentation with example pops up. I am just wondering the usual way, apart from shortcut.
Add a comment
|
1 Answer
The documentation comes from the docstring in the Python code.
You can see it by calling help, and the __doc__
attribute returns the string.
Taking the built-in filter
as example:
# Displays the documentation for filter function
help(filter)
# Obtains the string of the documentation.
docstring = filter.__doc__
-
thanks, I wanted to know documentation as well as syntax to use. Anyways, thanks Commented Dec 4, 2017 at 22:12
-
1Are you looking for something like this? python.org/dev/peps/pep-0257– miaout17Commented Dec 4, 2017 at 22:16