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

Function test_table_from_lists

python/pyarrow/tests/test_table.py:1627–1643  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1625
1626
1627def test_table_from_lists():
1628 data = [
1629 list(range(5)),
1630 [-10, -5, 0, 5, 10]
1631 ]
1632
1633 result = pa.table(data, names=['a', 'b'])
1634 expected = pa.Table.from_arrays(data, names=['a', 'b'])
1635 assert result.equals(expected)
1636
1637 schema = pa.schema([
1638 pa.field('a', pa.uint16()),
1639 pa.field('b', pa.int64())
1640 ])
1641 result = pa.table(data, schema=schema)
1642 expected = pa.Table.from_arrays(data, schema=schema)
1643 assert result.equals(expected)
1644
1645
1646def test_table_pickle(pickle_module):

Callers

nothing calls this directly

Calls 4

listFunction · 0.85
equalsMethod · 0.80
schemaMethod · 0.45
fieldMethod · 0.45

Tested by

no test coverage detected