How does Python add a file by field and find the mean?

there is a text file as follows:
clipboard.png

user_id is the time represented by the user id,t (each user has data), x and y representing coordinates for a total of 48 times from 1 to 48. Now I want to get the mean value of coordinate XMagol y by adding 48 time data corresponding to different users according to user_id. I would like to ask how to achieve it with Pandas. If you are not familiar with it, you can tell me if you are familiar with it. Thank you!

Jul.19,2021

import pandas as pd

df = pd.read_csv(...)

res = df.groupby("t").agg({"x": "mean", "y":"mean"}).reset_index()
Menu