-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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(python): Fix Series.to_numpy
for Array types with nulls and nested Arrays
#16230
Conversation
Series.to_numpy
for Array types with nullsSeries.to_numpy
for Array types with nulls and nested Arrays
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #16230 +/- ##
==========================================
- Coverage 80.85% 80.80% -0.06%
==========================================
Files 1394 1393 -1
Lines 179955 179388 -567
Branches 2909 2921 +12
==========================================
- Hits 145508 144958 -550
+ Misses 33942 33927 -15
+ Partials 505 503 -2 ☔ View full report in Codecov by Sentry. |
let chunks: Vec<_> = self.downcast_iter().map(|c| c.values().clone()).collect(); | ||
|
||
// SAFETY: Data type of arrays matches because they are chunks from the same array. | ||
unsafe { Series::from_chunks_and_dtype_unchecked(self.name(), chunks, &self.inner_dtype()) } |
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.
There seems to be no reason to use Series::_try_from_arrow_unchecked_with_md
..
Series::from_chunks_and_dtype_unchecked
preserves the data type, so it should also preserve any metadata present on that dtype.
Closes #14268
Changes
Series.to_numpy
to Rust