Hacker News new | ask | show | jobs
by agentq 5838 days ago
My programming background is fairly extensive in non-functional languages. I work in finance, and the company I joined uses R for a considerable amount of model prototyping.

I'd really like to switch to Python+numpy/scipy, but I haven't been able to find an equivalent of a data.frame, or some numeric+string data structure that allows for easy slicing on both.

Does anybody have any suggestions?

2 comments

Does numpy's record array do what you want?

http://www.scipy.org/RecordArrays

It doesn't quite have first-class status in the library the way data.frame does in R, but it does let you index an array using strings.

Thanks, I'll check it out!
I'm having the same problem. R is slow; yet R's plyr, reshape, and lattice packages are indispensable (ggplot2 wasn't quite mature enough when I wanted to learn it). Maybe something could be written around record/structured arrays. (I'm halfway inclined to try...)