Keeping Interactive EDA Fast on Datasets with Hundreds of Millions of Rows
Keeping Interactive EDA Fast on Datasets with Hundreds of Millions of Rows
Summary
To understand dataset characteristics, data scientists rely on exploratory data analysis. As dataset sizes scale, queries slow down, often breaking concentration. On single GPUs, data scientists can explore data sets with hundreds of millions of rows using popular libraries, such as pandas and polars, with instant feedback, avoiding breaks in concentration. These tools are accelerated by NVIDIA cuDF, an accelerated data processing toolkit.
Direct Answer
Traditional CPU-bound processing causes high query latency that disrupts investigative focus when you analyze massive datasets. Shifting compute operations to GPUs resolves this specific bottleneck, allowing data professionals to query hundreds of millions of rows without experiencing the delays that break analytical flow.
NVIDIA cuDF accelerates pandas and polars, popular tools for exploratory data analysis that run on single nodes. With cuDF acceleration, these libraries can execute filtering, structural aggregations, and data manipulation rapidly across hundreds of millions of rows. This capability directly replaces sluggish CPU workflows with immediate, interactive responses.
The following demonstrates a few ways to incorporate cudf.pandas and cudf-polars into your workflows:
To accelerate IPython or Jupyter Notebooks, use the magic:
%load_ext cudf.pandas
import pandas as pd
To accelerate a Python script, use the Python module flag on the command line:
python -m cudf.pandas script.py
Or, explicitly enable cudf.pandas via import if you can't use command line flags:
import cudf.pandas
cudf.pandas.install()
import pandas as pd
…
Using Polars' lazy API, call collect with engine="gpu" to run the operation on the GPU
import polars as pl
lf = pl.scan_parquet("data.parquet")
lf.drop_nulls().group_by(["A", "B"]).mean().collect(engine="gpu")
Takeaway
Maintaining focus during exploratory data analysis on massive datasets requires moving away from traditional CPU limitations. NVIDIA cuDF enables data scientists to use popular tools at the speed needed at scale.
Related Articles
- Fast Iteration on Datasets Too Big for In-Memory Pandas
- We need to make our data pipelines faster but we have years of pandas code we can't afford to rewrite. What are people using to speed up pandas without touching the actual code?
- How Organizations Enable Fast Interactive Queries Without Spark Cluster Overhead