AlenkaF commented on code in PR #48619:
URL: https://github.com/apache/arrow/pull/48619#discussion_r2704002543
##########
docs/source/python/csv.rst:
##########
@@ -83,15 +88,21 @@ Customized parsing
To alter the default parsing settings in case of reading CSV files with an
unusual structure, you should create a :class:`ParseOptions` instance
-and pass it to :func:`read_csv`::
-
- import pyarrow as pa
- import pyarrow.csv as csv
-
- table = csv.read_csv('tips.csv.gz', parse_options=csv.ParseOptions(
- delimiter=";",
- invalid_row_handler=skip_handler
- ))
+and pass it to :func:`read_csv`:
+
+.. code-block:: python
+
+ >>> def skip_handler(row):
+ ... pass
+ >>> table = csv.read_csv('tips.csv.gz', parse_options=csv.ParseOptions(
+ ... delimiter=";",
+ ... invalid_row_handler=skip_handler
+ ... ))
+ >>> table
+ pyarrow.Table
+ col1,"col2": string
+ ----
+ col1,"col2": [["1,"a"","2,"b"","3,"c""]]
Review Comment:
Correct 👍
--
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]