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)
Is there any command or specific package in python or specific python IDE that provides such funcionality?
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With