如何按值(id)有条件合并数据帧中的行

时间:2019-01-16 14:00:56

标签: python pandas

我有两个从csv加载的数据帧:

       Date_Time             Con_ID
0      09/01/2019 18:37:47   1
1      09/01/2019 15:16:21   2
2      09/01/2019 15:00:26   1
3      09/01/2019 12:59:04   2
4      09/01/2019 12:59:04   3
5      09/01/2019 12:59:04   4

        Con_ID    Option_Name   Language
0       1         One           EN
1       2         Two           DE
2       3         Three         IT
3       4         Four          RU

结果如何获得第三个数据帧,如:

       Date_Time             Con_ID    Option_Name   Language
0      09/01/2019 18:37:47   1         One           EN
1      09/01/2019 15:16:21   2         Two           DE
2      09/01/2019 15:00:26   1         One           EN
3      09/01/2019 12:59:04   2         Two           DE
4      09/01/2019 12:59:04   3         Three         IT
5      09/01/2019 12:59:04   4         Four          RU

0 个答案:

没有答案