Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to see documentation of inbuilt functions on Jupyter Notebook?

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.

like image 664
D-hash-pirit Avatar asked Dec 04 '17 22:12

D-hash-pirit


People also ask

How do you check the documentation of a function in python?

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.

Which of the following command displays the documentation of a selected function in Jupyter Notebook?

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.

What Jupyter shortcut displays information about a python function?

shift + tab + tab.

How do you get options in Jupyter Notebook?

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.


1 Answers

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__
like image 96
miaout17 Avatar answered Nov 12 '22 08:11

miaout17