pitrou commented on a change in pull request #9386:
URL: https://github.com/apache/arrow/pull/9386#discussion_r568730716



##########
File path: docs/source/python/csv.rst
##########
@@ -75,7 +75,16 @@ Customized conversion
 ---------------------
 
 To alter how CSV data is converted to Arrow types and data, you should create
-a :class:`ConvertOptions` instance and pass it to :func:`read_csv`.
+a :class:`ConvertOptions` instance and pass it to :func:`read_csv`::
+
+   table = csv.read_csv('testdata.csv', convert_options=pa.csv.ConvertOptions(
+    column_types={
+        's_name': pa.string(),
+        's_start_date': pa.string(),
+        'agg_percentile_bps': pa.decimal128(precision=38, scale=10),
+    }
+   ))

Review comment:
       It would be better if the example was related to the example above, IMHO.




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

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to