Code:
with open(read_json,'r',encoding='utf-8') as json_file:
json_data = json.load(json_file)
print(json_data)
with open(write_csv,'w',encoding='utf-8') as csv_file:
headers, items = parse_json(json_data,query_type)
# i is to be iterated to get all maxResults = 50.
writer = csv.writer(csv_file)
writer.writerow(headers)
for row in items:
writer.writerow(row)
CSV file:
Im having weird characters in my CSV files not exactly sure whats happening.


utf-8-sigas the encoding and it should fix the issue.