July 2019
Intermediate to advanced
512 pages
19h 39m
English
Read the downloaded input dataset:
df = pd.read_csv('data/songdata.csv')
Let's see what we have in our dataset:
df.head()
The preceding code generates the following output:

Our dataset consists of about 57,650 song lyrics:
df.shape[0]57650
We have song lyrics from about 643 artists:
len(df['artist'].unique())643
The number of songs from each artist is shown as follows:
df['artist'].value_counts()[:10]Donna Summer 191 Gordon Lightfoot 189 George Strait 188 Bob Dylan 188 Loretta Lynn 187 Cher 187 Alabama 187 Reba Mcentire 187 Chaka Khan 186 Dean Martin 186 Name: artist, dtype: int64
On average, we have about 89 songs from each ...
Read now
Unlock full access