hipdf.DataFrame.to_arrow#
20 min read time
Applies to Linux
- DataFrame.to_arrow(preserve_index=True)#
Convert to a PyArrow Table.
Parameters#
- preserve_indexbool, default True
whether index column and its meta data needs to be saved or not
Returns#
PyArrow Table
Examples#
>>> import cudf >>> df = cudf.DataFrame( ... {"a":[1, 2, 3], "b":[4, 5, 6]}, index=[1, 2, 3]) >>> df.to_arrow() pyarrow.Table a: int64 b: int64 index: int64 ---- a: [[1,2,3]] b: [[4,5,6]] index: [[1,2,3]] >>> df.to_arrow(preserve_index=False) pyarrow.Table a: int64 b: int64 ---- a: [[1,2,3]] b: [[4,5,6]]