-
Notifications
You must be signed in to change notification settings - Fork 908
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Migrate CSV writer to pylibcudf #17163
Merged
Merged
Changes from 39 commits
Commits
Show all changes
40 commits
Select commit
Hold shift + click to select a range
cd78dcd
[WIP] Migrate CSV writer to pylibcudf
Matt711 4f899b6
migrate the CSV writer
Matt711 6723045
get existing test passing
Matt711 cbeea6b
add a test
Matt711 d3998fc
Merge branch 'branch-24.12' into pylibcudf-io-csv
Matt711 8286f74
clean up
Matt711 dc93b8b
merge conflict
Matt711 d7d21ca
add more test cases
Matt711 a6007d7
Merge branch 'branch-24.12' into pylibcudf-io-csv
Matt711 2ce052f
Merge branch 'branch-24.12' into pylibcudf-io-csv
Matt711 1a8c38c
fix type checking in SinkInfo
Matt711 afaa46c
Merge branch 'branch-24.12' into pylibcudf-io-csv
Matt711 b132456
Merge branch 'branch-24.12' into pylibcudf-io-csv
Matt711 5f8e4b9
Expose the CsvWriterOptions nad CsvWriterOptionsBuilder
Matt711 2287eba
Merge branch 'branch-24.12' into pylibcudf-io-csv
Matt711 3706bd5
Add type stubs
Matt711 15370b0
commit declaration file
Matt711 f10492c
merge conflict
Matt711 dd72323
Merge branch 'branch-24.12' into pylibcudf-io-csv
Matt711 4e706bd
add type stub
Matt711 99e770a
switch to options arg
Matt711 cf11996
remove casts
Matt711 f9e4570
clean up
Matt711 b7d971a
keep tables alive
Matt711 464ae48
address review
Matt711 2643831
addres reviews
Matt711 fb2e1bc
Merge branch 'branch-24.12' into pylibcudf-io-csv
Matt711 ffe895e
add to all
Matt711 496d664
clean up
Matt711 d6b3667
clean up
Matt711 94599b9
simplify fixtures
Matt711 4bdd6dd
Merge branch 'branch-24.12' into pylibcudf-io-csv
Matt711 18978ff
Merge branch 'branch-24.12' into pylibcudf-io-csv
Matt711 ffdee70
address review
Matt711 3a5dca6
fix write_csv doc string
Matt711 2da0446
finish addressing review
Matt711 0b6042a
Merge branch 'branch-24.12' into pylibcudf-io-csv
Matt711 e33d2ea
address review
Matt711 becc262
remove post processing
Matt711 aac021f
clean up
Matt711 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: Let's do this in a followup, these should return
Self
(fromtyping
). Edit: apart frombuild
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will do