Is PyArrow Append Columns an In-Place Operation?

4 weeks ago 37
ARTICLE AD BOX
col_a = pa.array([1, 2, 3], pa.int32()) col_b = pa.array(["X", "Y", "Z"], pa.string()) table = pa.Table.from_arrays( [col_a, col_b], schema=pa.schema([ pa.field('a', col_a.type), pa.field('b', col_b.type), ]) ) table = table.append_column('COUNTRY_ID', pa.array(['IT'] * table.num_rows, pa.string()))

Will the table = table.append_column operation in PyArrow cause a double memory? Or it is just a pointer.

Sze Yu Sim's user avatar

Read Entire Article