3

I am just beginning to learn python for data science tasks in my day job.

I use spyder as python IDE that comes with anaconda. And i am trying to learn efficient ways to explore dataframe objects.

As a user of R with RStudio i very much like the View() command that shows a dataframe in a separate window in a spreadsheet style that allows to filter and sort the data.

Here is what i mean in R / RStudio:

instead of viewing the iris dataframe like this:

> iris
    Sepal.Length Sepal.Width Petal.Length Petal.Width    Species
1            5.1         3.5          1.4         0.2     setosa
2            4.9         3.0          1.4         0.2     setosa
3            4.7         3.2          1.3         0.2     setosa
4            4.6         3.1          1.5         0.2     setosa
5            5.0         3.6          1.4         0.2     setosa
6            5.4         3.9          1.7         0.4     setosa
7            4.6         3.4          1.4         0.3     setosa
8            5.0         3.4          1.5         0.2     setosa
...

i would like to view the the data like this

View(iris)

enter image description here

Is there any command or specific package in python or specific python IDE that provides such funcionality?

ivan_pozdeev
  • 33,874
  • 19
  • 107
  • 152
Rafael Zanzoori
  • 531
  • 1
  • 7
  • 23

1 Answers1

3

There's an open feature request to this effect so I guess there's no direct equivalent atm.

You can view a Dataframe as table via variable explorer as per How to get to last record of large dataframe in Spyder window?. In Jupyter (another Python IDE, primarily designed for scipy), there are other functions with the same effect as per Show DataFrame as table in iPython Notebook.

ivan_pozdeev
  • 33,874
  • 19
  • 107
  • 152