i have this json file i wanted to convert it to CSV using pandas
{
"partes": [
{
"processo": "1001824-89.2019.8.26.0493",
"tipo": "Reqte: ",
"nome": "Sérgio Izaias Massaranduba Advogada: Mariana Pretel E Pretel ",
"cnpj_cpf": "Não encontrado",
"oab": "Não encontrado"
},
{
"processo": "1001824-89.2019.8.26.0493",
"tipo": "Reqda: ",
"nome": "CLARO S/A ",
"cnpj_cpf": "Não encontrado",
"oab": "Não encontrado"
}
],
"movimentacoes": [
{
"processo": "1001824-89.2019.8.26.0493",
"data": "28/10/2019",
"tem_anexo": "",
"movimentacao": " Distribuído Livremente (por Sorteio) (movimentação exclusiva do distribuidor) "
}
]
}
when i use the following function read_json
,
he returns me one of these error ValueError: arrays must all be same length
aqui está meu código:
import pandas as pd
import json
import os
os.chdir('C:\\Users\\Suporte\\Desktop\\AUT\\autonomation')
df = pd.read_json('file.json')
df_ = df.to_csv('file.csv', sep=';',index=False)
I don't know why he can't read the file