I have a following problem: I have two tables. I would like to drop all rows in TableA that occurs in TableB. In the fisrt stage I would like to mark those rows using this formula:
TableA = pd.DataFrame({'c': ['A', 'A', 'B', 'C', 'C'],
'k': [1, 2, 2, 2, 2],
'l': ['a', 'b', 'a', 'a', 'd']})
TableB = pd.DataFrame(list({'A', 'A', 'B', 'B'}))
TableA.merge(TableB, on=['c','0'], how='left', indicator=True)
But I got this error KeyError: 'c'
. What is the problem in my code? Thanks