用法:
classmethod DataFrame.from_arrow(table)
從 PyArrow 表轉換為 DataFrame。
- table:PyArrow 表對象
必須轉換為 cudf DataFrame 的 PyArrow 表對象。
- cudf DataFrame
- 無效輸入類型的 TypeError。
參數:
返回:
拋出:
注意:
- 不支持自動設置索引列,類似於
to_pandas
對 PyArrow 表的工作方式。
例子:
>>> 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
相關用法
- Python cudf.DataFrame.from_pandas用法及代碼示例
- Python cudf.DataFrame.first用法及代碼示例
- Python cudf.DataFrame.floordiv用法及代碼示例
- Python cudf.DataFrame.floor用法及代碼示例
- Python cudf.DataFrame.fillna用法及代碼示例
- Python cudf.DataFrame.mod用法及代碼示例
- Python cudf.DataFrame.isin用法及代碼示例
- Python cudf.DataFrame.rmul用法及代碼示例
- Python cudf.DataFrame.apply用法及代碼示例
- Python cudf.DataFrame.exp用法及代碼示例
- Python cudf.DataFrame.drop用法及代碼示例
- Python cudf.DataFrame.where用法及代碼示例
- Python cudf.DataFrame.median用法及代碼示例
- Python cudf.DataFrame.to_pandas用法及代碼示例
- Python cudf.DataFrame.take用法及代碼示例
- Python cudf.DataFrame.tail用法及代碼示例
- Python cudf.DataFrame.rfloordiv用法及代碼示例
- Python cudf.DataFrame.equals用法及代碼示例
- Python cudf.DataFrame.head用法及代碼示例
- Python cudf.DataFrame.count用法及代碼示例
注:本文由純淨天空篩選整理自rapids.ai大神的英文原創作品 cudf.DataFrame.from_arrow。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。