0

I have a Dataframe df with 11 rows and 1 column. In each row I have an array that I would convert into json but assigning to each entry in array a key.

For example,

                                                   0

 0     [1.234,1.234,2.1123,4.32212,1.2231,2.55323,1.4421]
 1     [2.21,1.234,1.31,3.121,2.22,2.32322,0.8873]

The above DataFrame should become the same DataFrame but having json data in the entries:

                                                      0

 0     {"0":1.234,"1":1.234,"2":2.1123,"3":4.32212,"4"1.2231,"5"2.55323,"6": 
        1.4421}
 1   {"0":2.21,"1":1.234,"2":1.31,"3":3.121,"4":2.22,"5":2.32322,"6":0.8873}

Thanks in advance.

4

1 に答える 1