185

I've recently switched to IPython Notebook 3 (3.1.0-cbccb68 to be exact), the Anaconda version. Previously when I typed a function and opened a parenthesis like this:

time.sleep()

and if the cursor was between the parentheses then I would get a contextual overlay menu that displayed the function arguments. Now I don't see it, and although I've searched, I can't find out how I can turn on this functionality.

Tomas G.
  • 3,784
  • 25
  • 28
user11094
  • 2,011
  • 2
  • 14
  • 7

4 Answers4

344

In 1.0, the functionality was bound to ( and tab and shift-tab, in 2.0 tab was deprecated but still functional in some unambiguous cases completing or inspecting were competing in many cases. Recommendation was to always use shift-Tab. ( was also added as deprecated as confusing in Haskell-like syntax to also push people toward Shift-Tab as it works in more cases. in 3.0 the deprecated bindings have been remove in favor of the official, present for 18+ month now Shift-Tab.

So press Shift-Tab.

Matt
  • 27,170
  • 6
  • 80
  • 74
  • 14
    Thanks! I don't know why that was so challenging to find online. – user11094 Jun 15 '15 at 23:22
  • 2
    Because we are bad a documenting things, and what to search for is not clear :-) – Matt Jun 16 '15 at 02:32
  • maybe at least a hover tooltip would help to know that such tooltip thing even exists :) – CodingYourLife May 29 '16 at 19:55
  • 22
    For some reason i cannot get it to work on a Mac. I used to be able to hover but pressing shift-tab does not work for me. – Emptyless Jun 18 '16 at 12:41
  • 11
    If it isn't working, makes sure the module is imported. I spent 20 minutes wondering why it wasn't working for me, and realized I hadn't run the cell with the import. – Ryan Nov 30 '17 at 21:23
  • 5
    What's "the module"? – lanza Sep 08 '18 at 08:30
  • 2
    Run this command on the terminal, open a new jupyter notebook afterwards, and it works : pip install pyreadline – Shahin Apr 21 '19 at 14:24
  • what is the name of this action? can it be bound to some other shortcut. – ratijas Aug 28 '19 at 08:49
  • In case anyone is sitting there wondering why nothing happens sometimes when you hit shift-tab (like me), it is likely because you have to run the relevant package or module import first. – socasanta Aug 21 '23 at 19:50
53

Try Shift-Tab-Tab a bigger documentation appears, than with Shift-Tab. It's the same but you can scroll down.

Shift-Tab-Tab-Tab and the tooltip will linger for 10 seconds while you type.

Shift-Tab-Tab-Tab-Tab and the docstring appears in the pager (small part at the bottom of the window) and stays there.

Tomas G.
  • 3,784
  • 25
  • 28
32

Adding screen shots(examples) and some more context for the answer of @Thomas G.

if its not working please make sure if you have executed code properly. In this case make sure import pandas as pd is ran properly before checking below shortcut.

Place the cursor in middle of parenthesis () before you use shortcut.

shift + tab

Display short document and few params

enter image description here

shift + tab + tab

Expands document with scroll bar

enter image description here

shift + tab + tab + tab

Provides document with a Tooltip: "will linger for 10secs while you type". which means it allows you write params and waits for 10secs.

enter image description here

shift + tab + tab + tab + tab

It opens a small window in bottom with option(top righ corner of small window) to open full documentation in new browser tab.

enter image description here

Shakeel
  • 1,869
  • 15
  • 23
  • 3
    there is no `shift + tab+ tab+ tab+ tab+ tab`? – adir abargil Dec 06 '20 at 12:50
  • 1
    @Shakeel This does work for many functions but it doesn't for others. For example, using only pandas, in `oo.groupby('Edition','NOC').agg(['min','max'])` Shift + Tab works only inside the groupby function but not the agg function. I would like to know how we can get help for the various available parameters of agg. – Sagar Jul 26 '22 at 12:00
1

Shift-Tab works for me to view the dcoumentation