11

I updated Spyder to 4.0.1 which has a new object explorer, allowing to display arbitrary objects in a tree-like view as well as displaying metadata New Variable Explorer

Previous versions of Spyder enabled to view Pandas Dataframes in a simple table view when double clicking on the variable in the explorer.

Is there a simple way of accessing this nice old view in Spyder 4.0.1?

Carlos Cordoba
  • 33,273
  • 10
  • 95
  • 124
thylakoid12
  • 137
  • 1
  • 9

4 Answers4

12

(Spyder maintainer here) You need to have Pandas installed in the same Python installation or environment where Spyder is installed. Else Spyder will use the Object explorer to open Dataframes, just as it does with any other kind of Python object.

Carlos Cordoba
  • 33,273
  • 10
  • 95
  • 124
0

As per documentation https://www.spyder-ide.org/blog/spyder-variable-explorer/ you can view the dataframe by right clicking on it and selecting the "View with the Object Explorer" option.

Edit: I don't have Spyder 4.0 installed, you can check if this works for you.

ManojK
  • 1,570
  • 2
  • 9
  • 17
  • Thank you for the suggestion, but this opens the Object Explorer as shown in the image I attached to the original post and does not display a simple summary of the pandas dataframe as previous versions of spyder did. – thylakoid12 Feb 13 '20 at 12:46
  • Interesting, there should be a way to do this – ManojK Feb 13 '20 at 13:17
0

Just open up the terminal >> activate the environment that you're working in >> install pandas again. (If you're using conda, install it using conda)

0

if your like me and just messed up by trying different hotkeys or something just try saving the file and relaunching spyder. (please note this is incase you could see the dataframes in tabular form earlier and it suddenly started displaying it differently.)

Ryan
  • 11
  • 3