polars
Skill15 starsChanged 44 days agoMITView on GitHub
Expert Polars data manipulation assistance covering blazing-fast Rust-native execution, LazyFrames, expressions, and zero-copy Arrow memory. Use when processing millions of tabular rows in Python with minimal latency.
18 other projects use a version of this.
Adopted by
Most recently taken up by
- BrightGold70/skillstheir own version, first seen Nov 8, 2026
- DAAF-Contribution-Community/daaftheir own version, first seen Nov 3, 2026
- MarieLynneBlock/arcanum-artifextheir own version, first seen Nov 1, 2026
- polars-inc/skillstheir own version, first seen Nov 1, 2026
- davidanthonyn/claude-skillstheir own version, first seen Oct 20, 2026
- patoangolano/bio-stacktheir own version, first seen Oct 15, 2026
Used with
Projects with it also use deeptools, dnanexus-integration and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
garri333Skilldeeptools
NGS analysis toolkit. BAM to bigWig conversion, QC (correlation, PCA, fingerprints), heatmaps/profiles (TSS, peaks), for ChIP-seq, RNA-seq, ATAC-seq visualization.
Also in 11 projects that use this
garri333Skilldnanexus-integration
DNAnexus cloud genomics platform. Build apps/applets, manage data (upload/download), dxpy Python SDK, run workflows, FASTQ/BAM/VCF, for genomics pipeline development and execution.
Also in 11 projects that use this
yf8578Skillusfiscaldata
Query the U.S. Treasury Fiscal Data API for federal financial data including national debt, government spending, revenue, interest rates, exchange rates, and savings bonds. Access 54 datasets and 182 data tables with no API key required. Use when working with U.S. federal fiscal data, national debt tracking (Debt to the Penny), Daily Treasury Statements, Monthly Treasury Statements, Treasury securities auctions, interest rates on Treasury securities, foreign exchange rates, savings bonds, or any U.S. government financial statistics.
Also in 7 projects that use this
tondevrelSkillsimpy
A process-based discrete-event simulation framework. Use for modeling queuing systems, supply chains, manufacturing processes, network simulation, project management, and any system where events occur at specific points in time. Load when working with discrete event simulation, process modeling, resource allocation, virtual time, simpy.Environment, simpy.Resource, or event-driven simulation.
Also in 9 projects that use this
tondevrelSkillscikit-bio
Library for bioinformatics and community ecology statistics. Provides data structures and algorithms for sequences, alignments, phylogenetics, and diversity analysis. Essential for microbiome research and ecological data science. Use for alpha/beta diversity metrics, ordination (PCoA), phylogenetic trees, sequence manipulation (DNA/RNA/Protein), distance matrices, PERMANOVA, and community ecology analysis.
Also in 10 projects that use this
- +7 more from garri333
Other versions18 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 18
- wu-yc/LabClaw★ 1.1ksame name
- LeonChaoX/qinyan-academic-skills★ 910same name
- DAAF-Contribution-Community/daaf★ 239same name
- polars-inc/skills★ 87same name
- qinyan-ai/qinyan-academic-skills★ 80same name
- Barrios88/barrios-skills★ 63same name
- tondevrel/scientific-agent-skills★ 22same name
- MarieLynneBlock/arcanum-artifex★ 4same name
- JunMA98/Computer-science-claude-skills★ 3same name
- silvainfm/claude-skills★ 2same name
8 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository350 other files it gives its agents.
- airflowSkill
- catboostSkill
- claudeSkill
- comfyuiSkill
- cursor-aiSkill
- dalleSkill
- daskSkill
- dbtSkill
- deepseekSkill
- fastaiSkill
- geminiSkill
- github-copilotSkill
- huggingfaceSkill
- jaxSkill
- jupyterSkill
- kerasSkill
- langchainSkill
- lightgbmSkill
- llamaindexSkill
- llamaSkill
- matplotlibSkill
- midjourneySkill
- mistralSkill
- mlflowSkill
- nltkSkill
- numpySkill
- ollamaSkill
- openai-gptSkill
- opencvSkill
- pandasSkill
- perplexitySkill
- plotlySkill
- pytorchSkill
- raySkill
- scikit-learnSkill
- seabornSkill
- spacySkill
- sparkSkill
- stable-diffusionSkill
- tensorflowSkill
- vaexSkill
- weights-biasesSkill
- whisperSkill
- xgboostSkill
- api-gatewaySkill
- clean-architectureSkill
- cqrsSkill
- domain-driven-designSkill
- event-drivenSkill
- event-sourcingSkill
- graphqlSkill
- grpcSkill
- hexagonalSkill
- microservicesSkill
- modular-monolithSkill
- monolithSkill
- rest-apiSkill
- sagaSkill
- serverlessSkill
- service-meshSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
5 rules. 0 are common, 0 are distinctive, and 5 are very specific to this project.
0
Common
Most of the 18 edited versions we read keep these.
0
Distinctive
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 117
Use Polars native when / then / otherwise expression trees:
- Very specific: line 138
Use collect(streaming=True) for datasets that approach or exceed system RAM limits.
- Very specific: line 140
Use Polars native expressions (pl.col(...)) instead of Python lambdas or .map_elements().
- Very specific: line 144
Use .map_elements() or .apply() unless strictly necessary.
- Very specific: line 146
Call .collect() repeatedly inside loops.
“Common” is measured: kept by at least 6 in 10 of the 18 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Polars
Polars is an ultra-fast DataFrame library written in Rust, leveraging Apache Arrow columnar format, lazy evaluation, and multi-threaded parallel query execution.
When to Use
- High-Performance In-Memory & Streaming Dataframes: Rust-backed, multi-threaded columnar data processing 5x-30x faster than Pandas.
- Out-of-Core Larger-Than-Memory Analytics: Streaming datasets larger than RAM with the Polars Lazy API (
collect(streaming=True)). - Parallel Query Execution: Automatic query optimization, predicate pushdown, and projection pushdown via the Catalyst-like engine.
- Zero-Copy Apache Arrow Interoperability: Seamlessly sharing memory with PyTorch, DuckDB, and Parquet readers.
Quick Start
import polars as pl
# Fast lazy query execution pipeline
lazy_df = (
pl.scan_csv("sales_data.csv")
.filter(pl.col("amount") > 100)
.group_by("region")
.agg([
pl.col("amount").sum().alias("total_sales"),
pl.col("customer_id").n_unique().alias("unique_customers")
])
.sort("total_sales", descending=True)
)
# Optimize and execute in parallel across all CPU cores
result = lazy_df.collect()
print(result)Core Concepts
Lazy Execution & Query Optimization
Building optimized query graphs that execute only when requested:
import polars as pl
# Create LazyFrame scanning Parquet files without immediate loading
lazy_query = (
pl.scan_parquet("s3://warehouse/transactions/*.parquet")
.filter(pl.col("status") == "completed")
.filter(pl.col("transaction_date") >= pl.date(2026, 1, 1))
.with_columns([
(pl.col("amount_cents") / 100.0).alias("amount_usd"),
pl.col("transaction_date").dt.month().alias("month")
])
.group_by(["month", "merchant_category"])
.agg([
pl.col("amount_usd").sum().alias("total_revenue"),
pl.col("amount_usd").mean().alias("avg_transaction"),
pl.len().alias("transaction_count")
])
.sort("total_revenue", descending=True)
)
# Inspect optimized execution plan
print(lazy_query.explain())
# Execute query in parallel and return eager DataFrame
result_df = lazy_query.collect()
print(result_df)Expressive Column Expressions (pl.col)
Composing clean, vector operations inside expressions:
df = pl.DataFrame({
"user_id": [101, 102, 103, 104, 105],
"spend": [120.0, 450.0, 89.0, 950.0, 210.0],
"tier": ["silver", "gold", "bronze", "platinum", "silver"]
})
# Add conditional flags and normalized scores
enhanced_df = df.with_columns([
pl.when(pl.col("spend") > 400.0)
.then(pl.lit("VIP"))
.otherwise(pl.lit("Standard"))
.alias("customer_segment"),
((pl.col("spend") - pl.col("spend").mean()) / pl.col("spend").std()).alias("z_score")
])
print(enhanced_df)Streaming Mode for Terabyte-Scale Datasets
Processing larger-than-RAM files in memory-managed batches:
# Streaming mode processes data in chunks through CPU cache
streamed_metrics = (
pl.scan_csv("massive_web_logs.csv")
.group_by("ip_address")
.agg(pl.len().alias("hit_count"))
.collect(streaming=True) # Enables streaming out-of-core engine
)Common Patterns
High-Speed Expression Contexts (Select, With_Columns, When/Then)
Problem: Writing complex row-wise condition logic without Python loop performance degradation.
Solution:
Use Polars native when / then / otherwise expression trees:
df = pl.DataFrame({
"price": [10.0, 50.0, 150.0, 20.0],
"quantity": [1, 2, 5, 0]
})
result = df.with_columns(
tier=pl.when(pl.col("price") > 100).then(pl.lit("Premium"))
.when(pl.col("price") > 25).then(pl.lit("Standard"))
.otherwise(pl.lit("Budget")),
total=(pl.col("price") * pl.col("quantity"))
)Best Practices
Do:
- Favor
pl.scan_parquet()/pl.scan_csv()and LazyFrames over eagerpl.read_*()for large workloads. - Use
collect(streaming=True)for datasets that approach or exceed system RAM limits. - Compose transformations inside a single
.with_columns()or.select()call to enable automatic parallelization. - Use Polars native expressions (
pl.col(...)) instead of Python lambdas or.map_elements().
Don't:
- Use
.map_elements()or.apply()unless strictly necessary; Python callbacks break Rust parallel execution. - Convert Polars DataFrames to Pandas unless required by a legacy library; use PyArrow for zero-copy transfers.
- Call
.collect()repeatedly inside loops; accumulate the query graph and evaluate once.
Troubleshooting
| Error | Cause | Solution |
ComputeError: cannot evaluate expression on empty dataframe | Query filter removed all rows before subsequent non-null computation. | Check filter criteria or guard with if len(df) > 0:. |
SchemaMismatchError during concat | Concatenating LazyFrames with differing column types. | Cast column types explicitly with pl.col('id').cast(pl.Int64). |
Out of memory in collect() | Entire dataset loaded into memory simultaneously. | Enable streaming engine: lazy_df.collect(streaming=True). |
References
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

