Getting Started with Polars
summary
Polars is a Rust-backed Arrow engine that runs multi-threaded and uses lazy evaluation to optimize chained operations; the demo loads CSVs, extracts IDs from permalinks, casts many columns to uint8/uint16 and parses datetimes with strptime and timezone conversion. Memory drops from ~2.9MB to 1.8MB after casting and pruning, and a vectorized column divide runs ~168 μs versus ~4 ms for a rowwise apply — roughly a 40x speedup. Pipeline uses scan_csv, collect, groupby and pivot, then exports to pandas for plotting.
AI-written summary · about
