I have a list of data frames like this,
Name Product Quantity
0 A 1010 10
1 A 2010 12
2 B 4145 18
3 B 5225 14
4 B 6223 16
5 C 7222 18
Name Product Quantity
0 A 1010 14
1 A 2010 12
2 B 4145 21
3 B 5225 18
4 B 7565 19
5 C 7222 11
Name Product Quantity
0 A 1010 15
1 A 2010 14
2 B 4145 13
3 B 5225 15
4 B 7565 17
From above list of I would like to get the average quantity (rounded) for each product that is under the same name.
Output needed is,
Name Product Avg Quantity
0 A 1010 13
1 A 2010 13
2 B 4145 17
3 B 5225 16
4 B 6223 5
5 B 7565 12
6 C 7222 10
For now, I do not know how to go about this in pandas
unless I save each data frame into an excel file/sheet and combine them in excel. I do not want that route, I like to do it in pandas.
The closest I could find an earlier post is this. However, that did not help. Any suggestion would be great to achieve my output.