I know this is has been asked many times but I still have no solution to my problem and I'm not that good at programming so basically I have so many json files but the format of the json is very different so I can't get the output that I want with pandas library , here is an example of the json file .
[
{
"Names": [
"James",
"Bob",
"David"
],
"Salary": [
"2000$",
"5000$",
"6000$"
],
"Id": [
"1",
"2",
"3"
]
},
{
"Names": [
"John",
"Charles",
"Harry"
],
"Salary": [
"1000$",
"2000$",
"3000$"
],
"Id": [
"4",
"5",
"6"
]
}
]
when I did convert this with pandas using this simple code:
import json
import pandas as pd
df=pd.read_json("test.json")
df.to_csv("results.csv")
https://i.stack.imgur.com/jPlQx.png
the problem is the output of csv file give me all the 3 names in one single cell just like that ['James', 'Bob', 'David'] , ['2000$', '5000$', '6000$'] ... but I want only one name in the cell not all 3 of them I'm very new to these stuff I will appreciate any help