I'm trying to figure out how to create a list of country codes based on a particular material number
My data has multiple countries for each material number. Data is as follows.
Material number Country code
323043 CZ
323043 IE
323043 GB
323043 FR
223392 IE
223392 NL
223392 DE
113224 RU
I would like the list be made like this, even a new column with a list will do
Material number Country code
323043 CZ, IE, GB, FR
223392 IE, NL
113224 RU
What's the best way to do this in pandas?