text_plain_output_1.png
piv1 = tr.loc[tr.answered_correctly != -1].groupby('content_id')['answered_correctly'].mean().reset_index()
piv1.columns = ['content_id', 'content_emb']
piv3 = tr.loc[tr.answered_correctly != -1].groupby('user_id')['answered_correctly'].mean().reset_index()
piv3.columns = ['user_id', 'user_emb']