()
| 4742 | |
| 4743 | @pytest.mark.pandas |
| 4744 | def test_dictionary_uint64_index_to_pandas(): |
| 4745 | # GH-37476: uint64 dictionary indices are preserved, and converting them to pandas |
| 4746 | # maps the indices to int64 categorical codes, which is safe because the indices are |
| 4747 | # bounded by the dictionary length. |
| 4748 | arr = pa.array(["a", "b", None, "a"], type=pa.dictionary(pa.uint64(), pa.string())) |
| 4749 | result = arr.to_pandas() |
| 4750 | assert list(result.cat.categories) == ["a", "b"] |
| 4751 | assert result.cat.codes.tolist() == [0, 1, -1, 0] |
| 4752 | |
| 4753 | |
| 4754 | @pytest.mark.parametrize("op", [ |
nothing calls this directly
no test coverage detected