Dropping duplicate values
Duplicate rows in a dataset can skew analysis results. You want to identify and remove duplicates.
The spotify_df DataFrame is available for you.
Deze oefening maakt deel uit van de cursus
Introduction to Polars
Oefeninstructies
- Create a new DataFrame,
unique_df, with duplicate rows (defined by having the same title and artist) removed.
Praktische interactieve oefening
Probeer deze oefening eens door deze voorbeeldcode in te vullen.
# Keep only unique songs (based on title and artist)
unique_df = spotify_df.____
print(unique_df)