I have two lists where am trying to perform join on the keys using core python with out using any additional libraries. The key column is the first value of the tuple 100, 101 and 102.
List 1 = [(100, 'Steven', '515.123.4567'), (101, 'Neena', '515.123.4568'), (102, 'Lex', '515.123.4569')]
List 2 = [(100, 'Engineer', '515.123.4567'), (101, 'Doctor', '515.123.4568')]
Expected Result
Inner join
[(100, 'Steven', '515.123.4567', 'Engineer'), (101, 'Neena', '515.123.4568', 'Doctor')]
Left outer
[(100, 'Steven', '515.123.4567', 'Engineer'), (101, 'Neena', '515.123.4568', 'Doctor'), (102, 'Lex', '515.123.4569', null)]
We can easily do this using pandas. But am trying to do this in the python itself. Any suggestion will be helpful.
I tried using collections and itertools, but am not getting expected results