Level: Medium
Description:
As a data-driven DJ, you’re tasked with curating the perfect playlist to keep the crowd dancing nonstop during a two-hour event focused on Indian music. The dataset you’re using comprises songs from 15 Indian languages, giving you a diverse range of tracks to work with. Your goal is to select songs with the highest danceability scores, ensuring that each track contributes to an energetic atmosphere throughout the event. You’ll use the dataset from Kaggle to choose the best tracks, sort them by danceability, calculate cumulative durations, and filter the playlist to stay within the two-hour limit.
Beginner-Friendly Objective(s):
Load and preprocess the data (If you struggle to combine the CSV files, you can find a pre-joined dataset in the current workflow's datasera folder).
Sort the songs based on their danceability scores, focusing on the highest scores first.
Intermediate-Friendly Objective(s):
Import multiple CSV files using a loop structure.
Sort the songs based on their danceability scores, focusing on the highest scores first.
Convert song durations from "HH:MM" format to total seconds.
Calculate cumulative durations, starting from the top songs.
Filter the songs to ensure the total playlist duration does not exceed two hours.
Dataset: Spotify Indian Languages Dataset