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

Function test_read_table

python/pyarrow/tests/test_feather.py:180–200  ·  view source on GitHub ↗
(version)

Source from the content-addressed store, hash-verified

178
179@pytest.mark.pandas
180def test_read_table(version):
181 num_values = (100, 100)
182 path = random_path()
183
184 TEST_FILES.append(path)
185
186 values = np.random.randint(0, 100, size=num_values)
187 columns = ['col_' + str(i) for i in range(100)]
188 table = pa.Table.from_arrays(values, columns)
189
190 write_feather(table, path, version=version)
191
192 result = read_table(path)
193 assert result.equals(table)
194
195 # Test without memory mapping
196 result = read_table(path, memory_map=False)
197 assert result.equals(table)
198
199 result = read_feather(path, memory_map=False)
200 assert_frame_equal(table.to_pandas(), result)
201
202
203@pytest.mark.pandas

Callers

nothing calls this directly

Calls 6

write_featherFunction · 0.90
read_tableFunction · 0.90
read_featherFunction · 0.90
random_pathFunction · 0.85
equalsMethod · 0.80
appendMethod · 0.45

Tested by

no test coverage detected