I have a dataset that contains the following columns: id_customer (customer identifier), id_receiver (identifier of the person who receives the money), money (money sent), and the date the money was sent.
I need to know which customers recurrently send money to the same person and recommend them to send money (recommend amount of money and date). How can I do it?
Dataset example:
df= pd.DataFrame({'id_customer ': ['1', '1', '1'],
'id_receiver ': ['A', 'A', 'B'],
'date': [20230101, 20230201, 20230506],
'money': [10,10,50]
})
In this example, client 1 sends person A on the 1st of each month 10 euros. I want to recommend that on the 1st of the following month you send 10 euros to person A
I would use a custom
groupby.aggto get the number of transfers, the average frequency and average amount:Output: