I am using python to update the data in my MongoDB database. I want to insert the data frame rows only if it does not already exist in the Database. I want to check the existence of the record using only one column- variant_id (unique key). The variant_id which are already present in the database, should not get modified. Only the new variant_id should be getting appended.
Original Database Table-
New Dataframe to be inserted-
Database Table After Insertion-



try this did you means this?