Use when "Dask", "parallel computing", "distributed computing", "larger than memory", or asking about "parallel pandas", "parallel numpy", "out-of-core", "multi-file processing", "cluster computing", "lazy evaluation dataframe
Distributing workloads across multiple cores/machines
Dask Collections
Collection
Like
Use Case
DataFrame
pandas
Tabular data, CSV/Parquet
Array
NumPy
Numerical arrays, matrices
Bag
list
Unstructured data, JSON logs
Delayed
Custom
Arbitrary Python functions
Key concept: All collections are lazy—computation happens only when you call .compute().
Lazy Evaluation
Function
Behavior
Use
dd.read_csv()
Lazy load
Large CSVs
dd.read_parquet()
Lazy load
Large Parquet
Operations
Build graph
Chain transforms
.compute()
Execute
Get final result
Key concept: Dask builds a task graph of operations, optimizes it, then executes in parallel. Call .compute() once at the end, not after every operation.
Schedulers
Scheduler
Best For
Start
threaded
NumPy/Pandas (releases GIL)
Default
processes
Pure Python (GIL bound)
scheduler='processes'
synchronous
Debugging
scheduler='synchronous'
distributed
Monitoring, scaling, clusters
Client()
Distributed Scheduler
Feature
Benefit
Dashboard
Real-time progress monitoring
Cluster scaling
Add/remove workers
Fault tolerance
Retry failed tasks
Worker resources
Memory management
Chunking Concepts
DataFrame Partitions
Concept
Description
Partition
Subset of rows (like a mini DataFrame)
npartitions
Number of partitions
divisions
Index boundaries between partitions
Array Chunks
Concept
Description
Chunk
Subset of array (n-dimensional block)
chunks
Tuple of chunk sizes per dimension
Optimal size
~100 MB per chunk
Key concept: Chunk size is critical. Too small = scheduling overhead. Too large = memory issues. Target ~100 MB.