Reads the CSV file into memory using pyarrow's read_csv csv The CSV bytes args Positional arguments to be forwarded to pyarrow's read_csv validate_full Whether or not to fully validate the resulting table kwargs Keyword arguments to be forwarded to pyarrow's
(self, csv, *args, validate_full=True, **kwargs)
| 779 | class BaseCSVTableRead(BaseTestCSV): |
| 780 | |
| 781 | def read_csv(self, csv, *args, validate_full=True, **kwargs): |
| 782 | """ |
| 783 | Reads the CSV file into memory using pyarrow's read_csv |
| 784 | csv The CSV bytes |
| 785 | args Positional arguments to be forwarded to pyarrow's read_csv |
| 786 | validate_full Whether or not to fully validate the resulting table |
| 787 | kwargs Keyword arguments to be forwarded to pyarrow's read_csv |
| 788 | """ |
| 789 | assert isinstance(self.use_threads, bool) # sanity check |
| 790 | read_options = kwargs.setdefault('read_options', ReadOptions()) |
| 791 | read_options.use_threads = self.use_threads |
| 792 | table = read_csv(csv, *args, **kwargs) |
| 793 | table.validate(full=validate_full) |
| 794 | return table |
| 795 | |
| 796 | def read_bytes(self, b, **kwargs): |
| 797 | return self.read_csv(pa.py_buffer(b), **kwargs) |
no test coverage detected