Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Can pd.DataFrame retain column order when passed in OrderedDict? #2455
It would have the nice effect of having
ohlc = OrderedDict() ohlc['open'] = 'first' ohlc['high'] = 'max' ohlc['low'] = 'min' ohlc['close'] = 'last' gdf = grouped.agg(ohlc)
come out with the proper column order.
1593 else: 1594 result = DataFrame(result)
result is ordered correctly before being passed to DataFrame constructor.