0

I have following dataframe

  artist_id  explicit   count
0   10245     False     489
1   10245     True      219

I need to convert this dataframe to

  artist_id  explicit_False     explicit_True
0   10245         489                 219
Alex Nikitin
  • 841
  • 1
  • 10
  • 29
  • IMHO, the linked question is too verbose, so to hopefully save you some time, this will get you most of the way there: `df.pivot_table('count', 'artist_id', 'explicit')` – wjandrea Jan 02 '23 at 17:42

0 Answers0