Hi,
I've many files in my directory which i'm trying to join based on a condition. I've some files in one folder which has basic structure like below.
Some files has only Sec_Id or isin or sip. Some files has all 3 fields.
| Fund | Sec_id | isin | sip |
| 123 | 637ABC | US4971VA | 744573AP1 |
| 124 | US2130 | US27CM6 | 040WAW |
| 567 | IN3133 | US185BA8 | 894AK5 |
| 890 | 13TKJG | US56VAM2 | 040WW5 |
Then i've few files in different folders which has structure like below
| Fund | Security |
| 123 | 744573AP1 |
| 124 | US2130 |
| 567 | US185BA8 |
| 890 | 040WW5 |
So i wanted to join these files based on a condition 1) that if the Security of 2nd files exist in any of Sec_id or isin or sip from 1st files.
2) If in case all Sec_id or isin or sip exist in 1st file, then security should look for exact value and then join. Only one column out of Sec_id or isin or sip will have matching values as of Security in 2nd file.
Is it possible to achieve this?