Question: How can i go to a function definition in Jupyter?

I want something like Visual studio's f12, or eclipse's and PyCharm's ctrl+click.

I find it hard to believe this does not exist, yet couldn't find it

Answer: 
If you can upgrade to JupyterLab, you could install [jupyterlab-go-to-definition](https://github.com/krassowski/jupyterlab-go-to-definition) extension with:

```
jupyter labextension install @krassowski/jupyterlab_go_to_definition

```

It supports R and Python and allows to jump to definitions with alt-click (where alt can be changed to another key modifier in the settings). For more usage details see the linked GitHub repository (above).

On the technical side, there are two ways to get the location of definitions in a notebook: static analysis and inspection in the kernel. If you cannot upgrade to JupyterLab yet, you could try to re-implement either of those for jupyter-notebook.

* The kernel inspections may seem easier to implement because they do not depend on the code editor used, but have to be written for each language separately. [Here](https://github.com/krassowski/jupyterlab-go-to-definition/blob/27923a90dd7567cddc26841d12df3ad068878183/src/languages/python.ts#L250) is an example for Python
* static analysis can be done via external tool but those will be problematic due to the nature of the notebook (being composed of multiple cells, unlike normal source code files); the approach used in the extension above is to analyze the tokens of CodeMirror editor, iterating over cells, starting from the cell with the symbol usage (where the user alt-clicked on a variable). Here is an example of [implementation](https://github.com/krassowski/jupyterlab-go-to-definition/blob/27923a90dd7567cddc26841d12df3ad068878183/src/jumpers/jumper.ts#L97) for such iteration.

Disclaimer: I am the author of this extension.

Edit: For an implementation which allows the same for **any** language (provided that you install a language server for this language), see: [jupyterlab-lsp](https://github.com/krassowski/jupyterlab-lsp) (with many other features too!). The difference is that it only uses static analysis for now (the kernel-based position retrieval is not implemented just yet).
I used below to return call signature of function, [taken from above](https://stackoverflow.com/a/53457694/5625975)

```
np.matmul?? 

```

If you have the function typed out, you can use [keyboard combination](https://towardsdatascience.com/jypyter-notebook-shortcuts-bf0101a98330) 'Shift+Tab' + 'Shift+Tab' to get tool tip in notebook when in edit mode, as shown below.

[![Jupyter Notebook Tooltip](https://i.stack.imgur.com/ixmXv.png)](https://i.stack.imgur.com/ixmXv.png)