Skip to content

Instantly share code, notes, and snippets.

@MartinWeiss12
Last active March 4, 2024 00:37
Show Gist options
  • Save MartinWeiss12/db65b7a08e3727af5c17fe7852bb44f4 to your computer and use it in GitHub Desktop.
Save MartinWeiss12/db65b7a08e3727af5c17fe7852bb44f4 to your computer and use it in GitHub Desktop.
Top Tracks
top_100_tracks = get_top_100('Track', spotify_data)[['Rank', 'Track', 'Album', 'Artist', 'Streams']]
top_100_tracks.to_excel(f'{output_path}top-100-tracks.xlsx', index=False)
top_100_artists = get_top_100('Artist', spotify_data)[['Rank', 'Artist', 'Streams', 'Artist Image URL']]
top_100_artists.to_excel(f'{output_path}top-100-artists.xlsx', index=False)
top_100_albums = get_top_100('Album', spotify_data)[['Rank', 'Album', 'Artist', 'Streams', 'Album Image URL']]
top_100_albums.to_excel(f'{output_path}top-100-albums.xlsx', index=False)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment