I run the following code in Spyder 4.1.1 but the console doesn't show any output :
df.head()
df.shape
Previously I had Spyder 3.7 and it worked but now after updating it is not working. I tried resetting to default settings and tried to change the console settings but nothing worked. If I used print(df.head) it works but it should work without print().
Please help. Attached is the screenshot
spyder screenshot
The shortcut key for commenting and uncommenting in Spyder is Ctrl + 1 (Click Ctrl and 1 simultaneously). For both Python shell and IPython shell, they have command history through the arrow key. Clicking the up arrow key will show previously typed commands. To clear the output on Console, use Ctrl-L.
Spyder's debugger is integrated with the Breakpoints pane, which lists the file, line, and condition (if any) of every breakpoint defined. To open it, select Debug ‣ List breakpoints, or press Ctrl - Shift - B ( Cmd - Shift - B on macOS).
Try running the following in the Ipython console.
%config InteractiveShell.ast_node_interactivity='last_expr'
This is the setting description:
ZMQInteractiveShell.ast_node_interactivity=<Enum>
Current: 'last_expr'
Choices: ['all', 'last', 'last_expr', 'none', 'last_expr_or_assign']
'all', 'last', 'last_expr' or 'none', 'last_expr_or_assign' specifying which
nodes should be run interactively (displaying output from expressions).
You need to highlight what you want to run.
Then run/execute the current line/s by either pressing F9
, or the Run selection or current line
button on the Run toolbar
(the black one).
It will then show output without needing to use print
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With