I have written a code to convert csv file to nested json format. I have multiple columns to be nested hence assigning separately for each column. The problem is I'm getting 2 fields for the same column in the json output.
I'm getting 2 entries for the fields I have assigned using row[''].
1.Is there any other way to get rid of this? I want only one entry for a particular field in each record.
2. Also how can I convert the keys to lower case after reading from csv.DictReader(). In my csv file all the columns are in upper case and hence I'm using the same to assign. But I want to convert all of them to lower case.
Below is the output getting:
I'm expecting output to be like below:
He's dead Jim. Grab his tricorder. I'll get his wallet and this tiny ad:
global solutions you can do at home or in your backyard