Skip to content
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: implement to_arrow for cuDF #924

Merged
merged 3 commits into from
Sep 9, 2024

Conversation

LiamConnors
Copy link
Member

@LiamConnors LiamConnors commented Sep 7, 2024

What type of PR is this? (check all applicable)

  • πŸ’Ύ Refactor
  • ✨ Feature
  • πŸ› Bug Fix
  • πŸ”§ Optimization
  • πŸ“ Documentation
  • βœ… Test
  • 🐳 Other

Related issues

Checklist

  • Code follows style guide (ruff)
  • Tests added
  • Documented the changes

If you have comments or can explain your changes, please do so below.

Copy link
Member

@MarcoGorelli MarcoGorelli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks @LiamConnors !

looking at the cuDF docs again, I think we can implement this one

we can modify

if self._implementation is Implementation.CUDF: # pragma: no cover
msg = "`to_arrow` is not implemented for CuDF backend."
raise NotImplementedError(msg)

to return self._native_frame.to_arrow(preserve_index=False) (see https://docs.rapids.ai/api/cudf/stable/user_guide/api_docs/api/cudf.dataframe.to_arrow/#cudf.DataFrame.to_arrow)

If we do that, then I think these tests won't need xfailing

@LiamConnors LiamConnors changed the title test: xfail to_arrow tests for cuDF feat: implement to_arrow for cuDF Sep 8, 2024
@github-actions github-actions bot added the enhancement New feature or request label Sep 8, 2024
@LiamConnors
Copy link
Member Author

Thanks @MarcoGorelli! I've updated the PR and the tests pass in the notebook now

Copy link
Member

@MarcoGorelli MarcoGorelli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

awesome, thanks @LiamConnors ! πŸ™Œ

@MarcoGorelli MarcoGorelli merged commit 7bfb776 into narwhals-dev:main Sep 9, 2024
27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request internal
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants