Skip to content

DataFrame to_json Column -> [values] orientation and scientifc notation? #7863

@MatthiasKauer

Description

@MatthiasKauer

Hi,
I'm exporting a data frame from pandas and importing it in a C++ program using rapidjson. I believe I have tested all available orientations and I am wondering if it was possible to obtain the following:

       c1 c2
    r1 1 2
    r2 3 4

converted to

{ c1: [1, 3], c2: [2,4], index: [r1, r2]}

Is my idea inherently flawed somehow? I feel it would be very intuitive to parse this from C++.

The other question is regarding the precision of the double values. I am only getting fixed-point values in the text output.
Can I get 1.234e-5 instead of 0.00001234 somehow?

If no, can you point out the process for possible contributions in this direction?

Best regards,
Matthias Kauer

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions