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

Function test_unique_simple

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

Source from the content-addressed store, hash-verified

2119
2120
2121def test_unique_simple():
2122 cases = [
2123 (pa.array([1, 2, 3, 1, 2, 3]), pa.array([1, 2, 3])),
2124 (pa.array(['foo', None, 'bar', 'foo']),
2125 pa.array(['foo', None, 'bar'])),
2126 (pa.array(['foo', None, 'bar', 'foo'], pa.large_binary()),
2127 pa.array(['foo', None, 'bar'], pa.large_binary())),
2128 ]
2129 for arr, expected in cases:
2130 result = arr.unique()
2131 assert result.equals(expected)
2132 result = pa.chunked_array([arr]).unique()
2133 assert result.equals(expected)
2134
2135
2136def test_value_counts_simple():

Callers

nothing calls this directly

Calls 4

equalsMethod · 0.80
chunked_arrayMethod · 0.80
arrayMethod · 0.45
uniqueMethod · 0.45

Tested by

no test coverage detected