Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DataFrame.to_dicts change str values #18882

Closed
2 tasks done
lizeyan opened this issue Sep 24, 2024 · 3 comments · Fixed by #18888
Closed
2 tasks done

DataFrame.to_dicts change str values #18882

lizeyan opened this issue Sep 24, 2024 · 3 comments · Fixed by #18888
Assignees
Labels
accepted Ready for implementation bug Something isn't working needs triage Awaiting prioritization by a maintainer python Related to Python Polars

Comments

@lizeyan
Copy link

lizeyan commented Sep 24, 2024

Checks

  • I have checked that this issue has not already been reported.
  • I have confirmed this bug exists on the latest version of Polars.

Reproducible example

import polars as pl
print(pl.from_dicts([{"A": "0.1"}]).to_dicts())

Log output

[{'A': '0'}]

Issue description

The str value changed

Expected behavior

[{'A': '0.1'}]

Installed versions

--------Version info---------
Polars:              1.8.1
Index type:          UInt32
Platform:            macOS-14.0-arm64-arm-64bit
Python:              3.12.6 (main, Sep 20 2024, 16:43:14) [Clang 15.0.0 (clang-1500.3.9.4)]

----Optional dependencies----
adbc_driver_manager  <not installed>
altair               <not installed>
cloudpickle          <not installed>
connectorx           <not installed>
deltalake            <not installed>
fastexcel            <not installed>
fsspec               <not installed>
gevent               <not installed>
great_tables         <not installed>
matplotlib           <not installed>
nest_asyncio         <not installed>
numpy                2.1.1
openpyxl             <not installed>
pandas               <not installed>
pyarrow              <not installed>
pydantic             <not installed>
pyiceberg            <not installed>
sqlalchemy           <not installed>
torch                <not installed>
xlsx2csv             <not installed>
xlsxwriter           <not installed>
@lizeyan lizeyan added bug Something isn't working needs triage Awaiting prioritization by a maintainer python Related to Python Polars labels Sep 24, 2024
@rodrigogiraoserrao
Copy link
Collaborator

(On polars 1.7.1 I didn't get the bug but I also get it on 1.8.1.)

@lizeyan
Copy link
Author

lizeyan commented Sep 24, 2024

(On polars 1.7.1 I didn't get the bug but I also get it on 1.8.1.)

Yes. It reproduces on 1.8.0 and 1.8.1. On 1.7.1 it is OK.

@coastalwhite
Copy link
Collaborator

Bisect shows that it started in #18664. Will look at it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accepted Ready for implementation bug Something isn't working needs triage Awaiting prioritization by a maintainer python Related to Python Polars
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

4 participants