Skip to content

read_json with orient="values" and numpy=True provides strange column #28559

Closed
@WillAyd

Description

@WillAyd

Another edge case revealed in #28510 . Perhaps won't be relvant if we go through with #28512 but opening for posterity

For whatever reason, this particular combination of values produces a RangeIndex for the columns.

>>> pd.read_json("[]", orient="values", numpy=True).columns
RangeIndex(start=0, stop=1, step=1)

Nothing else appears to do that

Metadata

Metadata

Assignees

No one assigned

    Labels

    IO 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