Using OrderedDict in GroupBy Module(s) · Issue #25692 · pandas-dev/pandas (original) (raw)
Spurred by conversation in #25224 (comment) right now we are using plain old dictionaries in most of the groupby aggregation functions. For Py35 this makes the order of the returned result non-deterministic.
We could theoretically make a stronger assertion around the order here by replacing those dicts with OrderedDicts