title: How to connect to an existing Jupyter Notebook kernel and inspect variables using the Variable explorer?
body: <p>If I've got a kernel running through a Jupyter Notebook, I can easily connect to it from Spyder using <code>Options &gt; Connect to an exisisting kernel &gt; Browse</code>. Now I can get access to the Jupyter kernel and view the dataframe or any other variable by just running <code>df</code>:</p>
  
  <p><strong>Jupyter snippet:</strong></p>
  
  <pre><code>#imports
  import numpy as np
  import pandas as pd
  
  # Some sample data
  np.random.seed(1234)
  df = pd.DataFrame({'A1':np.random.normal(10, 1, 8),
                     'B1':np.random.normal(20, 2, 8)})
  </code></pre>
  
  <p><strong>Spyder snippet:</strong></p>
  
  <pre><code>df
  
  # output:
            A1         B1
  0  10.471435  20.031393
  1   8.809024  15.514630
  2  11.432707  22.300071
  3   9.687348  21.983892
  4   9.279411  21.906648
  5  10.887163  15.957490
  6  10.859588  19.331845
  7   9.363476  20.004237
  </code></pre>
  
  <p><strong><em>But why is the dataframe not available in the <code>Variable Explorer</code> in Spyder?</em></strong></p>
  
  <p><a href="https://i.stack.imgur.com/40vv8.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/40vv8.png" alt="enter image description here"></a></p>