cudf.DataFrame.from_arrow#
- classmethod DataFrame.from_arrow(table)[source]#
Convert from PyArrow Table to DataFrame.
- Parameters:
- tablePyArrow Table Object
PyArrow Table Object which has to be converted to cudf DataFrame.
- Returns:
- cudf DataFrame
- Raises:
- TypeError for invalid input type.
Examples
>>> import cudf >>> import pyarrow as pa >>> data = pa.table({"a":[1, 2, 3], "b":[4, 5, 6]}) >>> cudf.DataFrame.from_arrow(data) a b 0 1 4 1 2 5 2 3 6
Pandas Compatibility Note
pandas.DataFrame.from_arrow
This method does not exist in pandas but it is similar to how
pyarrow.Table.to_pandas()
works for PyArrow Tables i.e. it does not support automatically setting index column(s).