LoslegenKostenlos loslegen

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.

Diese Übung ist Teil des Kurses

Introduction to Polars

Kurs anzeigen

Anleitung zur Übung

  • Create a new DataFrame, unique_df, with duplicate rows (defined by having the same title and artist) removed.

Interaktive Übung

Vervollständige den Beispielcode, um diese Übung erfolgreich abzuschließen.

# Keep only unique songs (based on title and artist)
unique_df = spotify_df.____

print(unique_df)
Code bearbeiten und ausführen