-
Notifications
You must be signed in to change notification settings - Fork 121
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
feat: add **kwargs
to read_csv
and scan_csv
#1560
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.
thanks @raisadz !
just one minor comment
also, if we could include a teeny tiny little test which uses nw.read_csv('file.csv', native_namespace=pd, engine='pyarrow')
that'd be grand
elif implementation is Implementation.PYARROW: | ||
from pyarrow import csv # ignore-banned-import | ||
|
||
native_frame = csv.read_csv(source) | ||
native_frame = csv.read_csv(source, **kwargs) |
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 we need to pass them in line 1020 too?
elif implementation is Implementation.DASK: | ||
native_frame = native_namespace.read_csv(source) | ||
native_frame = native_namespace.read_csv(source, **kwargs) |
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.
1102 too
tests/read_csv_test.py
Outdated
@@ -40,3 +41,13 @@ def test_read_csv_v1( | |||
result = nw_v1.read_csv(filepath, native_namespace=native_namespace) | |||
assert_equal_data(result, data) | |||
assert isinstance(result, nw_v1.DataFrame) | |||
|
|||
|
|||
def test_read_csv_kwargs( |
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.
this is failing on the minimum versions
can we use skipif
with the pandas version < (1,5)? there's some other tests that do something like this
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.
Thanks @raisadz !
What type of PR is this? (check all applicable)
Related issues
Checklist
If you have comments or can explain your changes, please do so below