Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Data Viewer/Variable Explorer support for non-array like objects (such as nested dicts) #1138

Closed
jmew opened this issue Jan 16, 2020 · 12 comments
Assignees
Labels
data-viewer feature-request Request for new features or functionality variable-explorer

Comments

@jmew
Copy link
Contributor

jmew commented Jan 16, 2020

Support for objects in a tree like view, like how you can view objects in debug mode

Ask from one of our users:

"VScode also has an interactive window that opens a Jupyter kernel (separate console/kernel) which displays a subset of variables without the need of debugger.
It turns out that you can directly execute code from the editor in the interactive window’s console (no copy/paste needed), but the variable explorer that it provides is not as powerful (doesn’t give info on objects/classes/methods).
For example, we can’t look at a model object and inspect its components with this method, which has become an important part of our development process.

I guess we could run VScode in debug mode whenever we desire that level of granularity, but it seems like an unnecessary concession when we can get the desired functionality from PyCharm."

Not sure if this is a dup

@paamand
Copy link

paamand commented Mar 25, 2021

Suggestion to prioritize simple dict-support. I.e. for
a = {'b':42}
the variable overview shows
image
but inspecting the specific variable gives
image

For simple nested dicts, a={'b':{'c':42}} the variable inspector fails and simply displays
image

A nested, expandable viewer for nested dicts would be optimal.

@DonJayamanne DonJayamanne changed the title Data Viewer/Variable Explorer support for non-array like objects Data Viewer/Variable Explorer support for non-array like objects (such as nested dicts) Apr 25, 2022
@greazer greazer added feature-request Request for new features or functionality and removed enhancement labels May 4, 2022
@FPRM
Copy link

FPRM commented Aug 3, 2022

Some updates about this feature ?

@glennbarrett
Copy link

Any update on this?

@marcos379
Copy link

Any update on this? Spyder IDE Data Viewer is years ahead of VSCode in that particular aspect.

@rubrojas
Copy link

Has it been any update? I am also experiencing this issue

@lhg1992
Copy link

lhg1992 commented Jul 29, 2023

Even in July 2023, the data viewer still cannot display the keys in the dict, it can only show the values with the index numbers.

@bgupta
Copy link

bgupta commented Aug 8, 2023

Curious is there any workaround short of switching to Spyder?

@GitHunter0
Copy link

GitHunter0 commented Oct 9, 2023

Hey folks, I think the ability to visually inspect nested objects (not only dictionaries but specially nested dataframes) is a critical feature for a data scientist, it saves a lot of time and gives quick insights.

Here's an example of RStudio Viewer for a nested dataframe:

library(tidyverse)

# create a data frame
df <- tibble(
  group = c("A", "A", "B", "B"),
  x = c(1, 2, 3, 4),
  y = c(5, 6, 7, 8)
)

# nest the data frame by group
nested_df <- df %>% 
  group_by(group) %>% 
  nest()

# view the nested data frame
nested_df

image

nested_df in the Viewer, it also shows the content when you hover on the cell:
image

And if you click on the cell with nested data, it opens another tab:
image

I believe it is a great paradigm to borrow from, what do you think, @DonJayamanne ?

Thank you

@Nightenom
Copy link

Nightenom commented Nov 30, 2023

Just had a thought if it would be feasible to display at least result of __repr__ instead [object Object] which would tell way more for custom classes
(especially when the variables menu supports it, and data viewer menu not...)

@amunger
Copy link
Contributor

amunger commented Dec 14, 2023

duplicate of #1148

@amunger amunger closed this as not planned Won't fix, can't repro, duplicate, stale Dec 14, 2023
@GitHunter0
Copy link

@amunger , why is it not planned, could you elaborate?

@amunger
Copy link
Contributor

amunger commented Dec 15, 2023

Duplicating against another issues does not mean it isn't planned, but the majority of the request is covered in a different issue.

This functionality will very likely be implemented with the built-in variable viewer microsoft/vscode#165445

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 30, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
data-viewer feature-request Request for new features or functionality variable-explorer
Projects
None yet
Development

No branches or pull requests

17 participants