I'm a new Python user and learning how to manipulate/aggregate data.
I have some sample data of the format:
User Date Price
A 20130101 50
A 20130102 20
A 20130103 30
B 20130201 40
B 20130202 20
and so on.
I'm looking for some aggregates around each user and expecting an output for mean spend like:
User Mean_Spend
A 33
B 30
I could read line by line and get aggregates for one user but I'm struggling to read the data for different users.
Any suggestions highly appreciated around how to read the file for different users.
Thanks