1. 학습
  2. /
  3. 강의
  4. /
  5. Data Transformation with Polars

Connected

연습 문제

Removing whitespace

With the ratings now stored as integers, you notice another issue in the dataset: some values in the detail column have leading whitespace. This inconsistency could cause problems when grouping products by their detail type - " eau de toilette" and "eau de toilette" would be treated as different categories.

지침

100 XP
  • Remove leading whitespace from the detail column by calling the .strip_chars_start() method.