large-data-with-dask
БесплатноЗапускает вложенные скриптыНе проверенSpecific optimization strategies for Python scripts working with larger-than-memory datasets via Dask.
от oimiragieo★ 48 звёзд на GitHubОб этом скилле
Large Data With Dask Skill
- Consider using dask for larger-than-memory datasets.
Iron Laws
- ALWAYS call
dask.compute()only once at the end of a pipeline — multiple intermediatecompute()calls break the lazy evaluation graph and eliminate Dask's ability to fuse and parallelize operations. - NEVER use
df.apply(lambda ...)with Dask DataFrames for element-wise operations — Pandas-styleapplyforces row-by-row Python execution that bypasses Dask's vectorized C extensions and is slower than single-threaded Pandas. - ALWAYS specify partition sizes explicitly when reading large datasets (
blocksize=for CSV,chunksize=for Parquet) — auto-detected partition sizes frequently produce thousands of tiny partitions (slow scheduler overhead) or a single giant partition (no parallelism). - NEVER call
len(df)ordf.shapeon a Dask DataFrame without wrapping incompute()— these trigger immediate full dataset computation and negate lazy evaluation. - ALWAYS use
dask.distributed.Clientfor multi-machine or CPU-bound workloads — the default threaded scheduler serializes Python-heavy operations due to the GIL; the distributed scheduler bypasses this.
Anti-Patterns
| Anti-Pattern | Why It Fails | Correct Approach |
|---|---|---|
Multiple compute() calls in pipeline |
Breaks lazy graph; forces data to materialize and re-partition at each call | Build complete computation graph first; call compute() once at the end |
df.apply(lambda ...) on large DataFrames |
Row-by-row Python; GIL contention; slower than equivalent Pandas on single core | Use vectorized Dask operations (map_partitions, assign, arithmetic operators) |
| Default blocksize on large CSV files | 128MB default creates thousands of partitions for 100GB files; scheduler overhead dominates | Set blocksize="256MB" or blocksize="1GB" for large files; profile optimal size |
len(df) without compute() |
Triggers full dataset read and count; defeats lazy evaluation | Use df.shape[0].compute() explicitly; only compute when size is truly needed |
| Threaded scheduler for CPU-bound work | Python GIL serializes CPU computation across threads; no true parallelism | Use dask.distributed.LocalCluster() or process-based scheduler for CPU tasks |
Memory Protocol (MANDATORY)
Before starting:
cat .claude/context/memory/learnings.md
After completing: Record any new patterns or exceptions discovered.
ASSUME INTERRUPTION: Your context may reset. If it's not in memory, it didn't happen.
Установить large-data-with-dask в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
ReadWriteEditВложенные файлы
FAQ
Что делает скилл large-data-with-dask?
Specific optimization strategies for Python scripts working with larger-than-memory datasets via Dask.
Как установить скилл large-data-with-dask?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл large-data-with-dask запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic