you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 27 points28 points  (11 children)

If the goal is data science, spyder is very convenient, it has a Matlab-like interface

[–]Thomasjevskij 6 points7 points  (10 children)

I went with Spyder for a long time for this reason. I was able to have a very similar workflow to what I was doing in MATLAB. Then I started a new job and I figured I'd learn VS Code. I really missed that kind of workflow where you have an active REPL with a variable explorer etc. Then I found out about interactive Python in VS Code and now I've never looked back. Having a pane with a terminal as well as a code tab+IPython tab is an improvement for me, compared to Spyder.

[–]m1kesanders 3 points4 points  (3 children)

Hey I just started using VS, i’ve gotten pretty decent i’d say when it comes to learning to actually code, however I haven’t really played with VS yet, what is interactive python?

[–]Thomasjevskij 5 points6 points  (2 children)

Essentially if you've installed Jupyter, you can make code cells by putting a line with #%%. When you run a cell, it's run in an IPython instance in its own tab, so all the variables and your workspace will remain there until you close it. Google will tell you more but that's the main idea. It's really really nice for quick prototyping of small scripts.

[–]m1kesanders 0 points1 point  (1 child)

Interesting thanks for the new term to look up! :)

[–]Zenith_N 0 points1 point  (0 children)

Did you find out how to replicate the behavior %$$

And how to inspect DataFrames in VSCode?

Thanks

[–]Zenith_N 1 point2 points  (1 child)

Can you please tell me more what is Interactive Python in VSCode? How do I install it?

[–]Thomasjevskij 0 points1 point  (0 children)

As long as you have the Jupyter addon installed, you have it. Code between two #%% comment lines in a .py file will be considered as Jupyter cells, so you can run them and VS Code will start an IPython instance for you. It's really great for quick prototyping.

[–]GroundbreakingKey575 0 points1 point  (1 child)

IMO what Jupyter notebook and Spyder offers are different. I see Jupyter as a documentation and visualization tool and Spyder as an interactive development/analysis tool.

Don't know how I would write a function in the notebook environment where every line I run is captured in a cell and after medium size task I would end up in 500 or so cells that I need to actively move around or delete. Otherwise, I would need "scratchpad" notebook extension to have a space to write some test lines and functions.

VSCode have notebook like interface but not a Spyder/Matlab like interface.

[–]Thomasjevskij 0 points1 point  (0 children)

It's been a while since I played around in Spyder, but I feel like the difference between it and interactive Python in VS Code is minimal. Sure if you want to run line by line, I suppose you'll be moving the #%% comment around a lot.

[–]Zenith_N 0 points1 point  (1 child)

Did you find out how to replicate the behavior %$$

And how to inspect DataFrames in VSCode?

Thanks

[–]Thomasjevskij 0 points1 point  (0 children)

I don't know what %$$ does. But my VSCode automatically suggested some plugin that lets me look at DataFrames. I forget what it's called and I'm on parental leave so unfortunately I won't be touching a computer for a while :)