AlenkaF commented on a change in pull request #12543:
URL: https://github.com/apache/arrow/pull/12543#discussion_r818656432



##########
File path: python/pyarrow/_csv.pyx
##########
@@ -328,6 +429,30 @@ cdef class ParseOptions(_Weakrefable):
     def delimiter(self):
         """
         The character delimiting individual cells in the CSV data.
+
+        Examples:
+        ---------
+
+        >>> from pyarrow import csv
+
+        >>> parse_options = csv.ParseOptions(delimiter=";")
+        >>> csv.read_csv("animals.csv", parse_options=parse_options)
+        pyarrow.Table
+        animals,"n_legs","entry": string
+        ----
+        animals,"n_legs","entry": 
[["Flamingo,2,"01/03/2022"","Horse,4,"02/03/2022"",
+        "Brittle stars,5,"03/03/2022"","Centipede,100,"04/03/2022""]]

Review comment:
       One option would be to create different `.csv` files so data could be 
parsed correctly but I can't do that with `csv.write_csv`.
   
   I agree, it doesn't look nice. It does show what it does, but I should find 
a better way to do this.
   
   Maybe it would be better just to include the examples that work/not confuse 
and leave out the others. Once the user sees how the options are used, there is 
no need to list them all anyways. Especially if they will be listed under one 
docsting.




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


Reply via email to