MCPcopy Create free account
hub / github.com/apache/arrow / test_nested_dictionary_array

Function test_nested_dictionary_array

python/pyarrow/tests/test_array.py:3642–3649  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3640
3641
3642def test_nested_dictionary_array():
3643 dict_arr = pa.DictionaryArray.from_arrays([0, 1, 0], ['a', 'b'])
3644 list_arr = pa.ListArray.from_arrays([0, 2, 3], dict_arr)
3645 assert list_arr.to_pylist() == [['a', 'b'], ['a']]
3646
3647 dict_arr = pa.DictionaryArray.from_arrays([0, 1, 0], ['a', 'b'])
3648 dict_arr2 = pa.DictionaryArray.from_arrays([0, 1, 2, 1, 0], dict_arr)
3649 assert dict_arr2.to_pylist() == ['a', 'b', 'a', 'b', 'a']
3650
3651
3652@pytest.mark.numpy

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected