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

Function test_table_remove_column_empty

python/pyarrow/tests/test_table.py:1783–1796  ·  view source on GitHub ↗
(cls)

Source from the content-addressed store, hash-verified

1781 ]
1782)
1783def test_table_remove_column_empty(cls):
1784 # ARROW-1865
1785 data = [
1786 pa.array(range(5)),
1787 ]
1788 table = cls.from_arrays(data, names=['a'])
1789
1790 t2 = table.remove_column(0)
1791 t2.validate()
1792 assert len(t2) == len(table)
1793
1794 t3 = t2.add_column(0, table.field(0), table[0])
1795 t3.validate()
1796 assert t3.equals(table)
1797
1798
1799def test_empty_table_with_names():

Callers

nothing calls this directly

Calls 6

lenFunction · 0.85
equalsMethod · 0.80
arrayMethod · 0.45
remove_columnMethod · 0.45
validateMethod · 0.45
fieldMethod · 0.45

Tested by

no test coverage detected