EmpezarEmpieza gratis

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.

Este ejercicio forma parte del curso

Introduction to Polars

Ver curso

ejercicio interactivo práctico

Prueba este ejercicio completando este código de ejemplo.

# There are 1.609 kilometers in a mile
MILES_TO_KILOMETERS = 1.609

# Convert top_speed and range to miles
print(ev_df.with_columns(____/MILES_TO_KILOMETERS))
Editar y ejecutar código