Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
직접 명령은 검토 Prompt를 거치지 않습니다. 실행하기 전에 소스를 확인하세요.
npx skills add https://github.com/tomevault-io/skills-registry --skill polars-expertise명령은 한 줄로 유지됩니다. 복사하기 전에 가로로 스크롤해 전체 내용을 확인하세요.
로컬 사본을 원하시나요? SkillsMP에서 현재 제공할 수 있는 파일을 다운로드하세요.
| Use when this capability is needed.
> Use when this capability is needed.
Review architecture and API design for the vfs-s3 project. Use when the user mentions @architect, asks to review an issue's design, discuss module boundaries, API shape, or architectural decisions for vfs-s3. Also trigger when the user wants to create an ADR (Architecture Decision Record) or evaluate a technical approach for the project. Intended for dispatch from Codex automation or Claude routines; GitHub trigger phrase: @vfs-s3-bot please prepare design doc Use when this capability is needed.
SOC 직업 분류 기준
SKILL.md 표시 중
| name | polars-expertise |
| description | > Use when this capability is needed. |
High-performance DataFrame library built on Apache Arrow. Supports Python and Rust with expression-based API, lazy evaluation, and automatic parallelization.
uv pip install polars
# GPU support: uv pip install polars[gpu]
import polars as pl
# Eager: immediate execution
df = pl.DataFrame({"symbol": ["AAPL", "GOOG"], "price": [150.0, 140.0]})
df.filter(pl.col("price") > 145).select("symbol", "price")
# Lazy: optimized execution (preferred for large data)
lf = pl.scan_parquet("trades.parquet")
result = lf.filter(pl.col("volume") > 1000).group_by("symbol").agg(
pl.col("price").mean().alias("avg_price")
).collect()
# Cargo.toml - select features you need
[dependencies]
polars = { version = "0.46", features = ["lazy", "parquet", "temporal"] }
use polars::prelude::*;
fn main() -> PolarsResult<()> {
// Eager
let df = df![
"symbol" => ["AAPL", "GOOG"],
"price" => [150.0, 140.0]
]?;
// Lazy (preferred)
let lf = LazyFrame::scan_parquet("trades.parquet", Default::default())?;
let result = lf
.filter(col("volume").gt(lit(1000)))
.group_by([col("symbol")])
.agg([col("price").mean().alias("avg_price")])
.collect()?;
Ok(())
}
Everything in Polars is an expression. Expressions are composable, lazy, and parallelized.
# Expression building blocks
pl.col("price") # column reference
pl.col("price") * pl.col("volume") # arithmetic
pl.col("price").mean().over("symbol") # window function
pl.when(cond).then(a).otherwise(b) # conditional
Expressions execute in contexts: select(), with_columns(), filter(), group_by().agg()
Use Lazy (scan_*, .lazy()) | Use Eager (read_*) |
|---|---|
| Large files (> RAM) | Small data, exploration |
| Complex pipelines | Simple one-off ops |
| Need query optimization | Interactive notebooks |
| Streaming required | Immediate feedback |
Lazy benefits: predicate pushdown, projection pushdown, parallel execution, streaming.
.alias() for Column NamingAlways use .alias("name") instead of name=expr kwargs:
# GOOD: Explicit .alias() - works everywhere, composable
df.with_columns(
(pl.col("price") * pl.col("volume")).alias("value"),
pl.col("price").mean().over("symbol").alias("avg_price")
)
# AVOID: Kwarg style - less flexible, doesn't chain
df.with_columns(
value=pl.col("price") * pl.col("volume"), # avoid
avg_price=pl.col("price").mean().over("symbol") # avoid
)
.alias() is explicit, chains with other methods, and works consistently in all contexts.
# BAD: Python functions kill parallelization
df.with_columns(pl.col("x").map_elements(lambda x: x * 2)) # SLOW
# GOOD: Native expressions are parallel
df.with_columns((pl.col("x") * 2).alias("x")) # FAST
# BAD: Row iteration
for row in df.iter_rows(): # SLOW
process(row)
# GOOD: Columnar operations
df.with_columns(process_expr) # FAST
# BAD: Late projection
lf.filter(...).collect().select("a", "b") # reads all columns
# GOOD: Early projection
lf.select("a", "b").filter(...).collect() # reads only needed columns
scan_* (lazy) for large files?map_elements)?collect(engine="streaming"))| Topic | File | When to Load |
|---|---|---|
| Expressions, types, lazy/eager | python/core_concepts.md | Understanding fundamentals |
| Select, filter, group_by, window | python/operations.md | Common operations |
| CSV, Parquet, streaming I/O | python/io_guide.md | Reading/writing data |
| Joins, pivots, reshaping | python/transformations.md | Combining/reshaping data |
| Performance, patterns | python/best_practices.md | Optimization |
| Topic | File | When to Load |
|---|---|---|
| DataFrame, Series, ChunkedArray | rust/core_concepts.md | Rust API fundamentals |
| Expression API in Rust | rust/operations.md | Operations syntax |
| Readers, writers, streaming | rust/io_guide.md | I/O operations |
| Feature flags, crates | rust/features.md | Cargo setup |
| Allocators, SIMD, nightly | rust/performance.md | Performance tuning |
| Zero-copy, FFI, Arrow | rust/arrow_interop.md | Arrow integration |
| Topic | File | When to Load |
|---|---|---|
| SQL queries on DataFrames | sql_interface.md | SQL syntax needed |
| Query optimization, streaming | lazy_deep_dive.md | Understanding lazy engine |
| NVIDIA GPU acceleration | gpu_support.md | GPU setup/usage |
| From | File | When to Load |
|---|---|---|
| pandas | migration_pandas.md | Converting pandas code |
| PySpark | migration_spark.md | Converting Spark code |
| q/kdb+ | migration_qkdb.md | Converting kdb code |
# OHLCV resampling
df.group_by_dynamic("timestamp", every="1m").agg(
pl.col("price").first().alias("open"),
pl.col("price").max().alias("high"),
pl.col("price").min().alias("low"),
pl.col("price").last().alias("close"),
pl.col("volume").sum()
)
# Rolling statistics
df.with_columns(
pl.col("price").rolling_mean(window_size=20).alias("sma_20"),
pl.col("price").rolling_std(window_size=20).alias("volatility")
)
# As-of join for market data alignment
trades.join_asof(quotes, on="timestamp", by="symbol", strategy="backward")
Load python/best_practices.md for comprehensive time series patterns.
| Example | File | Purpose |
|---|---|---|
| Financial OHLCV | examples/financial_ohlcv.py | OHLCV resampling, rolling stats, VWAP |
| Pandas Migration | examples/pandas_migration.py | Side-by-side pandas vs polars |
| Streaming Large Files | examples/streaming_large_file.py | Out-of-memory processing patterns |
Use LSP for navigating Polars code:
LSP operations like goToDefinition and hover help explore Polars API without leaving the editor.
Converted and distributed by TomeVault — claim your Tome and manage your conversions.