cudf.pandas#
cuDF pandas 加速模式 (cudf.pandas
) 构建于 cuDF 之上,并在 GPU 上**加速 pandas 代码**。它**支持 100% 的 Pandas API**,对支持的操作使用 GPU,对其他操作自动**回退到 pandas**。
%load_ext cudf.pandas
# pandas API is now GPU accelerated
import pandas as pd
df = pd.read_csv("filepath") # uses the GPU!
df.groupby("col").mean() # uses the GPU!
df.rolling(window=3).sum() # uses the GPU!
df.apply(set, axis=1) # uses the CPU (fallback)

在 Google Colab 上试试!#
零代码改动加速 只需在 Jupyter 中运行 |
兼容第三方库
|
在 CPU 或 GPU 上运行相同的代码 从 CPU 迁移到 GPU 时,无需做任何改动,甚至 import 语句也一样。 |
100% 支持 Pandas API 将 Pandas 的全部灵活性与 cuDF 的极速性能相结合 |
cudf.pandas
现在已正式发布 (GA),作为 cudf
软件包的一部分。请参阅 RAPIDS 快速入门以开始使用 cudf
。