Afsalmc commented on issue #29508:
URL: https://github.com/apache/superset/issues/29508#issuecomment-2212383110

   **Solution:**
   
   We can control what escape characters should be set while exporting pandas 
Dataframe through a superset config. By default we are not setting any escape 
character, only the encoding to use is set.
   `CSV_EXPORT = {"encoding": "utf-8"}`
   
   We can modify this config to specify an escape character, 
   
   `CSV_EXPORT = {"encoding": "utf-8","escapechar": "\\"}`
   
   
   which will then passed as **kwargs to  to_csv() in **csv.py**
   
   ```
   def df_to_escaped_csv(df: pd.DataFrame, **kwargs: Any) -> Any:
      ...........................................................
      ...........................................................
       return df.to_csv(**kwargs)
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to