10

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.

1 Answer 1

14

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__
2
  • thanks, I wanted to know documentation as well as syntax to use. Anyways, thanks Commented Dec 4, 2017 at 22:12
  • 1
    Are you looking for something like this? python.org/dev/peps/pep-0257
    – miaout17
    Commented Dec 4, 2017 at 22:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.