IniziaInizia gratis

Transforming Data

You are asked to provide an analysis of the range of the electric vehicles for a client in the United States. However, the range data is given in kilometers and you are asked to convert this to range in miles.

Questo esercizio fa parte del corso

Introduction to Polars

Visualizza il corso

Esercizio pratico interattivo

Prova a risolvere questo esercizio completando il codice di esempio.

# Scaling factor to convert kilometers to miles
KILOMETERS_TO_MILES = 1.609

# Select the columns with range as an expression
range_df = ev_df.select(____, ____, ____KILOMETERS_TO_MILES)

print(range_df)
Modifica ed esegui il codice