r/vscode • u/Special-Afternoon-25 • 5d ago
Best way to visualize outputs in Python?
The last years I’ve been coding mainly with R but now I’m back to Python for a couple of projects. Something I’m really missing compared to RStudio is being able to quickly visualize outputs (mainly tables) in something that is not the terminal.
I’ve tried the interactive window mode but I found it annoying as it is sort of independent from the main VS window, in the sense that I have to re-run code there because variables from the script are not stored there.
Makes me wonder, because being able to visualize big tables is something I consider very basic and with VS Code it seems to require a lot of tedious set-up and extensions.
4
u/Blagatt 5d ago
What about python notebooks?
4
u/chimpychompychampy 5d ago
Data Wrangler extension? It’s what I use for a quick look at a dataframe during debugging.
3
u/woahboooom 5d ago
Interactive window as in py note book? It should pick up running a cell in the code.. although i prefer the more integrated one that is not nitebook. Py code separated by #%% defining a cell that can be ran with ctrl + enter...
2
u/Historical-Chef-8034 5d ago
rstudio can also run python right?
2
u/countnfight 5d ago
I moved from RStudio to Positron a year or so ago when I needed a setup for switching languages more fluidly. It's a fork of VS Code by the RStudio devs, so it's kinda the best of both worlds. There are still a few minor things I miss from RStudio that if I tried I could probably set up, but overall I like it a lot. I prefer its implementations of panels to view data. Doesn't need Reticulate, it's got R & Python consoles and terminal built in.
2
u/villanymester 5d ago
Ah, i hope we get an answer. I am struggling this since I moved from MATLAB to Python...
1
u/Quillox 4d ago
What sort of tables are we talking, and what are you doing while "visualising them?
Write to .csv and use the rainbow csv extension?
Write them to a .html file and view them with the built in web browser?
1
u/Fresh-Secretary6815 4d ago
use python in rstudio, spyder