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

Function test_split_rows_and_columns_utility

python/pyarrow/tests/test_csv.py:143–159  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

141
142
143def test_split_rows_and_columns_utility():
144 num_cols = 5
145 num_rows = 2
146 arr = [x for x in range(1, 11)]
147 rows = list(split_rows(arr, num_cols, num_rows))
148 assert rows == [
149 [1, 2, 3, 4, 5],
150 [6, 7, 8, 9, 10]
151 ]
152 columns = list(split_columns(arr, num_cols, num_rows))
153 assert columns == [
154 [1, 6],
155 [2, 7],
156 [3, 8],
157 [4, 9],
158 [5, 10]
159 ]
160
161
162def test_read_options(pickle_module):

Callers

nothing calls this directly

Calls 3

listFunction · 0.85
split_rowsFunction · 0.85
split_columnsFunction · 0.85

Tested by

no test coverage detected