So Grant and everyone else, I think there's probably an opportunity here to supplement the Q's inadequate forum/help mechanism. Let me explain...
prices.tail(1).transpose()
"What does that do and why did he use it? Not to mention that the sorting mechanism at the last line..."
prices_last.sort(columns=prices_last.columns[0])
Ya schoore, ve cann search de vast and poorly constructed forum archives using goooogle, Gary's right there. But what a pain.
Why couldn't there a wiki of handy algos, code blocks, snippets, api ref examples -- all quant curated and maintained? Or some better repository for all the bits and pieces any (and every) quant would need to both get started and to advance their cause? I've ended up keeping this ugly unmanageable stack of private algos with names like "LANGUAGE REF: ..." or "API REF: ..." and when I need a sorting algo or an RSI algo, or a fundamental data retrieval block I hunt through my expanding and nearly useless stack of algos for the tool "I know I wrote some time in the past..." This is nonsense!
Maybe building one's own repo locally, some massive python project or perhaps a github repo might work a bit better. But still, why isn't there a better way to store and find useful code blocks in some library of some sort? How many new quants will come in ask the same redundant question, over and over, before some better system is developed?
So that's the opportunity here. The Q's code maintenance system is sorely inadequate. At this time it's an open question but a question that the Q is not going to solve.
Thoughts anyone?
[Update: list of possible solutions (will build as I find them)]
https://gist.github.com/search?q=Quantopian