0

I have a table that looks like this

colA    colB
 P       Y
 P       Z
 Q       Y
 Q       X
 R       Y

And I would like to convert this into something like this

colA    colB
 P       Y Z
 Q       Y X
 R       Y

Here, colA will act like the primary key. What's the easiest way to do this in either SQL Server, or in Pandas?

rangan2510
  • 53
  • 1
  • 4

0 Answers0