So, this is my dataframe.
session_id question_difficulty attempt_updated_at
5c822af21c1fba22 2 1557470128000
5c822af21c1fba22 3 1557469685000
5c822af21c1fba22 4 1557470079000
5c822af21c1fba22 5 1557472999000
5c822af21c1fba22 3 1557474145000
5c822af21c1fba22 3 1557474441000
5c822af21c1fba22 4 1557474299000
5c822af21c1fba22 4 1557474738000
5c822af21c1fba22 3 1557475430000
5c822af21c1fba22 4 1557476960000
5c822af21c1fba22 5 1557477458000
5c822af21c1fba22 2 1557478118000
5c822af21c1fba22 5 1557482556000
5c822af21c1fba22 4 1557482809000
5c822af21c1fba22 5 1557482886000
5c822af21c1fba22 5 1557484232000
I want to cut the field 'attempt_updated_at'(which is epoch time) into 2 equal bins and find mean of 'question_difficulty' in that bin per session.
I want to store the mean of 1st bin and 2nd bin separately.
I tried to go through pd.cut but I do not know how to use it.
I expect my output to be like,
for example,
session_id mean1_difficulty mean2_difficulty
5c822af21c1fba22 5.0 3.0
Any idea is appreciated, Thank you.