pandas-dev / pandas

Flexible and powerful data analysis / manipulation library for Python, providing labeled data structures similar to R data.frame objects, statistical functions, and much more
https://pandas.pydata.org
BSD 3-Clause "New" or "Revised" License
42.84k stars 17.66k forks source link

BUG: to_dict inconsistency #56932

Open moghadas76 opened 6 months ago

moghadas76 commented 6 months ago

Pandas version checks

Reproducible Example

import pandas as pd
df = ....
df.to_dict()

Issue Description

to dict manipulate float values which could not be restored

Expected Behavior

lossless deserialization

Installed Versions

2.1.4

rhshadrach commented 6 months ago

Thanks for the report! Could you include a reproducible example? See https://matthewrocklin.com/minimal-bug-reports for more details.