Skip to content

Change Json format ? #26

@slamer59

Description

@slamer59

Hello,
I need to construct my json like :

{
  "x": [
    5.0,
    3.0,
    8.0,
    5.0]
  ], 
  "y": [
    7.0,
    2.0,
    6.0,
    4.0]
}

I have this, which is exactly what to_json gives:
[{"x":5,"y":7},{"x":3,"y":2},{"x":8,"y":6},{"x":5,"y":4}]

Is it possible to change this behavior ?
It might be a pandas question.

Thanks for your efforts ! I understand better how REST works now :)
Thomas

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions