i have some data in the following format, at the moment this is in a Pandas Dataframe.
Row Uid Lender
1 1 HSBC
2 1 Lloyds
3 1 Barclays
4 2 Lloyds
5 2 Barclays
6 2 Santander
7 2 RBS
8 2 HSBC
What i require is all of the possible combinations of the Lenders columns for each Uid so the output would be something like this
Row Uid LenderCombo
1 1 Barclays
2 1 Lloyds
3 1 HSBC
4 1 Barclays, HSBC
5 1 Barclays, Lloyds
6 1 HSBC, Lloyds
7 1 Barclays, HSBC, Lloyds
And the same for Uid 2 and so on, apologies if this has been answered before i'm just unsure of how to approach this.
Thanks,