I was a bit curious about this (in the past, colleagues have reached for Pandas when dealing with tabular data... when I thought it was overkill and caused inconveniences).
Yes, it just uses RAM, and memory size balloons to about 2x of the disk size of the sample CSV files I tried; and of course when I tried to operate on a >4gb CSV file on my 8gb laptop I was visited by the OOM killer. But after trimming the file to 569mb, Pandas seemed quite responsive. Running functions like
df.max(), which should scan the whole table, was instantaneous.
Pandas uses numpy, which is a lot of C, so many Pandas operations should run at nearly-C speeds. I created a derived table with apply and a lambda, using
random.randrange- which was complex enough to not be optimized away, and it took my (old) laptop about 4m to run.
That seems to be much more efficient than naïve Python- using
csv.reader ballooned mem usage so much it was not bearable.
So... for that kind of datasets, as long as you are able to do everything with Pandas built-in functions, it should be good (even for much larger datasets, I imagine; as much as half your RAM, I guess). However, falling back to processing that under Python will be *slow*.
I really doubt any other interpreted language is going to differ in an order of magnitude from Python.
Any compiled language is probably going to work as well as, or better than Pandas (using native operations)- it will be fast if your dataset fits in RAM (unless you have a really ungodly amount of RAM). But in most ways of working, as soon as you hit swap, it will be back to waiting.
Then it's about using stuff which handles bigger-than-RAM datasets well. Such as a database.
I cat'ed the 4gb CSV twice, to get a CSV larger than my RAM, and imported that into an SQLite database. That took about 5-6 minutes, but then full table scans took about 30s, which is reasonable- but after creating an index (that took looong- and while SQLite was sipping RAM prior to this, it also took RAM), it was instantaneous.
...
Conclusion: Pandas will be good for datasets about half your RAM, as long as you don't fall into processing stuff into Python- but supposedly the point of Pandas/numpy is that you can avoid Python in most circumstances. Compiled languages will probably work better, and not require you to carefully craft your code to use native compiled functions- because your code will already be native compiled functions. But then you will also hit problems when your dataset starts to be too big for your RAM. Then something disk-aware will be the way to go.
I was surprised myself- I expected Python to be inefficient, but not "4-minutes slow" when processing a 500mb CSV. I was wrong by an order of magnitude (I'd expect a compiled language to deal with that file instantly, interpreted dynamic language to handle it in less than a minute). This is good to play around for a while- because my advice generally is "don't really worry too much if your dataset fits in RAM". A couple hundred of megabytes makes it worthwhile to worry a little bit
