compute: clean up core functions and docstrings
pandas: Series sort uses order.

Thanks to @cpcloud