Michael A
Michael A

Reputation: 4613

How do I get PyCharm to show method signatures and documentation in the Python/IPython console and the editor?

In IPython's QT console (on Windows 7), if I type:

import scipy
scipy.zeros(

followed by Tab, it displays basic documentation for the method, like its signature, parameters, description, etc. In PyCharm CE 3.4.1, I have IPython enabled as my console, but this doesn't happen. The same is true in the actual editor; if I type this code in the editor, nothing shows up. I don't think this is related to the issue in this question (where PyCharm can't tell the type of something because it's not actually running it) but maybe it is.

Upvotes: 39

Views: 31254

Answers (4)

InvisibleWolf
InvisibleWolf

Reputation: 1017

If you are looking for Mac shortcut it's Command + P (⌘+P), accepted answer's solution didn't work.

Upvotes: 6

Mehdi
Mehdi

Reputation: 1167

Very old post but it's still a problem.

To see the function docstring, like what TAB in IPython shows, you should press Ctrl+Shift+I or go to View > Quick Definition while the cursor is within the function name (not between the parenthesis). A pop-up window shows the function docstring including few lines of the function code. However, it's not perfect and may not work in some cases, like pandas.read_csv().

enter image description here

Upvotes: 7

Pedram
Pedram

Reputation: 684

Ctrl + P to show method signature (parameters) as a pop-up.

other shortcut keys for pycharm are all available here.

Upvotes: 16

fricke
fricke

Reputation: 1400

In pycharm you have ctrl-q (or ctrl-j on a mac) for a quick-doc of the function under the cursor.

Upvotes: 65

Related Questions