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.
Python help() function is used to get the documentation of specified module, class, function, variables etc. This method is generally used with python interpreter console to get details about python objects.
Shift + Tab will show you the Docstring (documentation) for the the object you have just typed in a code cell – you can keep pressing this short cut to cycle through a few modes of documentation.
shift + tab + tab.
character hit the [Tab] key. Typing [Tab] brings up a list of available options. Scroll through the list or type a letter to filter the list to certain starting letters. Use [Enter] to select the option you want.
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__
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With