We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
import json from io import StringIO import polars as pl pl.read_json(StringIO(json.dumps([{"foo": float("nan")}])))
Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/Users/twoertwein/miniforge3/lib/python3.10/site-packages/polars/io/json.py", line 94, in read_json pydf = PyDataFrame.read_json( RuntimeError: BindingsError: "InternalError(TapeError) at character 9 ('N')"
read_json errors when parsing NaNs.
read_json can parse NaNs.
--------Version info--------- Polars: 0.20.23 Index type: UInt32 Platform: macOS-14.4.1-arm64-arm-64bit Python: 3.10.14 | packaged by conda-forge | (main, Mar 20 2024, 12:51:49) [Clang 16.0.6 ] ----Optional dependencies---- adbc_driver_manager: <not installed> cloudpickle: <not installed> connectorx: <not installed> deltalake: <not installed> fastexcel: <not installed> fsspec: 2024.3.1 gevent: <not installed> hvplot: <not installed> matplotlib: 3.8.4 nest_asyncio: <not installed> numpy: 1.24.3 openpyxl: <not installed> pandas: 2.2.1 pyarrow: <not installed> pydantic: <not installed> pyiceberg: <not installed> pyxlsb: <not installed> sqlalchemy: <not installed> xlsx2csv: <not installed> xlsxwriter: <not installed>
The text was updated successfully, but these errors were encountered:
Can I work on this?
Sorry, something went wrong.
NaN isn't part of the JSON spec. So our json parser (external crate) don't parse it.
NaN
https://www.json.org/json-en.html
No branches or pull requests
Checks
Reproducible example
Log output
Issue description
read_json errors when parsing NaNs.
Expected behavior
read_json can parse NaNs.
Installed versions
The text was updated successfully, but these errors were encountered: