Skip to content

Conversation

@jeromepl
Copy link
Contributor

@jeromepl jeromepl commented Aug 4, 2025

The latest release (0.21.0) has a bug that breaks DataFrame#drop_nulls when used with a subset argument:

dataframe.drop_nulls(subset: "a")
# => TypeError:
#       no implicit conversion of Array into Polars::RbSelector

This comes from the following change in type signature in polars:
pola-rs/polars@8a961cd#diff-744a743b5337b77c8e26e0efabdfe8410bfd77e3d1e55ffa54eb0f29cc51e33bR1904

So we just need to apply the same change that was done in py-polars here:
pola-rs/polars@8a961cd#diff-6f7ee6a0f7f99cb158f4d68d883a118b9fab6175602e8696739d900c8b0d864fR7399

@ankane
Copy link
Owner

ankane commented Aug 4, 2025

Hi @jeromepl, thanks for reporting and the PR! Please make the examples consistent with the Python library.

@jeromepl
Copy link
Contributor Author

jeromepl commented Aug 4, 2025

@ankane sounds good. Should I put tests for the subset argument anywhere else or drop them entirely?

@ankane
Copy link
Owner

ankane commented Aug 4, 2025

The examples should be enough to test the subset option (bundle exec rake test:docs).

@jeromepl
Copy link
Contributor Author

jeromepl commented Aug 4, 2025

Ah right, my bad, I missed that py-polars has some examples with subset! I'll make the changes to the examples tomorrow!

@jeromepl jeromepl force-pushed the fix-drop-nulls-with-subset branch from d027677 to d25bf14 Compare August 5, 2025 13:15
@jeromepl
Copy link
Contributor Author

jeromepl commented Aug 5, 2025

@ankane the docstring examples have been updated to match py-polars

@ankane ankane merged commit b538a7b into ankane:master Aug 5, 2025
@ankane
Copy link
Owner

ankane commented Aug 5, 2025

Great, thanks @jeromepl!

@jeromepl
Copy link
Contributor Author

@ankane do you have any plan to cut a new release soon? This would enable us to upgrade easily to the latest version (we've been stuck on 0.19.0 because of a couple of bugs in the last releases)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants