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

fix: Fix the non-null test of transpose #13783

Merged
merged 1 commit into from
Jan 17, 2024
Merged

Conversation

reswqa
Copy link
Collaborator

@reswqa reswqa commented Jan 17, 2024

This fixes #13777.

@github-actions github-actions bot added fix Bug fix python Related to Python Polars rust Related to Rust Polars labels Jan 17, 2024
@@ -94,7 +94,7 @@ impl DataFrame {
Some(cn) => match cn {
Either::Left(name) => {
let new_names = self.column(&name).and_then(|x| x.str())?;
polars_ensure!(!new_names.has_validity(), ComputeError: "Column with new names can't have null values");
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

While the absence of a validity bitmask guarantees that a Series does not have null values, but the converse is not true.

@reswqa reswqa marked this pull request as ready for review January 17, 2024 09:50
@ritchie46 ritchie46 merged commit f83c413 into pola-rs:main Jan 17, 2024
24 checks passed
@reswqa reswqa deleted the transpose_fix branch January 17, 2024 13:53
r-brink pushed a commit to r-brink/polars that referenced this pull request Jan 22, 2024
r-brink pushed a commit to r-brink/polars that referenced this pull request Jan 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix Bug fix python Related to Python Polars rust Related to Rust Polars
Projects
None yet
Development

Successfully merging this pull request may close these issues.

transpose function is not able to take column names from an existing column
2 participants