Skip to content

add indent support to to_json method #12004

Closed
@phretor

Description

@phretor

Sometimes you just want to have a quick look at your data in IPython and having to_json to support indent (as both json.dumps and simplejson.dumps do) would be very handy.

A workaround, which however doesn't always work, is to do json.dumps(series.to_dict()), which unfortunately is annoying when you don't have a JSON-serializable type (e.g., numpy.bool_).

I'm leaving this here as a food for discussion.

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