Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

Checking a Pandas pipeline before moving it to Polars

说明与用途

polars-ready 工具扫描 Pandas 源码,识别迁移到 Polars 前需要关注的操作,但不保证功能等价。

问题

Existing Pandas pipelines often rely on implicit assumptions (index, row iteration, callbacks) that make direct migration to Polars risky.

结果

polars-ready provides a source inventory of Pandas calls, highlighting those that require careful review before migration, but does not guarantee functional equivalence or performance gains.

工作流

  • 1. Install polars-ready via uvx from the GitHub repo
  • 2. Run polars-ready on a Python file, notebook, or directory
  • 3. The tool parses the source with the standard library AST without importing it
  • 4. It reports each recognized Pandas operation, source line, category, and a suggested Polars idiom
  • 5. Review the report to identify operations needing manual rewrite (e.g., index resampling)
  • 6. Use the JSON output to integrate findings into a migration checklist or CI job

证据

The CLI accepts a Python file, notebook, or directory. It parses source with the standard library AST and never imports the code it scans.

来源

The report names each recognized operation, its source line, a rough category, and a suggested Polars idiom.

来源

The scanner currently follows common Pandas import aliases and local variables assigned from recognized constructors or calls. It can miss a frame passed through another function or stored in a container.

来源

  • 记录日期: 2026-10-03T08:41:18.280Z