exxeleron/qPython — pull request #9 by buckie (2014-09-29 02:49:17+00:00)
Title: added qtable to dataframe conversion utility

Pertains to https://github.com/exxeleron/qPython/issues/6

Decided it made more sense to go the pandas route over numpy because to get a true "native" representation from q (which is what I was after) you need to have nulls in any datatype. Unfortunately, I couldn't get numpy's masked arrays to play nicely with the datetime/timedelta columns (there are a couple outstanding bugs in it's implementation that were found in numpy 1.7) during reconstruction of component columns into the table itself. Also, the type promotion's interplay with q's default values for nulls causes headaches.

Instead panda's DataFrames seemed to be the winner, as they mirror q's tables much more closely in terms of representation and usage (but not memory layout or types). I figure that high performance work will always use numpy and have the special cases worked in but that for more exploratory work, a DataFrames was the likely choice.

Some of the QTemporalList to numpy MaskedArray functions are included as well, in case someone else want's to pick up where I left off.

Signed-off-by: buckie