Add index
param to to_dict
like in to_json
. · Issue #46398 · pandas-dev/pandas (original) (raw)
df.to_json(orient='split', index=False)
is really nice. df.to_dict(orient='split')
basically does the same thing, but I get a dictionary back instead of a string. For symmetry, I'd like to_dict
to also have an index
param, so I can keep from having to del dictionary['index']
to make them really similar.