georgexsh opened a new issue #5372: `CSV_EXPORT.encoding` config option has no effect when exporting csv URL: https://github.com/apache/incubator-superset/issues/5372 ### Superset version Superset 0.26.3 and current HEAD 6b15592 Python 3.5.3 (via docker) ### Expected results after added following config: ``` CSV_EXPORT = { 'encoding': 'utf-8-sig', } ``` expected the exported csv file is encoded in `utf-8-sig` ### Actual results exported csv is still encoded in `utf-8`. ### Steps to reproduce set this option, export a csv file. related with #4506 ### Root cause superset exports csv with following code: ``` csv = df.to_csv(index=False, **config.get('CSV_EXPORT')) ``` `pandas.DataFrame.to_csv` [doc says](https://pandas.pydata.org/pandas-docs/stable/generated/pandas.DataFrame.to_csv.html#pandas.DataFrame.to_csv): > path_or_buf : string or file handle, default None > File path or object, if None is provided the result is returned as a string. as superset has not set `path_or_buf` parameter, pandas uses `StringIO` internally, `encoding` parameter is ommited, superset shoule do the encoding itself.
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
