forked from apache/arrow-rs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow specifying comment character for CSV reader
This patch adds reader support for a comment character for reading CSV files. While comments like almost nothing around the CSV format are not truly standardized, a common format supported by many CSV readers[^1][^2] is to ignore full lines starting with a comment character (often `#`); inline or end of line comments are not supported. Example: # This is a comment in a CSV file without header. 1,2 # Comment inside the data block. 11,22 The implementation of this for Arrow is pretty straight-forward as all we need to do is expose the existing `comment` option of `csv_core` used to read CSV files. Closes apache#5758. [^1]: https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.read_csv.html [^2]: https://stat.ethz.ch/R-manual/R-devel/library/utils/html/read.table.html
- Loading branch information
Showing
1 changed file
with
51 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters