Skip to content

Commit 99e1b9d

Browse files
authored
Eliminate variable value when computing data frame info (#10081)
1 parent e3d34ab commit 99e1b9d

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

news/2 Fixes/10075.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix data viewer not opening on certain data frames.

src/client/datascience/jupyter/jupyterVariables.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,9 @@ export class JupyterVariables implements IJupyterVariables {
120120
return defaultValue;
121121
}
122122

123-
// Prep our targetVariable to send over
124-
const variableString = JSON.stringify(targetVariable).replace(/\\n/g, '\\\\n');
123+
// Prep our targetVariable to send over. Remove the 'value' as it's not necessary for getting df info and can have invalid data in it
124+
const pruned = { ...targetVariable, value: '' };
125+
const variableString = JSON.stringify(pruned);
125126

126127
// Setup a regex
127128
const regexPattern =

0 commit comments

Comments
 (0)