dask
यह क्या करती है
Dask एक ऐसा टूल है जो बहुत बड़े डेटासेट के साथ काम करने में मदद करता है, जो आपके कंप्यूटर की मेमोरी (RAM) में नहीं समाते। यह काम को छोटे-छोटे हिस्सों में बांटकर और कई प्रोसेसर कोर या कई कंप्यूटरों का उपयोग करके डेटा को तेज़ी से प्रोसेस करता है।
कब इस्तेमाल करें
- ✓जब आपका डेटा कंप्यूटर की RAM से बड़ा हो।
- ✓Pandas या NumPy जैसी लाइब्रेरी वाले हिसाब-किताब को तेज़ करने के लिए।
- ✓एक साथ कई फाइलें (जैसे CSV, लॉग) प्रोसेस करते समय।
Skill का लिंक
https://github.com/K-Dense-AI/scientific-agent-skills/blob/main/skills/dask/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“50GB की CSV फाइल, जो मेमोरी में नहीं समाती, उसका विश्लेषण Dask से कैसे करूँ?”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
Dask आपके डेटा को छोटे chunks में बांटता है और इन chunks पर एक साथ (parallel) काम करता है। यह वर्कफ़्लो को संभालता है और सुनिश्चित करता है कि नतीजे सही तरीके से जुड़ जाएं, भले ही डेटा एक बार में पूरा प्रोसेस न हो सके।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।
Dask
Overview
Dask is a Python library for parallel and distributed computing that enables three critical capabilities:
- Larger-than-memory execution on single machines for data exceeding available RAM
- Parallel processing for improved computational speed across multiple cores
- Distributed computation supporting terabyte-scale datasets across multiple machines
Capacity depends on partition sizes, intermediate data, concurrency, storage, and available memory.
Reviewed release: dask/distributed 2026.8.0 (September 30, 2026 review). Docs: docs.dask.org. Since 2025.1.0, the expression-based DataFrame API with query planning is the only implementation — do not install dask-expr separately or set dataframe.query-planning: False.
Quick Start
Installation
uv pip install "dask[array,dataframe]==2026.8.0"
For a typical pandas/NumPy workflow with the distributed scheduler and dashboard:
uv pip install "dask[complete]==2026.8.0"
Remote object storage (requires provider credentials for private data):
uv pip install s3fs # s3:// paths
uv pip install gcsfs # gs:// paths
Requires Python 3.10+, pandas 2+, PyArrow 16+. Zarr, HDF5, SciPy, Xarray, Dask-ML, and cluster deployment packages are separate optional dependencies. See review and validation for tested versions, source links, and limits. File paths and undefined application functions below are illustrative. Put process scheduler/Client() execution in a main() guarded by if __name__ == "__main__": in scripts; close clients and clusters afterward.
When to Use This Skill
This skill should be used when:
- Process datasets that exceed available RAM
- Scale pandas or NumPy operations to larger datasets
- Parallelize computations for performance improvements
- Process multiple files efficiently (CSVs, Parquet, JSON, text logs)
- Build custom parallel workflows with task dependencies
- Distribute workloads across multiple cores or machines
Core Capabilities
Dask provides five main components, each suited to different use cases:
1. DataFrames - Parallel Pandas Operations
Purpose: Scale pandas operations to larger datasets through parallel processing.
When to Use:
- Tabular data exceeds available RAM
- Need to process multiple CSV/Parquet files together
- Pandas operations are slow and need parallelization
- Scaling from pandas prototype to production
Reference Documentation: For comprehensive guidance on Dask DataFrames, refer to references/dataframes.md which includes:
- Reading data (single files, multiple files, glob patterns)
- Common operations (filtering, groupby, joins, aggregations)
- Custom operations with
map_partitions - Performance optimization tips
- Common patterns (ETL, time series, multi-file processing)
Quick Example:
import dask.dataframe as dd
# Read multiple files as single DataFrame
ddf = dd.read_csv('data/2024-*.csv')
# Operations are lazy until compute()
filtered = ddf[ddf['value'] > 100]
result = filtered.groupby('category')['value'].mean().compute()
Key Points:
- Operations are lazy (build task graph) until
.compute()called - Use
map_partitionsfor efficient custom operations - Convert to DataFrame early when working with structured data from other sources
2. Arrays - Parallel NumPy Operations
Purpose: Extend NumPy capabilities to datasets larger than memory using blocked algorithms.
When to Use:
- Arrays exceed available RAM
- NumPy operations need parallelization
- Working with scientific datasets (HDF5, Zarr, NetCDF)
- Need parallel linear algebra or array operations
Reference Documentation: For comprehensive guidance on Dask Arrays, refer to references/arrays.md which includes:
- Creating arrays (from NumPy, random, from disk)
- Chunking strategies and optimization
- Common operations (arithmetic, reductions, linear algebra)
- Custom operations with
map_blocks - Integration with HDF5, Zarr, and XArray
Quick Example:
import dask.array as da
# Small executable example; size chunks from uncompressed memory before scaling
x = da.random.default_rng(42).random((1000, 1000), chunks=(250, 250))
# Operations are lazy
y = x + 100
z = y.mean(axis=0)
# Compute result
result = z.compute()
Key Points:
- Chunk size is critical (aim for ~100 MiB per chunk, adjusted to memory and operation)
…
अक्सर पूछे जाने वाले सवाल
'chunks' क्या हैं?
'Chunks' वे छोटे हिस्से हैं जिनमें Dask आपके डेटा को प्रोसेसिंग के लिए बांटता है।
क्या Dask के लिए कई कंप्यूटर चाहिए?
ज़रूरी नहीं। आप एक ही कंप्यूटर पर Dask का उपयोग करके मेमोरी से बड़ा डेटा संभाल सकते हैं, या प्रोसेसर के कोर में काम बांटकर हिसाब तेज़ कर सकते हैं।
क्या Dask, Pandas और NumPy की जगह लेता है?
नहीं, Dask इन्हें आगे बढ़ाता है। यह वही जाना-पहचाना सिंटैक्स इस्तेमाल करता है, लेकिन इससे आप बड़े डेटा के साथ और समानांतर (parallel) काम कर सकते हैं।
जानकारी
लेखक का मूल विवरण
Scales pandas, NumPy, and custom Python research workflows beyond memory or across clusters with Dask. Covers DataFrames, Arrays, Bags, Futures, chunking, schedulers, and distributed diagnostics. Use for partitioned file processing, scientific array computation, or parallel tasks whose memory and dependency structure require Dask.
लोकप्रियता
- GitHub स्टार
- 51k
- रैंकिंग में स्थान
- #3444
- लाइसेंस
- MIT
- अपडेट की गई
- 15/10/2026
कमेंट
- …
इस repository की और skills
13c-metabolic-flux
51kकार्बन-13 आइसोटोप ट्रेसिंग डेटा से मेटाबोलिक फ़्लक्स का अनुमान लगाता है। कोशिका के मेटाबॉलिज़्म और बायोकेमिकल मार्गों का विश्लेषण करने के लिए यह उपयोगी है।
adaptyv
51kAdaptyv API का उपयोग करके प्रोटीन कैरेक्टराइज़ेशन प्रयोग डिज़ाइन करता है। लागत का अनुमान लगाने, सीक्वेंस सबमिट करने और लैब के नतीजों पर नज़र रखने में मदद करता है।
aeon
51kटाइम सीरीज़ डेटा पर मशीन लर्निंग के काम करता है। क्रमबद्ध डेटा में वर्गीकरण, पूर्वानुमान, एनोमली डिटेक्शन और पैटर्न खोजने के लिए यह उपयोगी है।
alphagenome
51kजेनेटिक वेरिएंट्स के पहले से गणना किए गए जीनोमिक प्रभाव देखता है। वेरिएंट का जीनोम पर असर समझने के लिए स्कोर और स्पष्टीकरण देता है।
मिलती-जुलती skills
gitcrawl
394kयह आपके एजेंट को GitHub issues और pull requests के सेव आर्काइव में खोजने, मिलते-जुलते मामलों को समूह में रखने और लाइव स्थिति जांचने देती है।
slacrawl
394kयह आपके एजेंट को स्थानीय Slack आर्काइव में संदेश खोजने और गिनने, उसकी ताज़गी जांचने और ज़रूरत पड़ने पर उसे ताज़ा करने देती है।
goplaces
394kयह आपके एजेंट को Google Places से जगहें खोजने, उनका विवरण और समीक्षाएं पाने, और जगह के नाम हल करने में मदद करती है, स्क्रिप्ट के लिए JSON आउटपुट के साथ।