()
| 2119 | |
| 2120 | |
| 2121 | def 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 | |
| 2136 | def test_value_counts_simple(): |
nothing calls this directly
no test coverage detected