0

so I am using a data base that depicts the spotify top 2000's with columns year, artist, popularity, title, genre,index,...

what I would like to be able to do is make copy's of this database with only the data of certain artists with all the stats and so i can use it to compare them to other artist and averages of the scores of their songs.

only thing is I have no clue how to even go about this.

this is the part I've been able to come up with but I'm very much stuck in

amountSongs = spotify.groupby('Artist')['Index'].nunique()

songArtist = spotify.Artist.unique()

for row in songArtist:
   spotify.loc[spotify['Artist'] == row]

what are some better option, and what commands should I know to go about this

thank you for your help and time

  • Please share a sample of input dataframe with expected output. Without this, it would be really difficult for us to guess what you want. – Mayank Porwal Jun 07 '20 at 12:41
  • Does this answer your question? [How to select rows from a DataFrame based on column values?](https://stackoverflow.com/questions/17071871/how-to-select-rows-from-a-dataframe-based-on-column-values) – Itamar Mushkin Jun 07 '20 at 12:44

0 Answers0