(self, path, arr)
| 27 | return arr.to_pandas().to_numpy() |
| 28 | |
| 29 | def write(self, path, arr): |
| 30 | logging.debug( |
| 31 | "Writing to %s using CSV format with configuration %s" |
| 32 | % (path, self.__dict__) |
| 33 | ) |
| 34 | write_options = pyarrow.csv.WriteOptions( |
| 35 | include_header=False, delimiter=self.delimiter |
| 36 | ) |
| 37 | arr = pyarrow.Table.from_pandas(pd.DataFrame(arr)) |
| 38 | pyarrow.csv.write_csv(arr, path, write_options=write_options) |
| 39 | logging.debug("Done writing to %s" % path) |