Don't know how to ask. Want add the row values in a string using formating.like If I have a df like below:
| things | qty | place |
|---|---|---|
| Apple | 1 | Table |
| Mango | 4 | Chair |
| Coke | 3 | Floor |
| Pen | 2 | Table |
I want output like below:
| things | qty | place | string |
|---|---|---|---|
| Apple | 1 | Table | 1 Apple on the Table |
| Mango | 4 | Chair | 4 Mango on the Chair |
| Coke | 3 | Floor | 3 Coke on the Floor |
| Pen | 2 | Table | 2 Pen on the Table |
I'm using df['string'] = f'{df['qty']} {df['things']} on the {df['place']}' but not getting the exact.