Python has an extra double quotation mark when writing to csv

csv.writer(f, dialect="excel").writerow(               [{"found_year":found_year,"jg_type":jg_type,"area":area,"source_gw_link":source_gw_link,"jianjie":jianjie,"lianxi":lianxi},{"company_news":company_news}, {"name":name,"sex":sex,"company":company,"position":position,"role" :role, "edu_experience":edu_experience,"work_experience": json.dumps(OrderedDict(sorted(work_experience.items()))).encode("utf-8").decode("unicode_escape")}, {"lingyu":lingyu,"jiguan":jiguan,"lunci":lunci,"jieduan":jieduan,"jieshao":jieshao,"money_type":money_type,"touzianlie":json.dumps(OrderedDict (sorted(tzanli.items()))).encode("utf-8").decode("unicode_escape")},{"person_news":json.dumps(OrderedDict(sorted(person_news.items()))).encode("utf-8").decode("unicode_escape")}])

one of the pieces of this message I printed on the screen reads" news_date": "2018.7.17. Later, when I inserted the csv, it became like this
"" news_date ":"2018.7.26"

."?
Apr.03,2021

the key 'news_date' is not seen in your source code. The solution is to remove the single quotes around 'news_date' and ' 2018.7.17' before exporting the code. This quotation mark does not represent a string, but is part of the string itself .

you can try it yourself. if the variable has its own quotation marks, the quotation marks will be printed, such as

.
  
embarrassed, you don't see news_date . Please upload all the data.
Menu