-
Notifications
You must be signed in to change notification settings - Fork 908
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrate CSV writer to pylibcudf (#17163)
Apart of #15162 Authors: - Matthew Murray (https://github.com/Matt711) Approvers: - David Wendt (https://github.com/davidwendt) - Matthew Roeschke (https://github.com/mroeschke) - Vyas Ramasubramani (https://github.com/vyasr) - Lawrence Mitchell (https://github.com/wence-) URL: #17163
- Loading branch information
Showing
9 changed files
with
462 additions
and
121 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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# Copyright (c) 2024, NVIDIA CORPORATION. | ||
|
||
from libcpp.vector cimport vector | ||
from libcpp.string cimport string | ||
from libcpp cimport bool | ||
from pylibcudf.libcudf.io.csv cimport ( | ||
csv_writer_options, | ||
csv_writer_options_builder, | ||
) | ||
from pylibcudf.libcudf.io.types cimport quote_style | ||
from pylibcudf.io.types cimport SinkInfo | ||
from pylibcudf.table cimport Table | ||
|
||
cdef class CsvWriterOptions: | ||
cdef csv_writer_options c_obj | ||
cdef Table table | ||
cdef SinkInfo sink | ||
|
||
|
||
cdef class CsvWriterOptionsBuilder: | ||
cdef csv_writer_options_builder c_obj | ||
cdef Table table | ||
cdef SinkInfo sink | ||
cpdef CsvWriterOptionsBuilder names(self, list names) | ||
cpdef CsvWriterOptionsBuilder na_rep(self, str val) | ||
cpdef CsvWriterOptionsBuilder include_header(self, bool val) | ||
cpdef CsvWriterOptionsBuilder rows_per_chunk(self, int val) | ||
cpdef CsvWriterOptionsBuilder line_terminator(self, str term) | ||
cpdef CsvWriterOptionsBuilder inter_column_delimiter(self, str delim) | ||
cpdef CsvWriterOptionsBuilder true_value(self, str val) | ||
cpdef CsvWriterOptionsBuilder false_value(self, str val) | ||
cpdef CsvWriterOptions build(self) | ||
|
||
|
||
cpdef void write_csv(CsvWriterOptions options) |
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
Oops, something went wrong.