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

Function test_drop_null_record_batch

python/pyarrow/tests/test_compute.py:1588–1602  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1586
1587
1588def test_drop_null_record_batch():
1589 batch = pa.record_batch(
1590 [pa.array(["a", None, "c", "d", None])], names=["a'"])
1591 result = batch.drop_null()
1592 expected = pa.record_batch([pa.array(["a", "c", "d"])], names=["a'"])
1593 assert result.equals(expected)
1594
1595 batch = pa.record_batch(
1596 [pa.array(["a", None, "c", "d", None]),
1597 pa.array([None, None, "c", None, "e"])], names=["a'", "b'"])
1598
1599 result = batch.drop_null()
1600 expected = pa.record_batch(
1601 [pa.array(["c"]), pa.array(["c"])], names=["a'", "b'"])
1602 assert result.equals(expected)
1603
1604
1605def test_drop_null_table():

Callers

nothing calls this directly

Calls 2

equalsMethod · 0.80
arrayMethod · 0.45

Tested by

no test coverage detected