i have actually a pandas dataframe and i want to save it to json format.
From the pandas docs it says:
Note NaN‘s, NaT‘s and None will be converted to null and datetime
objects will be converted based on the date_format and date_unit
parameters
Then using the orient option records
i have something like this
[{"A":1,"B":4,"C":7},{"A":null,"B":5,"C":null},{"A":3,"B":null,"C":null}]
Is it possible to have this instead:
[{"A":1,"B":4,"C":7},{"B":5},{"A":3}]'
Thank you
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…