You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "Asthenia0412 (via GitHub)" <gi...@apache.org> on 2026/10/14 08:13:28 UTC
[PR] GH-51696: Remove stale float16 guard in from_dataframe [arrow]
Asthenia0412 opened a new pull request, #53727:
URL: https://github.com/apache/arrow/pull/53727
## Background
A stale guard in `from_dataframe.py` rejects pandas float16 columns with NaN values, claiming `pc.is_nan` has no float16 kernel.
## Problem
Every `from_dataframe()` call with a float16 DataFrame raises `NotImplementedError`.
## Solution
Removed the outdated guard block. PR #46866 already added float16 support to `pc.is_nan` (GH-45083), so float16 now flows through the same code path as other float widths.
## Testing
Verified that `from_dataframe(pd.DataFrame({'h': np.array([1.5, np.nan], dtype='<f2')}))` now succeeds and produces a table with correct null handling.
Also updated the existing test `test_pandas_to_pyarrow_float16_with_missing` to verify correct behavior instead of expecting `NotImplementedError`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-51696: Remove stale float16 guard in from_dataframe [arrow]
Posted by "Asthenia0412 (via GitHub)" <gi...@apache.org>.
Asthenia0412 closed pull request #53727: GH-51696: Remove stale float16 guard in from_dataframe
URL: https://github.com/apache/arrow/pull/53727
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-51696: Remove stale float16 guard in from_dataframe [arrow]
Posted by "rok (via GitHub)" <gi...@apache.org>.
rok commented on code in PR #53727:
URL: https://github.com/apache/arrow/pull/53727#discussion_r4268406751
##########
python/pyarrow/tests/interchange/test_conversion.py:
##########
@@ -319,14 +319,13 @@ def test_pandas_to_pyarrow_with_missing(np_float_str):
@pytest.mark.pandas
def test_pandas_to_pyarrow_float16_with_missing():
Review Comment:
Perhaps it's better to just remove`test_pandas_to_pyarrow_float16_with_missing` test and make sure `pc.is_nan` on float16 is tested where all other types are tested.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org