Fixing Order of OrderedDict in Pandas
Fixing Order of OrderedDict in Pandas This week I've been working on the same issue from my last week's blog. This week I was producing a solution to the issue, taking into account the requests of the moderators. Although I made a pull request and think I'm on the right track, I'm waiting for the moderators to give some feedback on my pull request before I proceed any further. Overview of the Issue https://github.com/pandas-dev/pandas/issues/21510 The creator of the issue has brought attention to a bug that is caused when combining concat function and OrderedDict. OrderedDict is an ordered dictionary, which means that the dictionary should remember the order of the items added to this dictionary. However, when combining this dictionary with concat, the order gets lost. Here are the observations: In [ 2 ]: from collections import OrderedDict In [ 3 ]: pd.concat(OrderedDict([( ' First ' , pd.Series( range ( 3 ))), ... : ...