polars
polars copied to clipboard
fix(python): Fix `pl.Series` 's dtype for pyarrow path
xref https://github.com/pola-rs/polars/pull/15948#issuecomment-2082792776 and a follow-up PR of #15948
Fix wrong dtype
when create pl.Series
from pd.Series
.
when
print(pl.Series("foo", pd.Series([1, 2, 3], dtype='Int64'), pl.Float32))
before
shape: (3,)
Series: 'foo' [i64]
[
1
2
3
]
after
shape: (3,)
Series: 'foo' [f32]
[
1.0
2.0
3.0
]
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 80.98%. Comparing base (
acb601d
) to head (c000f20
).
Additional details and impacted files
@@ Coverage Diff @@
## main #15962 +/- ##
=======================================
Coverage 80.97% 80.98%
=======================================
Files 1386 1386
Lines 178479 178479
Branches 2877 2877
=======================================
+ Hits 144530 144539 +9
+ Misses 33458 33448 -10
- Partials 491 492 +1
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Thanks, @MarcoGorelli, for the quick review. I believe I now understand what you meant and have made the necessary changes.
- a test where you convert from a pyarrow array with
strict=False
- a test where you convert from a pandas series with
strict=False
I believe the change has been made
Thanks, @MarcoGorelli, for your patience and selfless help. This PR wouldn't have been completed without you!