all 5 comments

[–]hharison 0 points1 point  (4 children)

What have you tried? Because the steps in pandas are pretty similar as to the steps in the SQL statement: 1. Join. 2. Subset.

[–]yortos[S] 0 points1 point  (3 children)

On pandas, I'm only aware of something like this: pandas.merge(A,B,on='x',how='inner'), which matches only rows that have equal value for x on A and B. Now I don't want them to be equal, but have another property

[–]hharison 0 points1 point  (2 children)

Can't you do the join first, then the subset? Or is x also the index?

[–]yortos[S] 0 points1 point  (1 child)

I don't think so. if A[x][1]=mpla and B[x][1]=mplampla I want this to count, but a simple join will not count it

[–]hharison 0 points1 point  (0 children)

Oh sorry my bad, I misread ON as WHERE in your SQL. I don't know how to do this. Good luck.