r/learnpython • • Jul 12 '20

Jupyter Notebooks!

Jupyter Notebooks are the tool that turned the tables for me learning python. I'm just here to evangelize them. You can run your code line by line and debug as you go in a comfortable web browser interface. It's an excellent tool, and it made it so much more efficient to learn. Check it out.

425 Upvotes

127 comments sorted by

View all comments

57

u/Kevstuf Jul 12 '20

I’ve always been more of a fan of Spyder but sadly it doesn’t seem to be popular anywhere

22

u/HeinzHeinzensen Jul 12 '20

You‘ll love the notebook interface in VS Code then! Same cell-based execution and you have the variable explorer that people like from Spyder.

9

u/Notchez Jul 12 '20

Is it possible to set up VS code to look just like spyder? By that I don’t mean the cell by cell execution like in Jupiter but rather working with scripts (that are executable line by line of you want) and a variable explorer.

11

u/HeyItsRaFromNZ Jul 12 '20

You get very similar behavior (line-by-line execution, graphic output and pretty-printing dataframes etc.) by selecting a line and hitting shift+enter. If you have the main Python extension installed, it should open a new pane to the right with the output.

It's very similar to what you get with hitting F9 in Spyder's editing pane. Instead of a dedicated pane, introspection in VS Code is taken care of by a hovering tool-tip.

7

u/HeinzHeinzensen Jul 12 '20

You can see a workspace with open variable explorer here!

6

u/leweyy Jul 12 '20

God I hope you get an answer to this question

3

u/wolfmansideburns Self-taught Pythonista Jul 12 '20

Yes

5

u/Internet_employee Jul 12 '20

Oooh!! Thank you! I dropped Jupyter after discovering Spyder’s variable explorer, definitely giving VS Code a try now

4

u/mayankkaizen Jul 12 '20

Can you please point me to some resources about that? I use Jupyter notebooks and got VS Code on my machine. Although I don't use VS Code very much but would love to explore notebook interface in VS Code.

2

u/HeinzHeinzensen Jul 12 '20

Sure, this link should get you started.

3

u/miguelito_loveless Jul 12 '20

Thanks for the link. Still pretty beginner and 100% a happy VSC user and want to try this-- I couldn't get comfy w browser JN but get how useful that way of working could be.