title: Python/Pandas: create summary table
body: <p>In a python pandas dataframe "df", I have the following columns: </p>
  
  <pre><code>user_id | song_id | song_duration | song_title | artist | listen_count
  </code></pre>
  
  <p>Many users might have listened to the same song - therefore the song is not unique in this table. I would like to create a second dataframe with just song information (with unique song_ids). </p>
  
  <pre><code>song_id | song_title | artist
  </code></pre>
  
  <p>I manage to create a table with song_id and song_title. </p>
  
  <pre><code>song_df = df.groupby('song_id').song_title.first()
  </code></pre>
  
  <p>How can I add, the column "artist" into this? </p>
  
  <p>This doesn't work:  </p>
  
  <pre><code>song_df = df.groupby('song_id').df['song_title','artist'].first()
  </code></pre>
  
  <blockquote>
    <p>AttributeError: 'DataFrameGroupBy' object has no attribute 'df'</p>
  </blockquote>