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

Function test_drop_null

python/pyarrow/tests/test_compute.py:1571–1577  ·  view source on GitHub ↗
(ty, values)

Source from the content-addressed store, hash-verified

1569
1570@pytest.mark.parametrize(('ty', 'values'), all_array_types)
1571def test_drop_null(ty, values):
1572 arr = pa.array(values, type=ty)
1573 result = arr.drop_null()
1574 result.validate(full=True)
1575 indices = [i for i in range(len(arr)) if arr[i].is_valid]
1576 expected = arr.take(pa.array(indices))
1577 assert result.equals(expected)
1578
1579
1580def test_drop_null_chunked_array():

Callers

nothing calls this directly

Calls 5

lenFunction · 0.85
equalsMethod · 0.80
arrayMethod · 0.45
validateMethod · 0.45
takeMethod · 0.45

Tested by

no test coverage detected