HyukjinKwon commented on a change in pull request #34619:
URL: https://github.com/apache/spark/pull/34619#discussion_r750779556



##########
File path: python/pyspark/pandas/namespace.py
##########
@@ -328,6 +334,11 @@ def read_csv(
 
         reader.options(**options)
 
+        if encoding is not None:
+            if encoding in encoding_mapping:
+                encoding = encoding_mapping[encoding]
+            reader.option("encoding", encoding)

Review comment:
       ```suggestion
           if encoding is not None:
               reader.option("encoding", encoding_mapping.get(encoding, 
encoding))
   ```




-- 
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