Closed
Description
I frequently use the .to_dict()
method and was wondering how difficult it would be to implement a dict_obj
argument to specify what type of dictionary will be used. For example, if one was interested in preserving the order:
from collections import OrderedDict
pd.Series(list("abcd")).to_dict(dict_obj=OrderedDict)