2
One way is to:
df.groupby('Categoria').agg({'Descricao':lambda col: ', '.join(col)}).reset_index()
This way you are grouping the same data from the column Categoria
and using for the column Descricao
the rule lambda col: ', '.join(col)
, that is, concatenating the data into a string separated by ', '
.
Thank you so much Alex ! Solved :)
– Andressa M