-
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
Conversation
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.
A few questions
return csv_options | ||
|
||
|
||
def write_csv( |
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.
Can this (should this? @vyasr) be a cpdef function?
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.
Yes. We've been cpdef'ing them, so I did it here too
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.
I think it's good practice to do it consistently everywhere to enable full Cython usage. For I/O it's probably less important in the grand scheme of things since that shouldn't propagate bad typing afterwards in any way, but consistency helps.
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.
Some small suggestions, but nothing blocking. Looks great overall.
/merge |
1 similar comment
/merge |
class CsvWriterOptionsBuilder: | ||
def __init__(self): ... | ||
def names(self, names: list) -> CsvWriterOptionsBuilder: ... | ||
def na_rep(self, val: str) -> CsvWriterOptionsBuilder: ... | ||
def include_header(self, val: bool) -> CsvWriterOptionsBuilder: ... | ||
def rows_per_chunk(self, val: int) -> CsvWriterOptionsBuilder: ... | ||
def line_terminator(self, term: str) -> CsvWriterOptionsBuilder: ... | ||
def inter_column_delimiter( | ||
self, delim: str | ||
) -> CsvWriterOptionsBuilder: ... | ||
def true_value(self, val: str) -> CsvWriterOptionsBuilder: ... | ||
def false_value(self, val: str) -> CsvWriterOptionsBuilder: ... | ||
def build(self) -> CsvWriterOptions: ... |
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
(from typing
). Edit: apart from build
.
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
Description
Apart of #15162
Checklist