I am using the groupby method to combine the cell values (strings) of a column:
dfz = dfy.groupby('Type ').agg({'Initial ':lambda x: '/'.join(x.unique()),2021:'sum',2022:'sum'}).reset_index()
The following error message appears:
TypeError: Sequence item 0: expected str instance, float found