mistercrunch commented on a change in pull request #3441: config: allow 
choosing separator character and encoding for csv writing
URL: 
https://github.com/apache/incubator-superset/pull/3441#discussion_r138146009
 
 

 ##########
 File path: superset/views/core.py
 ##########
 @@ -2126,13 +2126,15 @@ def csv(self, client_id):
             columns = [c['name'] for c in obj['columns']]
             df = pd.DataFrame.from_records(obj['data'], columns=columns)
             logging.info("Using pandas to convert to CSV")
-            csv = df.to_csv(index=False, encoding='utf-8')
+            csv = df.to_csv(index=False, 
encoding=str(config.get('CSV_EXPORT')['ENCODING']),
+                            sep=str(config.get('CSV_EXPORT')['SEPARATOR']))
 
 Review comment:
   Why casting to `str`?
 
----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to