Skip to content

DEPR: keep_default_dates and convert_dates in read_json #59161

Open
@mroeschke

Description

@mroeschke

read_json has convert_dates, keep_default_dates and dtypes that all try to perform dtype conversions on the result from the ujson parser. Conflicts can arise when a column matching the specification of keep_default_dates matches a column specified in dtypes.

The proposal is to deprecate keep_default_dates and convert_dates and only use dtype's current definition of

  • True: attempt dtype conversion on all column (and refactor to use infer_dtype instead of astype guessing)
  • False: perform no dtype conversion
  • dict: dict keys that match column labels will be cast to type in the dict value

Metadata

Metadata

Assignees

No one assigned

    Labels

    DeprecateFunctionality to remove in pandasDtype ConversionsUnexpected or buggy dtype conversionsIO JSONread_json, to_json, json_normalize

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions