Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to view a Python class docstrings using jupyter notebook? [duplicate]

In the spyder IDE it is possible to press ctrl+i when instantiating a class to bring up the docstrings associated with that class. Is there a similar feature in jupyter notebook?

like image 355
CiaranWelsh Avatar asked Feb 15 '17 09:02

CiaranWelsh


People also ask

How do you access Docstrings in Python?

Docstrings are accessible from the doc attribute (__doc__) for any of the Python objects and also with the built-in help() function. An object's docstring is defined by including a string constant as the first statement in the object's definition.

How do you view parameters in a Jupyter notebook?

shift + tab + tab.

Can you duplicate a Jupyter notebook?

Notebook 1: — Select multiple cells by holding down Shift and hit Ctrl+c to copy. Notebook 2: — Hit Esc to enter Command mode Ctrl + v to paste.


1 Answers

For the current version of Jupyter notebook, you can hit Shift-Tab to bring up the signature and docstring of the class. This question is highly related to these other questions (so I'll flag this as a duplicate).

  • IPython Notebook Tab-Complete -- Show Docstring

  • How can I see function arguments in IPython Notebook Server 3?

like image 124
Brian Wylie Avatar answered Oct 10 '22 00:10

Brian Wylie