1. Learn
  2. /
  3. 课程
  4. /
  5. Introduction to Polars

Connected

道练习

Transforming Multiple Columns

You want to transform your data from kilometers to miles for an American client. You want do it in an efficient way that applies the same transformation to multiple columns.

说明 1/2

undefined XP
  • 1
    • Convert the "top_speed" and "range" columns from kilometers to miles using pl.col() and the provided scaling factor.
  • 2
    • Get the length of all string columns by passing a dtype to pl.col() and using .str.len_chars() expression.