Polars开发团队发布了2.0版本的首个候选版本1。新版本的核心改进是将流式引擎设为默认引擎,预期能实现5倍性能提升1,同时通过加强API严格性来提前捕获错误1。
此次更新重点关注改进默认设置和API设计,而非增加新功能1。具体变化包括:join、group_by、unpivot等操作不再保证行顺序,用户需要显式设置maintain_order=True参数来保持原有行为1;is_in表达式现在禁止有损类型强制转换,要求用户必须进行显式转换1;水平concat操作现已严格检查数据框高度,不同高度的合并需要显式使用how="horizontal_extend"参数1;同时移除了模糊的cast操作,改用.str.to_date()、.cat.to()等专属方法替代1。Polars团队为用户提供了迁移指南以支持从旧版本的升级1。
Polars has released the first release candidate for version 2.0, introducing significant changes designed to improve memory efficiency and performance while enforcing stricter API standards 1. The streaming engine is now enabled by default, with the development team expecting performance improvements of up to five times compared to previous versions 1.
The new release prioritizes refinements to default behaviors and API design rather than new feature additions 1. Several operations have been modified to require explicit parameter specification: join, group_by, and unpivot no longer guarantee row order preservation unless maintain_order=True is explicitly set 1. The is_in expression now prohibits lossy type coercion, requiring users to perform explicit type conversions 1. Horizontal concatenation operations now enforce strict height validation, requiring users to explicitly specify how="horizontal_extend" when combining dataframes of different heights 1. Additionally, the ambiguous cast operation has been removed in favor of specialized methods such as .str.to_date() and .cat.to() 1.
Users planning to upgrade can refer to the provided migration guide to navigate these structural changes 1.
评论
还没有评论,欢迎留下第一条。