Skip to content

BUG: Type mismatch in read_json #35464

Open
@rohan-gt

Description

@rohan-gt

Tested on Pandas v1.1.0

I'm trying to import a JSON file containing the following:

test.json

{"file_path": null}

If I run the following code,

pd.read_json("test.json", typ='series').to_dict()

I get this output:

{'file_path': NaT}

Why is null getting converted to NaT instead of None?

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugIO JSONread_json, to_json, json_normalizeMissing-datanp.nan, pd.NaT, pd.NA, dropna, isnull, interpolate

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions