I've got two Excel Spreadsheets. The first has multiple columns, of which three (named differently) have common data. My second spreadsheet contains a key along with the data I want to bring into the first spreadsheet. For example:
Table 1:
| Target Company ID | Subsidiary ID | Parent Company ID |
|---|---|---|
| 1 | 2 | 3 |
Table 2:
| Company ID | Company Size |
|---|---|
| 1 | Small |
| 2 | Medium |
| 3 | Large |
With Excel I would do a series of Vlookups, but Table 1 is huge and is taking a long time to calculate. I would like to generate a Table such as:
| Target Company ID | Target Size | Subsidiary ID | Sub Size | Parent Company ID | Parent Size |
|---|---|---|---|---|---|
| 1 | Small | 2 | Medium | 3 | Large |
I've tried pd.merge, but it is not as targeted as a vlookup would be in assign a value to the specific column