Pandas与克劳斯的结合

2024-04-25 05:42:21 发布

您现在位置:Python中文网/ 问答频道 /正文

我正在连接python的pandas中的两个数据帧(A和B)。

目标是接收来自B的所有纯行(A.client_id=B.client_id上的sql模拟-右连接B,其中A.client_id为空)

在pandas中,我只知道进行合并,但不知道如何设置条件(where子句):

x=pd.merge(A,B,how='right',on=['client_id','client_id']

Tags: 数据rightclientid目标pandassqlon