on macOS I've prepared python script with pandas, which reads csv file to dataframe and writes DF to file as JSON. The csv is xlsx saved as csv.
CSV contains strings like "Sławek" which appears in json as "S\u0142awek".
What can be done about it, to still have in JSON letters not their codes ?
the code is:
import pandas
import os
files = [f for f in os.listdir('.') if os.path.isfile(f)]
for f in files:
if f.find('csv')>=0 and f.find('~')<0:
excel_data_df = pandas.read_csv(f, header=0, delimiter=';')
print(excel_data_df)
json_str = excel_data_df.to_json(orient='records')
print(json_str)
f = open(f.replace('csv','json'), "w")
f.write(json_str)
f.close()
print(excel_data_df) prints "ł" print(json_str) prints "\u0142"