keeping table rows that match the other table
Assuming you are using pandas, you could try this: dfC = dfB[dfB['A'].isin(dfA['A'].unique())]
This way, you will be filtering table B, based on it's A column, looking for values that are in the column A of table A.
I need some help with this problem:
I have two tables and I want to filter the rows on the second table (Table B) so that it only shows the one's that have matching 'names' with the Table A.
An exemple:
Table A




A
b
c




Anne
Two
Three


Anne
Four
Five


Jhon
Four
Five


Olivia
Four
Five




Table. B




A
Money
Rent




Anne
Two
Three


Anne
Four
Five


Anne
Four
Five


Kristian
Four
Five


Paul
Four
Five


Olivia
Four
Five


Olivia
Four
Five




The result that I want to achieve is




A
Money
Rent




Anne
Two
Three


Anne
Four
Five


Anne
Four
Five


Jhon
Nan
Nan


Olivia
Four
Five


Olivia
Four
Five