Re: [pystatsmodels] variable browser?

183 views
Skip to first unread message

Wouter Overmeire

unread,
Jul 24, 2012, 5:07:49 PM7/24/12
to pystat...@googlegroups.com


2012/7/24 john locke <johnlo...@gmail.com>
I am wondering -- if ipython+pandas+matplotlib is supposed to compete with the likes of MATLAB/Mathematica and R  shouldn't it be incredibly easy to generate a DataFrame and browse the contents of it?

Issue 1) printing the dataframe shows me the type of the object with descriptions of the rows, so I can't even view the data in the console

If the dataframe does not fit in the width of the terminal or it has too many rows a summary view will be displayed.
see also http://pandas.pydata.org/pandas-docs/dev/basics.html#console-output-formatting

You can cross sect the DataFrame to print parts of it (which fit on the screen): df.ix[0:10, 0:5]
When using the the ipython notebook you get scroll bars when printing a DataFrame, allowing bigger frames to be displayed.

 
Issue 2) I am unable to browse the variables in Spyder/PyDev and I haven't heard of any other solution. This is standard in RStudio, MATLAB etc.

Please let me know if this is not be the best place to place this question

-jl

josef...@gmail.com

unread,
Jul 24, 2012, 6:18:25 PM7/24/12
to pystat...@googlegroups.com
On Tue, Jul 24, 2012 at 12:28 PM, john locke <johnlo...@gmail.com> wrote:
> I am wondering -- if ipython+pandas+matplotlib is supposed to compete with
> the likes of MATLAB/Mathematica and R shouldn't it be incredibly easy to
> generate a DataFrame and browse the contents of it?
>
> Issue 1) printing the dataframe shows me the type of the object with
> descriptions of the rows, so I can't even view the data in the console
> Issue 2) I am unable to browse the variables in Spyder/PyDev and I haven't
> heard of any other solution. This is standard in RStudio, MATLAB etc.
>
> Please let me know if this is not be the best place to place this questions

Maybe raising the issue on the spyder mailing list would be helpful.
Since spyder can display numpy.arrays, my guess is that it shouldn't
be very difficult to write a plug-in for displaying dataframes (but I
have no idea about any implementation questions).

Josef

>
> -jl

Christian Prinoth

unread,
Jul 25, 2012, 1:57:47 PM7/25/12
to pystat...@googlegroups.com
I have been doing some work porting spyder's array viewer to pandas, but have not had much time for it in the past weeks.
Right now I have just ripped out the code, making it indepent of spyder, and adapted it to show Series and DataFrames.
There is still lots of work to be done, though.

And it requires qt.


--
Christian Prinoth

john locke

unread,
Aug 17, 2012, 11:01:45 AM8/17/12
to pystat...@googlegroups.com


How cool would it be if you could do:
ipython --pylab
df = DataFrame()
df.view()

and a window would pop up that would let you browse the dataframe (bonus points if you can edit it!!)
Perhaps it would be limited to, say, the first 100 rows and first 100 columns (who has that many columns??)

If we can't add this functionality to pandas, does anyone have a function that takes a DataFrame and pops up a window showing the contents?
import super_cool_module
super_cool_module.ViewDataFrame(df) or something like that

Does anybody on this list have something like that for their own usage they would be willing to share?  Many thanks


On Tuesday, August 14, 2012 2:50:36 PM UTC-4, Spencer Lyon wrote:
I would be happy to contribute to porting the spyderlib object browser to pandas.

Do you see any room for help with what you have working right now?


Spencer Lyon

Wes McKinney

unread,
Sep 7, 2012, 4:41:39 PM9/7/12
to pystat...@googlegroups.com
Check out pandas.sandbox.qtpandas for some inspiration. It's a
prototype but along the lines of what you're talking about.

- W

Tim Michelsen

unread,
Oct 1, 2012, 6:04:44 PM10/1/12
to pystat...@googlegroups.com, spyd...@googlegroups.com

Michael Aye

unread,
Oct 1, 2012, 8:25:17 PM10/1/12
to pystat...@googlegroups.com
Is that something brand new? in 0.8.1 i can't see pandas.sandbox?

Michael 

Wouter Overmeire

unread,
Oct 2, 2012, 3:12:37 AM10/2/12
to pystat...@googlegroups.com


2012/10/2 Michael Aye <kmicha...@gmail.com>

It`s available in 0.8.1.
import pandas.sandbox

Reply all
Reply to author
Forward
0 new messages