Mergedholoviz/datashader#15383.6Kstars
docs: Fix the Dask snippets in the Performance user guide
By Mohd Maaz Khan, merged by hoxbro into holoviz/datashader on 14 Oct 2026
Conversation
maaz7409opened this pull request on 13 Oct 2026description.mdAuthor Description
This PR fixes two code snippets in the markdown cells of the Performance user guide.
Section Before After Reason for change File formats dd.to_parquet(filename, df, compression="SNAPPY")dd.to_parquet(df, filename, compression="SNAPPY")The signature is to_parquet(df, path, ...). The reversed order raisesAttributeError: 'str' object has no attribute '_meta'.Using Dask efficiently dask_df.persist()dask_df = dask_df.persist()persist()returns a new collection and does not modifydask_dfin place, so as written the data is never persisted, which is the point of the paragraph.Ran both snippets before and after the fix (dask 2026.8.0, pandas 3.0.6):
to_parquet: the old order raises theAttributeErrorabove; the new order writes the file, it reads back identical, and the parquet metadata shows SNAPPY compressionpersist: afterdask_df.persist(),dask_dfis still the unpersistedFromPandasgraph and the persisted result (FromGraph) is discarded; afterdask_df = dask_df.persist(),cvs.points(dask_df, 'x', 'y')aggregates all rows
AI Disclosure
Tool & Model: Claude Code ( Claude Opus 5.5 (high) ) Usage: It reviewed and audited docs, and flagged these issues.
- I have tested all AI-generated content in my PR.
- I take responsibility for all AI-generated content in my PR.
Checklist
-
pre-commit run --fileson the notebook: passed (typos, clean-notebook, whitespace)
hoxbrocommented on 14 Oct 2026Member Thank you.
hoxbromerged this pull request on 14 Oct 2026
Copied from GitHub when this site was built; comments by bots are left out.