我有2个数据框问题,答案:
问题:
productId question questionId total_answers
--------- -------- ---------- -------------
147374 I wear Tan 4475521 2
Sand w/ Yellow
undertone ..
答案:
productId questionId answerId answer
--------- ---------- -------- ------
147374 4475521 123456 answer1
147374 4475521 654321 answer2
我想要这样的结果:
productId questionId answers
--------- ---------- -------
147374 4475521 [{'answerId':'123456','answer':'answer1'},
{'answerId' :'654321','answer':'answer2'}]