1. Učit se
  2. /
  3. Kurzy
  4. /
  5. Scaling and Optimizing Data Pipelines with Polars

Connected

Cvičení

Counting genres per movie

The team also wants a quick summary column that counts how many genres are listed for each movie. Use a list expression to create genre_count.

You're still working with the same movies DataFrame.

Pokyny

100 XP
  • Count the number of genres in each row's genres list.
  • Alias the new column as genre_count.