I have a list of dataframes and each one looks like this:
df1
:
Name | X | Y |
---|---|---|
AAA | 10 | 5 |
AAA | 20 | 10 |
AAA | 30 | 15 |
AAA | 40 | 20 |
df2
:
Name | X | Y |
---|---|---|
BBB | 20 | 10 |
BBB | 30 | 15 |
BBB | 40 | 20 |
df3
:
Name | X | Y |
---|---|---|
CCC | 10 | 5 |
CCC | 20 | 10 |
CCC | 30 | 15 |
CCC | 40 | 20 |
And I have another dataframe like this:
ID | Name |
---|---|
1 | AAA |
2 | CCC |
3 | FFF |
I would like to extract the dataframes from the list that have the same names as the last dataframe. So, in this case, I would get only df1
and df3
.