jorisvandenbossche commented on a change in pull request #12543:
URL: https://github.com/apache/arrow/pull/12543#discussion_r837247576
##########
File path: python/pyarrow/_csv.pyx
##########
@@ -938,6 +1169,34 @@ def read_csv(input_file, read_options=None,
parse_options=None,
-------
:class:`pyarrow.Table`
Contents of the CSV file as a in-memory table.
+
+ Examples
+ --------
+
+ Defining an example file from bytes object:
+
+ >>> import io
+ >>> s =
"animals,n_legs,entry\\nFlamingo,2,2022-03-01\\nHorse,4,2022-03-02\\nBrittle
stars,5,2022-03-03\\nCentipede,100,2022-03-04"
+ >>> print(s)
+ animals,n_legs,entry
+ Flamingo,2,2022-03-01
+ Horse,4,2022-03-02
+ Brittle stars,5,2022-03-03
+ Centipede,100,2022-03-04
+ >>> source = io.BytesIO(s.encode())
+
+ Reading from the file
+
+ >>> from pyarrow import csv
+ >>> csv.read_csv(source)
Review comment:
`source` doesn't exist here?
--
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]